Fi K2 matter deconversion only for plate and alumina

This commit is contained in:
pla 2025-10-27 17:09:40 +01:00
parent d2f64e768d
commit fc5d728cbd
No known key found for this signature in database
2 changed files with 49 additions and 52 deletions

View file

@ -1,69 +1,62 @@
-- Matter recipes for Krastorio2 -- Matter recipes for Krastorio2
if mods["Krastorio2"] then if mods["Krastorio2"] then
local util = require("data-util") local util = require("data-util")
local matter = require("__Krastorio2__/prototypes/libraries/matter") local matter = require("__Krastorio2__/prototypes/libraries/matter")
data:extend( data:extend({
{
{ {
type = "technology", type = "technology",
name = "aluminum-matter-processing", name = "aluminum-matter-processing",
icons = icons = {
{ {
{ icon = util.k2assets() .. "/technologies/backgrounds/matter.png",
icon = util.k2assets().."/technologies/backgrounds/matter.png",
icon_size = 256, icon_size = 256,
}, },
{ {
icon = "__bzaluminum2__/graphics/icons/aluminum-ore.png", icon = "__bzaluminum2__/graphics/icons/aluminum-ore.png",
icon_size = 64, icon_size = 64,
scale = 1, scale = 1,
} },
}, },
effects = {}, effects = {},
prerequisites = {"kr-matter-processing"}, prerequisites = { "kr-matter-processing" },
unit = unit = {
{
count = 350, count = 350,
ingredients = ingredients = {
{ { "production-science-pack", 1 },
{"production-science-pack", 1}, { "utility-science-pack", 1 },
{"utility-science-pack", 1}, { "kr-matter-tech-card", 1 },
{"kr-matter-tech-card", 1}
}, },
time = 45 time = 45,
}
}, },
}) },
})
local aluminum_ore_matter = local aluminum_ore_matter = {
{
material = { type = "item", name = "aluminum-ore", amount = 10 }, material = { type = "item", name = "aluminum-ore", amount = 10 },
matter_count = 5, matter_count = 5,
energy_required = 1, energy_required = 1,
needs_stabilizer = false, needs_stabilizer = false,
unlocked_by = "aluminum-matter-processing" unlocked_by = "aluminum-matter-processing",
} }
matter.make_recipes(aluminum_ore_matter) matter.make_recipes(aluminum_ore_matter)
local alumina_matter = local alumina_matter = {
{
material = { type = "item", name = "alumina", amount = 10 }, material = { type = "item", name = "alumina", amount = 10 },
matter_count = 7.5, matter_count = 7.5,
energy_required = 2, energy_required = 2,
only_deconversion = true, -- only_deconversion = true,
needs_stabilizer = true, needs_stabilizer = true,
unlocked_by = "aluminum-matter-processing" unlocked_by = "aluminum-matter-processing",
} }
matter.make_recipes(alumina_matter) matter.make_deconversion_recipe(alumina_matter)
local aluminum_plate_matter = local aluminum_plate_matter = {
{
material = { type = "item", name = "aluminum-plate", amount = 10 }, material = { type = "item", name = "aluminum-plate", amount = 10 },
matter_count = 10, matter_count = 10,
energy_required = 3, energy_required = 3,
only_deconversion = true, -- only_deconversion = true,
needs_stabilizer = true, needs_stabilizer = true,
unlocked_by = "aluminum-matter-processing" unlocked_by = "aluminum-matter-processing",
} }
matter.make_recipes(aluminum_plate_matter) matter.make_deconversion_recipe(aluminum_plate_matter)
end end

View file

@ -168,7 +168,11 @@ function util.k2matter(params)
}, },
}) })
end end
if params.k2matter.only_deconversion then
matter.make_deconversion_recipe(params.k2matter)
else
matter.make_recipes(params.k2matter) matter.make_recipes(params.k2matter)
end
end end