Code: Select all
data:extend(
{
{
type = "recipe",
name = "boiler-2",
enabled = "false",
ingredients =
{
{"boiler", 1},
},
result = "boiler-2",
},
{
type = "recipe",
name = "boiler-3",
enabled = "false",
ingredients =
{
{"boiler-2", 1},
},
result = "boiler-3",
},
{
type = "recipe",
name = "boiler-4",
enabled = "false",
ingredients =
{
{"boiler-3", 1},
},
result = "boiler-4",
},
}
)
table.insert(data.raw["recipe"]["boiler-2"].ingredients,{"steel-furnace", 1})
if data.raw.item["steel-pipe"] then
table.insert(data.raw["recipe"]["boiler-2"].ingredients,{"steel-plate", 1})
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["boiler-3"].ingredients,{"copper-plate", 5})
else
table.insert(data.raw["recipe"]["boiler-3"].ingredients,{"steel-plate", 8})
end
if data.raw.item["iron-gear-wheel"] then
table.insert(data.raw["recipe"]["boiler-3"].ingredients,{"iron-gear-wheel", 1})
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["boiler-4"].ingredients,{"copper-plate", 5})
else
table.insert(data.raw["recipe"]["boiler-4"].ingredients,{"steel-plate", 10})
end
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["boiler-4"].ingredients,{"electronic-circuit", 1})
end
data:extend(
{
{
type = "recipe",
name = "steam-engine-2",
enabled = "false",
ingredients =
{
{"steam-engine", 1},
},
result = "steam-engine-2",
},
{
type = "recipe",
name = "steam-engine-3",
enabled = "false",
ingredients =
{
{"steam-engine-2", 1},
},
result = "steam-engine-3",
},
}
)
local num = 5
if data.raw.item["iron-gear-wheel"] then
table.insert(data.raw["recipe"]["steam-engine-2"].ingredients,{"iron-gear-wheel", 5})
else
num = 7
end
table.insert(data.raw["recipe"]["steam-engine-2"].ingredients,{"steel-plate", num})
if data.raw.item["steel-gear-wheel"] then
table.insert(data.raw["recipe"]["steam-engine-2"].ingredients,{"copper-plate", num})
else
table.insert(data.raw["recipe"]["steam-engine-2"].ingredients,{"advanced-circuit", num * 2})
end
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"electronic-circuit", 5})
else
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"advanced-circuit", 5})
end
num = 5
if data.raw.item["iron-gear-wheel"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"iron-gear-wheel", 5})
else
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"copper-plate", 5})
else
num = 7
end
end
if data.raw.item["iron-gear-wheel"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"iron-gear-wheel", num})
else
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"copper-plate", num})
else
if data.raw.item["iron-gear-wheel"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"iron-gear-wheel", num * 2})
else
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"advanced-circuit", num * 3})
end
end
end
if data.raw.item["steel-plate"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"steel-plate", num})
else
if data.raw.item["advanced-circuit"] then
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"advanced-circuit", num})
else
table.insert(data.raw["recipe"]["steam-engine-3"].ingredients,{"copper-plate", num * 2})
end
end
data:extend(
{
{
type = "recipe",
name = "solar-panel-small",
enabled = "false",
ingredients =
{
{"steel-plate", 2},
{"electronic-circuit", 7},
{"copper-plate", 2}
},
result = "solar-panel-small"
},
{
type = "recipe",
name = "solar-panel-large",
enabled = "false",
ingredients =
{
{"steel-plate", 9},
{"electronic-circuit", 27},
{"copper-plate", 9},
},
result = "solar-panel-large"
},
{
type = "recipe",
name = "solar-panel-small-2",
enabled = "false",
ingredients =
{
{"solar-panel-small", 1},
},
result = "solar-panel-small-2"
},
{
type = "recipe",
name = "solar-panel-2",
enabled = "false",
ingredients =
{
{"solar-panel", 1},
},
result = "solar-panel-2"
},
{
type = "recipe",
name = "solar-panel-large-2",
enabled = "false",
ingredients =
{
{"solar-panel-large", 1},
},
result = "solar-panel-large-2"
},
{
type = "recipe",
name = "solar-panel-small-3",
enabled = "false",
ingredients =
{
{"solar-panel-small-2", 1},
},
result = "solar-panel-small-3"
},
{
type = "recipe",
name = "solar-panel-3",
enabled = "false",
ingredients =
{
{"solar-panel-2", 1},
},
result = "solar-panel-3"
},
{
type = "recipe",
name = "solar-panel-large-3",
enabled = "false",
ingredients =
{
{"solar-panel-large-2", 1},
},
result = "solar-panel-large-3"
},
}
)
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"electronic-circuit", 2})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"steel-plate", 8})
else
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"iron-gear-wheel", 2})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"steel-plate", 7})
end
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"electronic-circuit", 4})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"copper-plate", 9})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"advanced-circuit", 16})
else
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"iron-gear-wheel", 4})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"steel-plate", 9})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"advanced-circuit", 16})
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"copper-plate", 2})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"steel-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"advanced-circuit", 8})
else
table.insert(data.raw["recipe"]["solar-panel-small-2"].ingredients,{"electronic-circuit", 2})
table.insert(data.raw["recipe"]["solar-panel-2"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-2"].ingredients,{"steel-plate", 7})
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"copper-plate", 2})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"steel-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"electronic-circuit", 8})
else
if data.raw.item["steel-plate"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"steel-plate", 2})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"advanced-circuit", 4})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"copper-plate", 8})
else
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"iron-gear-wheel", 9})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"steel-plate", 16})
end
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"copper-plate", 16})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"steel-plate", 36})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"electronic-circuit", 64})
else
if data.raw.item["steel-plate"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"steel-plate", 2})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"iron-plate", 8})
end
end
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"electronic-circuit", 4})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"copper-plate", 8})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"steel-plate", 16})
else
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"processing-unit", 2})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"processing-unit", 4})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"processing-unit", 8})
end
if data.raw.item["advanced-circuit"] then
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"advanced-circuit", 2})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"advanced-circuit", 4})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"advanced-circuit", 8})
else
table.insert(data.raw["recipe"]["solar-panel-small-3"].ingredients,{"copper-plate", 4})
table.insert(data.raw["recipe"]["solar-panel-3"].ingredients,{"copper-plate", 9})
table.insert(data.raw["recipe"]["solar-panel-large-3"].ingredients,{"copper-plate", 16})
end
data:extend(
{
{
type = "recipe",
name = "fast-accumulator",
enabled = "false",
ingredients =
{
{"iron-plate", 2},
{"battery", 5},
},
result = "fast-accumulator"
},
{
type = "recipe",
name = "large-accumulator",
enabled = "false",
ingredients =
{
{"iron-plate", 2},
{"battery", 5},
},
result = "large-accumulator"
},
{
type = "recipe",
name = "basic-accumulator-2",
enabled = "false",
ingredients =
{
{"basic-accumulator", 1},
{"steel-plate", 2},
{"battery", 5},
},
result = "basic-accumulator-2"
},
{
type = "recipe",
name = "large-accumulator-2",
enabled = "false",
ingredients =
{
{"large-accumulator", 1},
{"steel-plate", 2},
{"battery", 5},
},
result = "large-accumulator-2"
},
{
type = "recipe",
name = "fast-accumulator-2",
enabled = "false",
ingredients =
{
{"fast-accumulator", 1},
{"steel-plate", 2},
{"battery", 5},
},
result = "fast-accumulator-2"
},
{
type = "recipe",
name = "basic-accumulator-3",
enabled = "false",
ingredients =
{
{"basic-accumulator-2", 1},
},
result = "basic-accumulator-3"
},
{
type = "recipe",
name = "large-accumulator-3",
enabled = "false",
ingredients =
{
{"large-accumulator-2", 1},
},
result = "large-accumulator-3"
},
{
type = "recipe",
name = "fast-accumulator-3",
enabled = "false",
ingredients =
{
{"fast-accumulator-2", 1},
},
result = "fast-accumulator-3"
},
}
)
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["basic-accumulator-2"].ingredients,{"electronic-circuit", 5})
table.insert(data.raw["recipe"]["large-accumulator-2"].ingredients,{"iron-gear-wheel", 5})
table.insert(data.raw["recipe"]["fast-accumulator-2"].ingredients,{"copper-plate", 5})
else
table.insert(data.raw["recipe"]["basic-accumulator-2"].ingredients,{"advanced-circuit", 5})
table.insert(data.raw["recipe"]["large-accumulator-2"].ingredients,{"advanced-circuit", 5})
table.insert(data.raw["recipe"]["fast-accumulator-2"].ingredients,{"advanced-circuit", 5})
end
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"copper-plate", 2})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"steel-plate", 2})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"iron-gear-wheel", 2})
else
if data.raw.item["copper-plate"] then
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"copper-plate", 2})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"electronic-circuit", 2})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"advanced-circuit", 2})
else
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"steel-plate", 4})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"steel-plate", 4})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"steel-plate", 4})
end
end
if data.raw.item["battery"] then
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"battery", 5})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"battery", 5})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"battery", 5})
else
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"battery", 8})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"battery", 8})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"battery", 8})
end
if data.raw.item["electronic-circuit"] then
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"electronic-circuit", 5})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"electronic-circuit", 5})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"electronic-circuit", 5})
else
table.insert(data.raw["recipe"]["basic-accumulator-3"].ingredients,{"processing-unit", 5})
table.insert(data.raw["recipe"]["large-accumulator-3"].ingredients,{"processing-unit", 5})
table.insert(data.raw["recipe"]["fast-accumulator-3"].ingredients,{"processing-unit", 5})
end