feat: new getName table
Table of utility functions
This commit is contained in:
parent
a53c0b7508
commit
94dfe3c2b8
1 changed files with 21 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue