k2 stuff
This commit is contained in:
parent
8238fdacdd
commit
308d4bd2b7
6 changed files with 65 additions and 38 deletions
|
|
@ -1,8 +1,16 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 2.1.14
|
||||||
|
Date: 2025-05-04
|
||||||
|
Changes:
|
||||||
|
- Support for Krastorio2 spaced out
|
||||||
|
- Minor tweaks to K2 integration
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.1.13
|
Version: 2.1.13
|
||||||
Date: 2025-05-03
|
Date: 2025-05-03
|
||||||
Fixes:
|
Fixes:
|
||||||
- Fix mod load issue with Bob's
|
- Fix mod load issue with Bob's
|
||||||
|
Changes:
|
||||||
|
- K2: Compatibility updates (with thanks to autechr3 and pla)
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.1.12
|
Version: 2.1.12
|
||||||
Date: 2025-04-20
|
Date: 2025-04-20
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,10 @@ function util.se6()
|
||||||
return mods["space-exploration"] and mods["space-exploration"] >= "0.6"
|
return mods["space-exploration"] and mods["space-exploration"] >= "0.6"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function util.k2()
|
||||||
|
return mods.Krastorio2 or mods["Krastorio2-spaced-out"]
|
||||||
|
end
|
||||||
|
|
||||||
util.cablesg = util.se6() and "electronic" or "cable"
|
util.cablesg = util.se6() and "electronic" or "cable"
|
||||||
|
|
||||||
function get_setting(name)
|
function get_setting(name)
|
||||||
|
|
@ -115,12 +119,9 @@ function util.fe_plus(sub)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function util.get_stack_size(default)
|
function util.get_stack_size(default)
|
||||||
if mods.Krastorio2 then
|
if util.k2() and kr_adjust_stack_sizes then
|
||||||
local size = get_setting("kr-stack-size")
|
return tonumber(200)
|
||||||
if size and tonumber(size) then
|
|
||||||
return tonumber(size)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return default
|
return default
|
||||||
end
|
end
|
||||||
|
|
@ -515,14 +516,16 @@ end
|
||||||
-- k2 matter
|
-- k2 matter
|
||||||
-- params: {k2matter}, k2baseicon , {icon}
|
-- params: {k2matter}, k2baseicon , {icon}
|
||||||
function util.k2matter(params)
|
function util.k2matter(params)
|
||||||
local matter = require("__Krastorio2__/lib/public/data-stages/matter-util")
|
local matter
|
||||||
|
if mods.Krastorio2 then
|
||||||
|
matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||||
|
else
|
||||||
|
matter = require("__Krastorio2-spaced-out__/prototypes/libraries/matter")
|
||||||
|
end
|
||||||
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 data.raw.technology[params.k2matter.unlocked_by] then
|
||||||
params.k2matter.minimum_conversion_quantity = 10
|
|
||||||
end
|
|
||||||
if not data.raw.technology[params.k2matter.unlocked_by_technology] 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 +537,7 @@ function util.k2matter(params)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
type = "technology",
|
type = "technology",
|
||||||
name = params.k2matter.unlocked_by_technology,
|
name = params.k2matter.unlocked_by,
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -561,15 +564,20 @@ function util.k2matter(params)
|
||||||
{
|
{
|
||||||
{"production-science-pack", 1},
|
{"production-science-pack", 1},
|
||||||
{"utility-science-pack", 1},
|
{"utility-science-pack", 1},
|
||||||
{"matter-tech-card", 1}
|
{"kr-matter-tech-card", 1}
|
||||||
},
|
},
|
||||||
time = 45,
|
time = 45,
|
||||||
},
|
},
|
||||||
|
effects = {}
|
||||||
-- (ignore for now) localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
-- (ignore for now) localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
matter.createMatterRecipe(params.k2matter)
|
if params.k2matter.only_deconversion then
|
||||||
|
matter.make_deconversion_recipe(params.k2matter)
|
||||||
|
else
|
||||||
|
matter.make_recipes(params.k2matter)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -580,8 +588,8 @@ function util.se_matter(params)
|
||||||
if not params.quant_in then params.quant_in = params.quant_out end
|
if not params.quant_in then params.quant_in = params.quant_out end
|
||||||
if not params.icon_size then params.icon_size = 64 end
|
if not params.icon_size then params.icon_size = 64 end
|
||||||
local fname = "matter-fusion-"..params.ore
|
local fname = "matter-fusion-"..params.ore
|
||||||
local sedata = mods.Krastorio2 and "se-kr-matter-synthesis-data" or "se-fusion-test-data"
|
local sedata = util.k2() and "se-kr-matter-synthesis-data" or "se-fusion-test-data"
|
||||||
local sejunk = mods.Krastorio2 and "se-broken-data" or "se-junk-data"
|
local sejunk = util.k2() and "se-broken-data" or "se-junk-data"
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
@ -618,7 +626,7 @@ function util.se_matter(params)
|
||||||
})
|
})
|
||||||
util.add_unlock("se-space-matter-fusion", fname)
|
util.add_unlock("se-space-matter-fusion", fname)
|
||||||
|
|
||||||
if mods.Krastorio2 then
|
if util.k2() then
|
||||||
local lname = params.ore.."-to-particle-stream"
|
local lname = params.ore.."-to-particle-stream"
|
||||||
data:extend({
|
data:extend({
|
||||||
enabled = false,
|
enabled = false,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bztin",
|
"name": "bztin",
|
||||||
"version": "2.1.13",
|
"version": "2.1.14",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"title": "Tin",
|
"title": "Tin",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
"? aai-industry",
|
"? aai-industry",
|
||||||
"? hot-metals",
|
"? hot-metals",
|
||||||
"? Krastorio2",
|
"? Krastorio2",
|
||||||
|
"? Krastorio2-spaced-out",
|
||||||
"? sand-and-glass",
|
"? sand-and-glass",
|
||||||
"? deadlock-beltboxes-loaders",
|
"? deadlock-beltboxes-loaders",
|
||||||
"? DeadlockCrating",
|
"? DeadlockCrating",
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ data:extend(
|
||||||
results =
|
results =
|
||||||
{
|
{
|
||||||
{type = "item", name = "enriched-tin", amount = 6},
|
{type = "item", name = "enriched-tin", amount = 6},
|
||||||
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
|
{type = "fluid", name = "kr-dirty-water", amount = 25, catalyst_amount = 25}
|
||||||
},
|
},
|
||||||
crafting_machine_tint =
|
crafting_machine_tint =
|
||||||
{
|
{
|
||||||
|
|
@ -67,28 +67,28 @@ data:extend(
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
always_show_products = true,
|
always_show_products = true,
|
||||||
allow_productivity = true,
|
allow_productivity = true,
|
||||||
ingredients = { {"enriched-tin", 5} },
|
ingredients = { util.item("enriched-tin", 5)},
|
||||||
results = { {"tin-plate", 5} },
|
results = { util.item("tin-plate", 5) },
|
||||||
order = "b[tin-plate]-b[enriched-tin-plate]",
|
order = "b[tin-plate]-b[enriched-tin-plate]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
name = "dirty-water-filtration-tin",
|
name = "dirty-water-filtration-tin",
|
||||||
category = "fluid-filtration",
|
category = "kr-fluid-filtration",
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
icon = data.raw.fluid["dirty-water"].icon,
|
icon = data.raw.fluid["kr-dirty-water"].icon,
|
||||||
icon_size = data.raw.fluid["dirty-water"].icon_size
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon = data.raw.item["tin-ore"].icon,
|
icon = data.raw.item["tin-ore"].icon,
|
||||||
icon_size = data.raw.item["tin-ore"].icon_size,
|
icon_size = data.raw.item["tin-ore"].icon_size,
|
||||||
scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["tin-ore"].icon_size),
|
scale = 0.20 * 64 / (data.raw.item["tin-ore"].icon_size or 64),
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon_size = data.raw.fluid["dirty-water"].icon_size,
|
icon_size = data.raw.fluid["kr-dirty-water"].icon_size,
|
||||||
energy_required = 2,
|
energy_required = 2,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
allow_as_intermediate = false,
|
allow_as_intermediate = false,
|
||||||
|
|
@ -96,7 +96,7 @@ data:extend(
|
||||||
always_show_products = true,
|
always_show_products = true,
|
||||||
ingredients =
|
ingredients =
|
||||||
{
|
{
|
||||||
{type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100},
|
{type = "fluid", name = "kr-dirty-water", amount = 100, catalyst_amount = 100},
|
||||||
},
|
},
|
||||||
results =
|
results =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,16 @@ if mods["Krastorio2"] then
|
||||||
local util = require("data-util");
|
local util = require("data-util");
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
item_name = "tin-ore",
|
material = {
|
||||||
matter_value = 5,
|
name = "tin-ore",
|
||||||
|
type = "item",
|
||||||
|
amount = 10,
|
||||||
|
},
|
||||||
|
matter_count = 5,
|
||||||
energy_required = 1,
|
energy_required = 1,
|
||||||
need_stabilizer = false,
|
need_stabilizer = false,
|
||||||
unlocked_by_technology = "tin-matter-processing",
|
allow_productivity = true,
|
||||||
|
unlocked_by = "tin-matter-processing",
|
||||||
},
|
},
|
||||||
k2baseicon = "stone",
|
k2baseicon = "stone",
|
||||||
icon = { icon = "__bztin__/graphics/icons/tin-ore.png", icon_size = 64, scale = 1.4}
|
icon = { icon = "__bztin__/graphics/icons/tin-ore.png", icon_size = 64, scale = 1.4}
|
||||||
|
|
@ -15,13 +20,17 @@ if mods["Krastorio2"] then
|
||||||
|
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
item_name = "tin-plate",
|
material = {
|
||||||
minimum_conversion_quantity = 10,
|
name = "tin-plate",
|
||||||
matter_value = 10,
|
type = "item",
|
||||||
energy_required = 3,
|
amount = 10,
|
||||||
|
},
|
||||||
|
matter_count = 7.5,
|
||||||
|
energy_required = 2,
|
||||||
only_deconversion = true,
|
only_deconversion = true,
|
||||||
|
allow_productivity = true,
|
||||||
need_stabilizer = true,
|
need_stabilizer = true,
|
||||||
unlocked_by_technology = "tin-matter-processing",
|
unlocked_by = "tin-matter-processing",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ end
|
||||||
util.add_ingredient("kr-fuel-refinery", "solder", 5)
|
util.add_ingredient("kr-fuel-refinery", "solder", 5)
|
||||||
util.add_ingredient("kr-electrolysis-plant", "solder", 10)
|
util.add_ingredient("kr-electrolysis-plant", "solder", 10)
|
||||||
util.replace_some_ingredient("kr-steel-pipe-to-ground", "steel-plate", 3, "solder", 8)
|
util.replace_some_ingredient("kr-steel-pipe-to-ground", "steel-plate", 3, "solder", 8)
|
||||||
util.replace_ingredient("kr-biomass-growing", "petroleum-gas", "organotins")
|
util.replace_ingredient("kr-biomass", "petroleum-gas", "organotins")
|
||||||
|
|
||||||
|
|
||||||
util.add_product("se-scrap-recycling", {type="item", name="tin-ore", amount=1, probability=0.05})
|
util.add_product("se-scrap-recycling", {type="item", name="tin-ore", amount=1, probability=0.05})
|
||||||
|
|
@ -166,8 +166,9 @@ if util.me.use_cable() then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- k2
|
-- k2
|
||||||
util.replace_ingredient("buisart-lab", "copper-cable", "tinned-cable")
|
util.replace_ingredient("kr-advanced-lab", "copper-cable", "tinned-cable")
|
||||||
util.replace_ingredient("energy-absorber", "copper-cable", "tinned-cable")
|
util.replace_ingredient("energy-absorber", "copper-cable", "tinned-cable")
|
||||||
|
util.add_ingredient("kr-mineral-water-pumpjack", "tinned-cable", 5)
|
||||||
end
|
end
|
||||||
|
|
||||||
if util.me.use_bronze() then
|
if util.me.use_bronze() then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue