This commit is contained in:
Simon Brodtmann 2024-12-02 22:14:37 +01:00
parent 4e70224881
commit f9c120cf24

View file

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