krastorio2 2.0 compatibility
This commit is contained in:
parent
a15f4fe5b6
commit
c0d9c352e8
7 changed files with 34 additions and 22 deletions
4
compatibility/krastorio2.lua
Normal file
4
compatibility/krastorio2.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
if mods["Krastorio2"] then
|
||||||
|
local k2datautil = require("__Krastorio2__/data-util")
|
||||||
|
k2datautil.remove_recipe_unlock("kr-silicon-processing", "kr-quartz")
|
||||||
|
end
|
||||||
|
|
@ -3,6 +3,7 @@ require("strange-matter")
|
||||||
require("recipes/silicon-vulcanite")
|
require("recipes/silicon-vulcanite")
|
||||||
require("compatibility/248k")
|
require("compatibility/248k")
|
||||||
require("compatibility/any-planet-start")
|
require("compatibility/any-planet-start")
|
||||||
|
require("compatibility/krastorio2")
|
||||||
|
|
||||||
local util = require("data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -514,15 +514,15 @@ end
|
||||||
|
|
||||||
-- k2 matter
|
-- k2 matter
|
||||||
-- params: {k2matter}, k2baseicon , {icon}
|
-- params: {k2matter}, k2baseicon , {icon}
|
||||||
function util.k2matter(params)
|
function util.k2matter(params, only_deconversion)
|
||||||
local matter = require("__Krastorio2__/lib/public/data-stages/matter-util")
|
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||||
if mods["space-exploration"] then
|
if mods["space-exploration"] then
|
||||||
params.k2matter.need_stabilizer = true
|
params.k2matter.needs_stabilizer = true
|
||||||
end
|
end
|
||||||
if not params.k2matter.minimum_conversion_quantity then
|
if not params.k2matter.material.amount then
|
||||||
params.k2matter.minimum_conversion_quantity = 10
|
params.k2matter.material.amount = 10
|
||||||
end
|
end
|
||||||
if not data.raw.technology[params.k2matter.unlocked_by_technology] then
|
if not data.raw.technology[params.k2matter.unlocked_by] then
|
||||||
local icon = ""
|
local icon = ""
|
||||||
if params.k2baseicon then
|
if params.k2baseicon then
|
||||||
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
|
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
|
||||||
|
|
@ -534,7 +534,7 @@ function util.k2matter(params)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
type = "technology",
|
type = "technology",
|
||||||
name = params.k2matter.unlocked_by_technology,
|
name = params.k2matter.unlocked_by,
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -569,7 +569,11 @@ function util.k2matter(params)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
matter.createMatterRecipe(params.k2matter)
|
if only_deconversion then
|
||||||
|
matter.make_deconversion_recipe(params.k2matter)
|
||||||
|
else
|
||||||
|
matter.make_recipes(params.k2matter)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ data:extend(
|
||||||
mods["Krastorio2"] and {
|
mods["Krastorio2"] and {
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "silica",
|
name = "silica",
|
||||||
category = "crushing",
|
category = "kr-crushing",
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 4,
|
energy_required = 4,
|
||||||
allow_productivity = true,
|
allow_productivity = true,
|
||||||
ingredients = {util.item("quartz", 10)},
|
ingredients = {util.item("kr-quartz", 10)},
|
||||||
results = {util.item("silica", 30)}
|
results = {util.item("silica", 30)}
|
||||||
} or util.me.use_bio_crushed_stone() and {
|
} or util.me.use_bio_crushed_stone() and {
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -84,7 +84,7 @@ data:extend(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "unlock-recipe",
|
type = "unlock-recipe",
|
||||||
recipe = "quartz"
|
recipe = "kr-quartz"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
prerequisites = {"kr-fluids-chemistry", "kr-stone-processing"},
|
prerequisites = {"kr-fluids-chemistry", "kr-stone-processing"},
|
||||||
|
|
|
||||||
|
|
@ -20,16 +20,16 @@ data:extend(
|
||||||
{
|
{
|
||||||
mods["Krastorio2"] and {
|
mods["Krastorio2"] and {
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "silicon",
|
name = "kr-silicon",
|
||||||
category = "smelting",
|
category = "smelting",
|
||||||
enabled = false,
|
enabled = false,
|
||||||
energy_required = 14.4,
|
energy_required = 14.4,
|
||||||
allow_productivity = true,
|
allow_productivity = true,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
util.item("silica", 18),
|
util.item("silica", 18),
|
||||||
util.item("coke", 1),
|
util.item("kr-coke", 1),
|
||||||
},
|
},
|
||||||
results = {util.item("silicon", 3)}
|
results = {util.item("kr-silicon", 3)}
|
||||||
} or {
|
} or {
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "silicon",
|
name = "silicon",
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,16 @@ if mods["Krastorio2"] then
|
||||||
local util = require("data-util");
|
local util = require("data-util");
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
item_name = "silica",
|
material = {
|
||||||
minimum_conversion_quantity = 20,
|
name = "silica",
|
||||||
matter_value = .65,
|
type = "item",
|
||||||
energy_required = 2,
|
amount = 20
|
||||||
only_deconversion = false,
|
|
||||||
need_stabilizer = false,
|
|
||||||
unlocked_by_technology = "kr-matter-stone-processing"
|
|
||||||
},
|
},
|
||||||
})
|
matter_count = .65,
|
||||||
|
energy_required = 2,
|
||||||
|
needs_stabilizer = false,
|
||||||
|
allow_productivity = true,
|
||||||
|
unlocked_by = "kr-matter-stone-processing"
|
||||||
|
},
|
||||||
|
}, false)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ if mods["space-exploration"] then
|
||||||
{name = "silicon", amount = 6},
|
{name = "silicon", amount = 6},
|
||||||
}
|
}
|
||||||
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
|
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
|
||||||
table.insert(recipe.ingredients, {"coke", 1})
|
table.insert(recipe.ingredients, {"kr-coke", 1})
|
||||||
recipe.icons = {
|
recipe.icons = {
|
||||||
{ icon = "__Krastorio2Assets__/icons/items-with-variations/silicon/silicon.png", icon_size = 64},
|
{ icon = "__Krastorio2Assets__/icons/items-with-variations/silicon/silicon.png", icon_size = 64},
|
||||||
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue