Code: Select all
--item.lua
local hopperFurnace = table.deepcopy(data.raw["furnace"]["electric-furnace"]) -- copy the table that defines the electric furnace item into the hopperFurnace variable
hopperFurnace.name = "hopper-furnace"
hopperFurnace.icons = {
{
icon = hopperFurnace.icon,
tint = {r=1,g=0,b=0,a=0.3}
},
}
local recipe = table.deepcopy(data.raw["recipe"]["electric-furnace"])
recipe.enabled = true
recipe.name = "hopper-furnace"
recipe.ingredients = {{"copper-plate",5}}
recipe.result = "hopper-furnace"
data:extend{hopperFurnace,recipe}
Code: Select all
--item.lua
local fireArmor = table.deepcopy(data.raw["armor"]["heavy-armor"]) -- copy the table that defines the heavy armor item into the fireArmor variable
fireArmor.name = "fire-armor"
fireArmor.icons = {
{
icon = fireArmor.icon,
tint = {r=1,g=0,b=0,a=0.3}
},
}
fireArmor.resistances = {
{
type = "physical",
decrease = 6,
percent = 10
},
{
type = "explosion",
decrease = 10,
percent = 30
},
{
type = "acid",
decrease = 5,
percent = 30
},
{
type = "fire",
decrease = 0,
percent = 100
}
}
local recipe = table.deepcopy(data.raw["recipe"]["heavy-armor"])
recipe.enabled = true
recipe.name = "fire-armor"
recipe.ingredients = {{"copper-plate",200},{"steel-plate",50}}
recipe.result = "fire-armor"
data:extend{fireArmor,recipe}
--Edit updated with code tags