up
This commit is contained in:
parent
46c3a51ffc
commit
d4d6d8e5cc
1 changed files with 47 additions and 3 deletions
|
|
@ -65,9 +65,11 @@ function util.fe_plus(sub)
|
|||
end
|
||||
|
||||
function util.get_stack_size(default)
|
||||
if mods["Krastorio2"] then
|
||||
size = tonumber(krastorio.general.getSafeSettingValue("kr-stack-size"))
|
||||
return size or default
|
||||
if mods.Krastorio2 then
|
||||
local size = get_setting("kr-stack-size")
|
||||
if size and tonumber(size) then
|
||||
return tonumber(size)
|
||||
end
|
||||
end
|
||||
return default
|
||||
end
|
||||
|
|
@ -117,6 +119,48 @@ function util.se_landfill(params)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
-- k2 matter
|
||||
-- params: {k2matter}, k2baseicon , {icon}
|
||||
function util.k2matter(params)
|
||||
local matter = require("__Krastorio2__/lib/public/data-stages/matter-util")
|
||||
if mods["space-exploration"] then
|
||||
params.k2matter.need_stabilizer = true
|
||||
end
|
||||
if not params.k2matter.minimum_conversion_quantity then
|
||||
params.k2matter.minimum_conversion_quantity = 10
|
||||
end
|
||||
data:extend(
|
||||
{
|
||||
{
|
||||
type = "technology",
|
||||
name = params.k2matter.unlocked_by_technology,
|
||||
icons =
|
||||
{
|
||||
{
|
||||
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png",
|
||||
icon_size = 256,
|
||||
},
|
||||
params.icon,
|
||||
},
|
||||
prerequisites = {"kr-matter-processing"},
|
||||
unit =
|
||||
{
|
||||
count = 350,
|
||||
ingredients =
|
||||
{
|
||||
{"production-science-pack", 1},
|
||||
{"utility-science-pack", 1},
|
||||
{"matter-tech-card", 1}
|
||||
},
|
||||
time = 45,
|
||||
}
|
||||
},
|
||||
})
|
||||
matter.createMatterRecipe(params.k2matter)
|
||||
end
|
||||
|
||||
|
||||
-- se matter
|
||||
-- params: ore, energy_required, quant_out, quant_in, icon_size, stream_out
|
||||
function util.se_matter(params)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue