Added the ability to specify the number of items in primitive crafting recipes and results
This commit is contained in:
@@ -79,14 +79,17 @@ local function getCraftPane(self, playerName, paneType)
|
||||
|
||||
if selectedCraft ~= nil then
|
||||
local craft = PrimitiveCraftHandler:getCraftByName(selectedCraft)
|
||||
local itemName = craft.output
|
||||
local item = ItemStack(craft.output)
|
||||
local itemDef = item:get_definition()
|
||||
|
||||
local recipe = ''
|
||||
for _, itemName in ipairs(craft.recipe) do
|
||||
recipe = recipe..'- '..core.registered_items[itemName]._title..'\n'
|
||||
local recipeItem = ItemStack(itemName)
|
||||
recipe = recipe..'- '..core.strip_colors(recipeItem:get_definition()._title)..' x'..recipeItem:get_count()..'\n'
|
||||
end
|
||||
local itemDef = core.registered_items[itemName]
|
||||
|
||||
CraftPane:
|
||||
itemImage(5.5, 0.5, 2, 2, itemName):
|
||||
itemImage(5.5, 0.5, 2, 2, craft.output):
|
||||
areaLabel(5.5, 3, 4, 4,
|
||||
itemDef._title..'\n'..
|
||||
itemDef._description..'\n\n'..
|
||||
|
||||
Reference in New Issue
Block a user