diff --git a/compacting-storage.lua b/compacting-storage.lua index 37d5bf2..ea4cc06 100644 --- a/compacting-storage.lua +++ b/compacting-storage.lua @@ -57,6 +57,27 @@ local BLOCKS = 81 local MIN_NUM = (4 * STACKS * NUGGETS) + (4 * STACKS * INGOTS) local MAX_NUM = (8 * STACKS * NUGGETS) + (8 * STACKS * INGOTS) +local getName = { + nugget = function (item_type) + return ("%s:%s_nugget"):format( + ITEM_TYPES[item_type].nugget, + item_type, + ) + end, + ingot = function (item_type) + return ("%s:%s_ingot"):format( + ITEM_TYPES[item_type].ingot, + item_type, + ) + end, + block = function (item_type) + return ("%s:%s_block"):format( + ITEM_TYPES[item_type].block, + item_type, + ) + end, +} + -- basic actions function craft (requester, item_type, conversion_type) -- conversion_type key: 1, nuggets to ingots; 2, ingots to blocks;