From 6310e3f741dadb5779e35f10bf9e141224e18887 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Mon, 17 Nov 2025 20:47:19 -0500 Subject: [PATCH] compacting-storage.lua: yet another bugfix! --- compacting-storage.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compacting-storage.lua b/compacting-storage.lua index 2e51a16..363b665 100644 --- a/compacting-storage.lua +++ b/compacting-storage.lua @@ -79,19 +79,19 @@ function craft_multiple (item_type, conversion_type, count) end function execute_crafts (item_type, crafts) - local form = "nuggets" - if crafts[form] > 0 then + local num_crafts = crafts.nuggets + if num_crafts > 0 then print(("Crafting %s nuggets"):format(item_type)) craft_multiple(item_type, 4, num_crafts) - elseif crafts[form] < 0 then + elseif num_crafts < 0 then print(("Crafting %s ingots"):format(item_type)) craft_multiple(item_type, 1, -num_crafts) end - form = "blocks" - if crafts[form] > 0 then + num_crafts = crafts.blocks + if num_crafts > 0 then print(("Crafting %s blocks"):format(item_type)) craft_multiple(item_type, 2, num_crafts) - elseif crafts[form] < 0 then + elseif num_crafts < 0 then print(("Crafting %s ingots"):format(item_type)) craft_multiple(item_type, 3, -num_crafts) end