From 80c2d63ca4145c63006d9d3872e35e9078d2c223 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 10 Oct 2025 18:26:41 +0200 Subject: [PATCH] ingredients/results --- Chromium2/data-util.lua | 168 ++++++++++---------- Chromium2/prototypes/chromium-enriched.lua | 6 +- Chromium2/prototypes/chromium-recipe-se.lua | 2 +- Chromium2/prototypes/chromium-recipe.lua | 60 +++---- 4 files changed, 117 insertions(+), 119 deletions(-) diff --git a/Chromium2/data-util.lua b/Chromium2/data-util.lua index 7edf712..b9b8228 100644 --- a/Chromium2/data-util.lua +++ b/Chromium2/data-util.lua @@ -27,8 +27,8 @@ function util.se_landfill(params) category = "hard-recycling", order = "z-b-"..params.ore, subgroup = "terrain", - result = "landfill", - ingredients = {{params.ore, 50}}, + results = {{type="item", name="landfill", amount=1}}, + ingredients = {{type="item", name=params.ore, amount=50}}, } }) util.add_unlock("se-recycling-facility", lname) @@ -38,116 +38,114 @@ end -- se matter -- params: ore, energy_required, quant_out, quant_in, icon_size, stream_out function util.se_matter(params) - if mods["space-exploration"] > "0.6" then - if not params.quant_in then params.quant_in = params.quant_out end - if not params.icon_size then params.icon_size = 64 end - local fname = "matter-fusion-"..params.ore - local sedata = mods["Krastorio2"] and "se-kr-matter-synthesis-data" or "se-fusion-test-data" - local sejunk = mods["Krastorio2"] and "se-broken-data" or "se-junk-data" + if not params.quant_in then params.quant_in = params.quant_out end + if not params.icon_size then params.icon_size = 64 end + local fname = "matter-fusion-"..params.ore + local sedata = mods["Krastorio2"] and "se-kr-matter-synthesis-data" or "se-fusion-test-data" + local sejunk = mods["Krastorio2"] and "se-broken-data" or "se-junk-data" + data:extend({ + { + type = "recipe", + name = fname, + localised_name = {"recipe-name.se-matter-fusion-to", {"item-name."..params.ore}}, + category = "space-materialisation", + subgroup = "materialisation", + order = "a-b-z", + icons = { + {icon = "__space-exploration-graphics__/graphics/blank.png", + icon_size = 64, scale = 0.5}, + {icon = "__space-exploration-graphics__/graphics/icons/fluid/particle-stream.png", + icon_size = 64, scale = 0.33, shift = {8,-8}}, + {icon = "__Chromium__/graphics/icons/"..params.ore..".png", + icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={-8, 8}}, + {icon = "__space-exploration-graphics__/graphics/icons/transition-arrow.png", + icon_size = 64, scale = 0.5}, + }, + energy_required = params.energy_required, + enabled = false, + ingredients = { + {sedata, 1}, + {type="fluid", name="se-particle-stream", amount=50}, + {type="fluid", name="se-space-coolant-supercooled", amount=25}, + }, + results = { + {type = "item", name = params.ore, amount = params.quant_out}, + {type="item", name="se-contaminated-scrap", amount=1}, + {type=item, name=sedata, amount=1, probability=.99}, + {type=item, name=sejunk, amount=1, probability=.01}, + {type="fluid", name="se-space-coolant-hot", amount=25, catalyst_amount=25}, + } + } + }) + util.add_unlock("se-space-matter-fusion", fname) + + if mods["Krastorio2"] then + local lname = params.ore.."-to-particle-stream" data:extend({ + enabled = false, { type = "recipe", - name = fname, - localised_name = {"recipe-name.se-matter-fusion-to", {"item-name."..params.ore}}, + name = lname, + localised_name = {"recipe-name.se-kr-matter-liberation", {"item-name."..params.ore}}, category = "space-materialisation", - subgroup = "materialisation", + subgroup = "advanced-particle-stream", order = "a-b-z", icons = { {icon = "__space-exploration-graphics__/graphics/blank.png", icon_size = 64, scale = 0.5}, {icon = "__space-exploration-graphics__/graphics/icons/fluid/particle-stream.png", - icon_size = 64, scale = 0.33, shift = {8,-8}}, + icon_size = 64, scale = 0.33, shift = {-8,8}}, {icon = "__Chromium__/graphics/icons/"..params.ore..".png", - icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={-8, 8}}, + icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={8, -8}}, {icon = "__space-exploration-graphics__/graphics/icons/transition-arrow.png", icon_size = 64, scale = 0.5}, }, - energy_required = params.energy_required, + energy_required = 30, enabled = false, ingredients = { - {sedata, 1}, + {type="item", name="se-kr-matter-liberation-data", amount=1}, + {type="item", name=params.ore, amount=params.quant_in}, {type="fluid", name="se-particle-stream", amount=50}, - {type="fluid", name="se-space-coolant-supercooled", amount=25}, }, results = { - {params.ore, params.quant_out}, - {"se-contaminated-scrap", 1}, - {type=item, name=sedata, amount=1, probability=.99}, + {type=item, name="se-kr-matter-liberation-data", amount=1, probability=.99}, {type=item, name=sejunk, amount=1, probability=.01}, - {type="fluid", name="se-space-coolant-hot", amount=25, catalyst_amount=25}, + {type="fluid", name="se-particle-stream", amount=params.stream_out, catalyst_amount=50}, } } }) - util.add_unlock("se-space-matter-fusion", fname) - - if mods["Krastorio2"] then - local lname = params.ore.."-to-particle-stream" + if not data.raw.technology["bz-advanced-stream-production"] then data:extend({ - enabled = false, { - type = "recipe", - name = lname, - localised_name = {"recipe-name.se-kr-matter-liberation", {"item-name."..params.ore}}, - category = "space-materialisation", - subgroup = "advanced-particle-stream", - order = "a-b-z", - icons = { - {icon = "__space-exploration-graphics__/graphics/blank.png", - icon_size = 64, scale = 0.5}, - {icon = "__space-exploration-graphics__/graphics/icons/fluid/particle-stream.png", - icon_size = 64, scale = 0.33, shift = {-8,8}}, - {icon = "__Chromium__/graphics/icons/"..params.ore..".png", - icon_size = params.icon_size, scale = 0.33 * 64/params.icon_size, shift={8, -8}}, - {icon = "__space-exploration-graphics__/graphics/icons/transition-arrow.png", - icon_size = 64, scale = 0.5}, + type = "technology", + name ="bz-advanced-stream-production", + localised_name = {"", {"technology-name.se-kr-advanced-stream-production"}, " 2"}, + icon = "__space-exploration-graphics__/graphics/technology/material-fabricator.png", + icon_size = 128, + effects = {}, + unit = { + count = 100, + time = 15, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"se-rocket-science-pack", 1}, + {"space-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1}, + {"se-astronomic-science-pack-4", 1}, + {"se-energy-science-pack-4", 1}, + {"se-material-science-pack-4", 1}, + {"matter-tech-card", 1}, + {"se-deep-space-science-pack-1", 1}, + } }, - energy_required = 30, - enabled = false, - ingredients = { - {"se-kr-matter-liberation-data", 1}, - {params.ore, params.quant_in}, - {type="fluid", name="se-particle-stream", amount=50}, - }, - results = { - {type=item, name="se-kr-matter-liberation-data", amount=1, probability=.99}, - {type=item, name=sejunk, amount=1, probability=.01}, - {type="fluid", name="se-particle-stream", amount=params.stream_out, catalyst_amount=50}, - } - } + prerequisites = {"se-kr-advanced-stream-production"}, + }, }) - if not data.raw.technology["bz-advanced-stream-production"] then - data:extend({ - { - type = "technology", - name ="bz-advanced-stream-production", - localised_name = {"", {"technology-name.se-kr-advanced-stream-production"}, " 2"}, - icon = "__space-exploration-graphics__/graphics/technology/material-fabricator.png", - icon_size = 128, - effects = {}, - unit = { - count = 100, - time = 15, - ingredients = { - {"automation-science-pack", 1}, - {"logistic-science-pack", 1}, - {"chemical-science-pack", 1}, - {"se-rocket-science-pack", 1}, - {"space-science-pack", 1}, - {"production-science-pack", 1}, - {"utility-science-pack", 1}, - {"se-astronomic-science-pack-4", 1}, - {"se-energy-science-pack-4", 1}, - {"se-material-science-pack-4", 1}, - {"matter-tech-card", 1}, - {"se-deep-space-science-pack-1", 1}, - } - }, - prerequisites = {"se-kr-advanced-stream-production"}, - }, - }) - end - util.add_unlock("bz-advanced-stream-production", lname) end + util.add_unlock("bz-advanced-stream-production", lname) end end diff --git a/Chromium2/prototypes/chromium-enriched.lua b/Chromium2/prototypes/chromium-enriched.lua index 639f04a..f5569a5 100644 --- a/Chromium2/prototypes/chromium-enriched.lua +++ b/Chromium2/prototypes/chromium-enriched.lua @@ -60,8 +60,8 @@ data:extend( enabled = false, always_show_made_in = true, always_show_products = true, - ingredients = { {"enriched-chromium", 5} }, - results = { {"chromium-plate", 5} }, + ingredients = { {type="item", name="enriched-chromium", amount=5} }, + results = { {type="item", name="chromium-plate", amount=5} }, order = "a", }, { @@ -77,7 +77,7 @@ data:extend( { icon = data.raw.item["chromite-ore"].icon, icon_size = data.raw.item["chromite-ore"].icon_size, - scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["chromite-ore"].icon_size), + scale = 0.20, shift = {0, 4} } }, diff --git a/Chromium2/prototypes/chromium-recipe-se.lua b/Chromium2/prototypes/chromium-recipe-se.lua index b5e44a2..57f6380 100644 --- a/Chromium2/prototypes/chromium-recipe-se.lua +++ b/Chromium2/prototypes/chromium-recipe-se.lua @@ -62,7 +62,7 @@ if mods["space-exploration"] then type = "recipe", name = "chromium-ingot", category = "casting", - results = {{"chromium-ingot", 1}}, + results = {{type="item", name="chromium-ingot", amount=1}}, energy_required = 18.75, ingredients = { {type = "fluid", name = "molten-chromium", amount = 250}, diff --git a/Chromium2/prototypes/chromium-recipe.lua b/Chromium2/prototypes/chromium-recipe.lua index d24c92c..dbffbcd 100644 --- a/Chromium2/prototypes/chromium-recipe.lua +++ b/Chromium2/prototypes/chromium-recipe.lua @@ -40,7 +40,7 @@ data:extend({ main_product = "chromium-plate", enabled = false, energy_required = 24, - ingredients = {{"chromite-ore", 15}}, + ingredients = {{type="item", name="chromite-ore", amount=15}}, results = { {type="item", name = "chromium-plate", amount=5} } @@ -75,9 +75,9 @@ if mods["Krastorio2"] then }) end -local stainless_steel_ingredients = {{"steel-plate", 8}, {"chromium-plate", 2}} +local stainless_steel_ingredients = {{type="item", name="steel-plate", amount=8}, {type="item", name="chromium-plate", amount=2}} if mods["IfNickel-Updated"] then - stainless_steel_ingredients = {{"steel-plate", 8}, {"chromium-plate", 1}, {"nickel-plate", 1}} + stainless_steel_ingredients = {{type="item", name="steel-plate", amount=8}, {type="item", name="chromium-plate", amount=1}, {type="item", name="nickel-plate", amount=1}} end local stainless_steel_category = "crafting" if mods["bzfoundry"] then @@ -101,7 +101,7 @@ data:extend({ enabled = false, energy_required = 4, ingredients = stainless_steel_ingredients, - results = {{"stainless-steel-plate", 10}}, + results = {{type="item", name="stainless-steel-plate", amount=10}}, } }) @@ -127,13 +127,13 @@ data:extend({ enabled = false, energy_required = 8, ingredients = polyethylene_plastic_ingredients, - results = {{"plastic-bar", 15}}, + results = {{type="item", name="plastic-bar", amount=15}}, } }) -local chromel_r_fabric_ingredients = {{"copper-plate", 8}, {"chromium-plate", 2}} +local chromel_r_fabric_ingredients = {{type="item", name="copper-plate", amount=8}, {type="item", name="chromium-plate", amount=2}} if mods["IfNickel-Updated"] then - chromel_r_fabric_ingredients = {{"nickel-plate", 8}, {"chromium-plate", 2}} + chromel_r_fabric_ingredients = {{type="item", name="nickel-plate", amount=8}, {type="item", name="chromium-plate", amount=2}} end local chromel_r_fabric_crafting = "crafting" if mods["248k-Redux"] then @@ -157,13 +157,13 @@ data:extend({ enabled = false, energy_required = 5, ingredients = chromel_r_fabric_ingredients, - results = {{"chromel-r-fabric", 5}}, + results = {{type="item", name="chromel-r-fabric", amount=5}}, } }) -local basic_vehicle_frame_ingredients = {{"steel-plate", 5}, {"copper-plate", 10}} +local basic_vehicle_frame_ingredients = {{type="item", name="steel-plate", amount=5}, {type="item", name="copper-plate", amount=10}} if mods["bzaluminum"] then - basic_vehicle_frame_ingredients = {{"steel-plate", 5}, {"alumina", 10}} + basic_vehicle_frame_ingredients = {{type="item", name="steel-plate", amount=5}, {type="item", name="alumina", amount=10}} end data:extend({ { @@ -183,13 +183,13 @@ data:extend({ enabled = false, energy_required = 4, ingredients = basic_vehicle_frame_ingredients, - results = {{"basic-vehicle-frame", 1}}, + results = {{type="item", name="basic-vehicle-frame", amount=1}}, } }) -local vehicle_frame_ingredients = {{"basic-vehicle-frame", 1}, {"stainless-steel-plate", 15}, {"copper-plate", 20}} +local vehicle_frame_ingredients = {{type="item", name="basic-vehicle-frame", amount=1}, {type="item", name="stainless-steel-plate", amount=15}, {type="item", name="copper-plate", amount=20}} if mods["bzaluminum"] then - vehicle_frame_ingredients = {{"basic-vehicle-frame", 1}, {"stainless-steel-plate", 15}, {"aluminum-6061", 20}} + vehicle_frame_ingredients = {{type="item", name="basic-vehicle-frame", amount=1}, {type="item", name="stainless-steel-plate", amount=15}, {type="item", name="aluminum-6061", amount=20}} end data:extend({ { @@ -209,13 +209,13 @@ data:extend({ enabled = false, energy_required = 6, ingredients = vehicle_frame_ingredients, - results = {{"vehicle-frame", 1}}, + results = {{type="item", name="vehicle-frame", amount=1}}, } }) -local inconel_ingredients = {{"steel-plate", 5}, {"chromium-plate", 3}, {"iron-plate", 1}, mods["Tantalite"] and {"niobium-plate", 1}} +local inconel_ingredients = {{type="item", name="steel-plate", amount=5}, {type="item", name="chromium-plate", amount=3}, {type="item", name="iron-plate", amount=1}, mods["Tantalite"] and {type="item", name="niobium-plate", amount=1}} if mods["IfNickel-Updated"] then - inconel_ingredients = {{"nickel-plate", 5}, {"chromium-plate", 3}, {"iron-plate", 1}, mods["Tantalite"] and {"niobium-plate", 1}} + inconel_ingredients = {{type="item", name="nickel-plate", amount=5}, {type="item", name="chromium-plate", amount=3}, {type="item", name="iron-plate", amount=1}, mods["Tantalite"] and {type="item", name="niobium-plate", amount=1}} end local inconel_category = "crafting" local inconel_subgroup = "intermediate-product" @@ -242,14 +242,14 @@ data:extend({ enabled = false, energy_required = 30, ingredients = inconel_ingredients, - results = {{"inconel-718", 10}}, + results = {{type="item", name="inconel-718", amount=10}}, } }) -local automation_core3_ingredients = {(data.raw.item["automation-core-2"] and {"automation-core-2", 1}) or {"steel-plate", 5}, {"inconel-718", 10}} +local automation_core3_ingredients = {(data.raw.item["automation-core-2"] and {type="item", name="automation-core-2", amount=1}) or {type="item", name="steel-plate", amount=5}, {type="item", name="inconel-718", amount=10}} local automation_core3_subgroup = "intermediate-product" if (mods["BrassTacks-Updated"] and data.raw.item["advanced-gearbox"]) and (mods["IfNickel-Updated"] and data.raw.item["advanced-machining-tool"]) then --check for hardmode - automation_core3_ingredients = {data.raw.item["automation-core-2"] and {"automation-core-2", 1}, {"advanced-gearbox", 1}, {"complex-joint", 2}, {"advanced-machining-tool", 2}, {"inconel-718", 4}} + automation_core3_ingredients = {data.raw.item["automation-core-2"] and {type="item", name="automation-core-2", amount=1}, {type="item", name="advanced-gearbox", amount=1}, {type="item", name="complex-joint", amount=2}, {type="item", name="advanced-machining-tool", amount=2}, {type="item", name="inconel-718", amount=4}} automation_core3_subgroup = "articulated-components" end data:extend({ @@ -271,7 +271,7 @@ end enabled = false, energy_required = 5, ingredients = automation_core3_ingredients, - results = {{"automation-core-3", 1}}, + results = {{type="item", name="automation-core-3", amount=1}}, } }) if mods["space-exploration"] then @@ -281,7 +281,7 @@ end end util.add_productivity("automation-core-3") -local turbines_blade_ingredients = {{"inconel-718", 10}, mods["248k-Redux"] and {"fi_materials_GFK", 5}, {"air-bearing", 2}} +local turbines_blade_ingredients = {{type="item", name="inconel-718", amount=10}, mods["248k-Redux"] and {type="item", name="fi_materials_GFK", amount=5}, {type="item", name="air-bearing", amount=2}} local turbines_blade_subgroup = "intermediate-product" if mods["IfNickel-Updated"] then turbines_blade_subgroup = "engine-components" @@ -305,7 +305,7 @@ data:extend({ enabled = false, energy_required = 15, ingredients = turbines_blade_ingredients, - results = {{"turbine-blades", 1}}, + results = {{type="item", name="turbine-blades", amount=1}}, } }) if mods["space-exploration"] then @@ -335,8 +335,8 @@ data:extend({ order = "h", enabled = false, energy_required = 8, - ingredients = {{"inconel-718", 1}, {"low-density-structure", 1}, mods["space-exploration"] and {"se-heat-shielding", 1}}, - results = {{"heat-resistant-low-density-structure", 2}}, + ingredients = {{type="item", name="inconel-718", amount=1}, {type="item", name="low-density-structure", amount=1}, mods["space-exploration"] and {type="item", name="se-heat-shielding", amount=1}}, + results = {{type="item", name="heat-resistant-low-density-structure", amount=2}}, } }) @@ -358,8 +358,8 @@ data:extend({ order = "h", enabled = false, energy_required = 5, - ingredients = {{"stainless-steel-plate", 2},data.raw.item["cryogenic-seal"] and {"cryogenic-seal", 1}, { type = "fluid", name = "lubricant", amount = 5 }}, - results = {{"air-bearing", 1}}, + ingredients = {{type="item", name="stainless-steel-plate", amount=2},data.raw.item["cryogenic-seal"] and {type="item", name="cryogenic-seal", amount=1}, { type = "fluid", name = "lubricant", amount = 5 }}, + results = {{type="item", name="air-bearing", amount=1}}, } }) if mods["Krastorio2"] then @@ -389,8 +389,8 @@ data:extend({ order = "g", enabled = false, energy_required = 12, - ingredients = {{"inconel-718", 2}, {"air-bearing", 1}, {"electric-engine-unit", 2}, mods["ThemTharHills-Updated"] and {"hv-power-regulator", 1}, { type = "fluid", name = "lubricant", amount = 40 }}, - results = {{"advanced-electric-motor", 1}}, + ingredients = {{type="item", name="inconel-718", amount=2}, {type="item", name="air-bearing", amount=1}, {type="item", name="electric-engine-unit", amount=2}, mods["ThemTharHills-Updated"] and {type="item", name="hv-power-regulator", amount=1}, { type = "fluid", name = "lubricant", amount = 40 }}, + results = {{type="item", name="advanced-electric-motor", amount=1}}, } }) if mods["space-exploration"] then @@ -412,8 +412,8 @@ if mods["space-exploration"] then order = "h", enabled = false, energy_required = 10, - ingredients = {{"inconel-718", 1}, {"se-beryllium-plate", 1}, {"se-heat-shielding", 1}}, - results = {{"heat-resistant-low-density-structure", 4}}, + ingredients = {{type="item", name="inconel-718", amount=1}, {type="item", name="se-beryllium-plate", amount=1}, {type="item", name="se-heat-shielding", amount=1}}, + results = {{type="item", name="heat-resistant-low-density-structure", amount=4}}, } }) end