Fix K2 matter tech generation

This commit is contained in:
pla 2025-10-25 18:24:56 +02:00
parent 4f07ae58ad
commit 230d085856
No known key found for this signature in database
2 changed files with 11 additions and 12 deletions

View file

@ -115,12 +115,12 @@ end
function util.k2matter(params)
local matter = require("__Krastorio2__/prototypes/libraries/matter")
if mods["space-exploration"] then
params.k2matter.need_stabilizer = true
params.k2matter.needs_stabilizer = true
end
if not params.k2matter.minimum_conversion_quantity then
params.k2matter.minimum_conversion_quantity = 10
end
if not data.raw.technology[params.k2matter.unlocked_by_technology] then
if not data.raw.technology[params.k2matter.unlocked_by] then
local icon = ""
if params.k2baseicon then
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
@ -132,7 +132,7 @@ function util.k2matter(params)
{
{
type = "technology",
name = params.k2matter.unlocked_by_technology,
name = params.k2matter.unlocked_by,
icons =
{
{
@ -163,7 +163,8 @@ function util.k2matter(params)
},
time = 45,
},
localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
effects = {},
-- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
},
})
end

View file

@ -8,11 +8,10 @@ if mods["Krastorio2"] then
item_name = "gold-ore",
matter_count = 30,
energy_required = 10,
need_stabilizer = false,
unlocked_by_technology = "gold-matter-processing",
needs_stabilizer = false,
unlocked_by = "gold-matter-processing",
},
k2baseicon = "stone",
icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1}
icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5}
})
util.k2matter({
@ -21,10 +20,9 @@ if mods["Krastorio2"] then
item_name = "silver-ore",
matter_count = 8,
energy_required = 5,
need_stabilizer = false,
unlocked_by_technology = "silver-matter-processing",
needs_stabilizer = false,
unlocked_by = "silver-matter-processing",
},
k2baseicon = "stone",
icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1}
icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5}
})
end