diff --git a/hot-metals/prototypes/item.lua b/hot-metals/prototypes/item.lua index f955947..6748043 100644 --- a/hot-metals/prototypes/item.lua +++ b/hot-metals/prototypes/item.lua @@ -1,23 +1,22 @@ local spoil_ticks = settings.startup["hot-metals-time"].value * 60 function createHotVariant(itemName) - data.raw.item[itemName].flags = { "spoil-result" } -- Create new item - --local hotItem = table.deepcopy(data.raw.item[itemName]) - --hotItem.name = "hot-" .. itemName - --hotItem.localised_name = { "", { "item-name.hot" }, " ", { "item-name." .. itemName } } - --hotItem.icon = "__hot-metals__/graphics/icons/hot-" .. itemName .. ".png" - --hotItem.order = hotItem.order .. "-hot" - --hotItem.spoil_result = itemName - --hotItem.spoil_ticks = spoil_ticks - --data:extend({ hotItem }) + local hotItem = table.deepcopy(data.raw.item[itemName]) + hotItem.name = "hot-" .. itemName + hotItem.localised_name = { "", { "item-name.hot" }, " ", { "item-name." .. itemName } } + hotItem.icon = "__hot-metals__/graphics/icons/hot-" .. itemName .. ".png" + hotItem.order = hotItem.order .. "-hot" + hotItem.spoil_result = itemName + hotItem.spoil_ticks = spoil_ticks + data:extend({ hotItem }) -- Change recipes - --for _, recipe in pairs(data.raw.recipe) do - -- if ((recipe.category == "smelting" or recipe.category == "metallurgy") and recipe.results[1].name == itemName) then - -- recipe.results[1].name = hotItem.name - -- end - --end + for _, recipe in pairs(data.raw.recipe) do + if ((recipe.category == "smelting" or recipe.category == "metallurgy") and recipe.results[1].name == itemName) then + recipe.results[1].name = hotItem.name + end + end end createHotVariant("copper-cable")