compacting-storage.lua: yet another bugfix!
This commit is contained in:
parent
22c744ec46
commit
6310e3f741
1 changed files with 6 additions and 6 deletions
|
|
@ -79,19 +79,19 @@ function craft_multiple (item_type, conversion_type, count)
|
||||||
end
|
end
|
||||||
|
|
||||||
function execute_crafts (item_type, crafts)
|
function execute_crafts (item_type, crafts)
|
||||||
local form = "nuggets"
|
local num_crafts = crafts.nuggets
|
||||||
if crafts[form] > 0 then
|
if num_crafts > 0 then
|
||||||
print(("Crafting %s nuggets"):format(item_type))
|
print(("Crafting %s nuggets"):format(item_type))
|
||||||
craft_multiple(item_type, 4, num_crafts)
|
craft_multiple(item_type, 4, num_crafts)
|
||||||
elseif crafts[form] < 0 then
|
elseif num_crafts < 0 then
|
||||||
print(("Crafting %s ingots"):format(item_type))
|
print(("Crafting %s ingots"):format(item_type))
|
||||||
craft_multiple(item_type, 1, -num_crafts)
|
craft_multiple(item_type, 1, -num_crafts)
|
||||||
end
|
end
|
||||||
form = "blocks"
|
num_crafts = crafts.blocks
|
||||||
if crafts[form] > 0 then
|
if num_crafts > 0 then
|
||||||
print(("Crafting %s blocks"):format(item_type))
|
print(("Crafting %s blocks"):format(item_type))
|
||||||
craft_multiple(item_type, 2, num_crafts)
|
craft_multiple(item_type, 2, num_crafts)
|
||||||
elseif crafts[form] < 0 then
|
elseif num_crafts < 0 then
|
||||||
print(("Crafting %s ingots"):format(item_type))
|
print(("Crafting %s ingots"):format(item_type))
|
||||||
craft_multiple(item_type, 3, -num_crafts)
|
craft_multiple(item_type, 3, -num_crafts)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue