Compare commits

..

No commits in common. "main" and "2.0.2" have entirely different histories.
main ... 2.0.2

6 changed files with 89 additions and 97 deletions

View file

@ -1,15 +1,4 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 2.0.4
Date: 14.11.2025
Bug Fixes:
- Fix deadlock stacking, remove crating
---------------------------------------------------------------------------------------------------
Version: 2.0.3
Date: 05.11.2025
Bug Fixes:
- Fix K2 matter integration (thanks pla)
- Fixes after breaking change for mineral water in K2 (pla)
---------------------------------------------------------------------------------------------------
Version: 2.0.2 Version: 2.0.2
Date: 02.11.2025 Date: 02.11.2025
Bug Fixes: Bug Fixes:

View file

@ -109,65 +109,65 @@ function util.se_landfill(params)
end end
end 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__/prototypes/libraries/matter") local matter = require("__Krastorio2__/prototypes/libraries/matter")
if mods["space-exploration"] then if mods["space-exploration"] then
params.k2matter.needs_stabilizer = true params.k2matter.need_stabilizer = true
end end
if not params.k2matter.minimum_conversion_quantity then if not params.k2matter.minimum_conversion_quantity then
params.k2matter.minimum_conversion_quantity = 10 params.k2matter.minimum_conversion_quantity = 10
end end
if not data.raw.technology[params.k2matter.unlocked_by] then 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"
else else
icon = util.k2assets() .. "/technologies/backgrounds/matter.png" icon = util.k2assets().."/technologies/backgrounds/matter.png"
end end
data:extend({ data:extend(
{ {
type = "technology",
name = params.k2matter.unlocked_by,
icons = {
{ {
icon = icon, type = "technology",
icon_size = 256, name = params.k2matter.unlocked_by_technology,
icons =
{
{
icon = icon,
icon_size = 256,
},
params.icon,
},
prerequisites = {"kr-matter-processing"},
unit =
{
count = 350,
ingredients = mods["space-exploration"] and
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"se-astronomic-science-pack-4", 1},
{"se-energy-science-pack-4", 1},
{"se-material-science-pack-4", 1},
{"se-deep-space-science-pack-2", 1},
{"se-kr-matter-science-pack-2", 1},
} or
{
{"production-science-pack", 1},
{"utility-science-pack", 1},
{"kr-matter-tech-card", 1}
},
time = 45,
},
localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
}, },
params.icon, })
},
prerequisites = { "kr-matter-processing" },
unit = {
count = 350,
ingredients = mods["space-exploration"] and {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "se-astronomic-science-pack-4", 1 },
{ "se-energy-science-pack-4", 1 },
{ "se-material-science-pack-4", 1 },
{ "se-deep-space-science-pack-2", 1 },
{ "se-kr-matter-science-pack-2", 1 },
} or {
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 },
{ "kr-matter-tech-card", 1 },
},
time = 45,
},
effects = {},
-- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
},
})
end end
if params.k2matter.only_deconversion then matter.make_recipes(params.k2matter)
matter.make_deconversion_recipe(params.k2matter)
else
matter.make_recipes(params.k2matter)
end
end end

View file

@ -1,6 +1,6 @@
{ {
"name": "bztungsten2", "name": "bztungsten2",
"version": "2.0.4", "version": "2.0.2",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "Tungsten", "title": "Tungsten",
"description": "Adds tungsten ore (wolframite), tungsten plates, tungsten carbide and rocket engine nozzles to the base game.", "description": "Adds tungsten ore (wolframite), tungsten plates, tungsten carbide and rocket engine nozzles to the base game.",

View file

@ -1,32 +1,22 @@
-- 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")
util.k2matter({ matter.make_recipes({
k2matter = { material = { type = "item", name = "tungsten-ore", amount = 1 },
material = { type = "item", name = "tungsten-ore", amount = 30 },
item_name = "tungsten-ore",
matter_count = 6, matter_count = 6,
energy_required = 1, energy_required = 1,
needs_stabilizer = false, need_stabilizer = false,
unlocked_by = "tungsten-matter-processing", unlocked_by_technology = "tungsten-matter-processing",
}, icon = {icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", icon_size = 64, scale = 1.25}
icon = {
icon = "__bztungsten2__/graphics/icons/tungsten-ore.png",
icon_size = 64,
scale = 1
},
}) })
util.k2matter({ matter.make_recipes({
k2matter = { material = { type = "item", name = "tungsten-plate", amount = 1 },
material = { type = "item", name = "tungsten-plate", amount = 10 },
item_name = "tungsten-plate",
matter_count = 10, matter_count = 10,
energy_required = 2, energy_required = 2,
only_deconversion = true, need_stabilizer = false,
needs_stabilizer = true, unlocked_by_technology = "tungsten-matter-processing",
unlocked_by = "tungsten-matter-processing",
},
}) })
end end

View file

@ -2,21 +2,42 @@
local util = require("data-util"); local util = require("data-util");
if deadlock_stacking then if deadlock then
deadlock_stacking.create("tungsten-ore", "__bztungsten2__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64) deadlock.add_stack("tungsten-ore", "__bztungsten2__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64)
deadlock_stacking.create("tungsten-plate", "__bztungsten2__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128) deadlock.add_stack("tungsten-plate", "__bztungsten2__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128)
deadlock_stacking.create("tungsten-carbide", "__bztungsten2__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128) deadlock.add_stack("tungsten-carbide", "__bztungsten2__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128)
deadlock_stacking.create("rocket-engine-nozzle", "__bztungsten2__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128) deadlock.add_stack("rocket-engine-nozzle", "__bztungsten2__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128)
if mods["Krastorio2"] then if mods["Krastorio2"] then
deadlock_stacking.create("enriched-tungsten", "__bztungsten2__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64) deadlock.add_stack("enriched-tungsten", "__bztungsten2__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64)
end end
if data.raw.item["tungsten-ingot"] then if data.raw.item["tungsten-ingot"] then
deadlock_stacking.create("tungsten-ingot", nil, "deadlock-stacking-2", nil) deadlock.add_stack("tungsten-ingot", nil, "deadlock-stacking-2", nil)
end end
if util.me.cuw() then if util.me.cuw() then
deadlock_stacking.create("cuw", "__bztungsten2__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128) deadlock.add_stack("cuw", "__bztungsten2__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128)
end end
if data.raw.item["tungsten-powder"] then if data.raw.item["tungsten-powder"] then
deadlock_stacking.create("tungsten-powder", nil, "deadlock-stacking-2", nil) deadlock.add_stack("tungsten-powder", nil, "deadlock-stacking-2", nil)
end end
end end
-- Deadlock crating recipes
if deadlock_crating then
deadlock_crating.add_crate("tungsten-ore", "deadlock-crating-2")
deadlock_crating.add_crate("tungsten-plate", "deadlock-crating-2")
deadlock_crating.add_crate("tungsten-carbide", "deadlock-crating-2")
deadlock_crating.add_crate("rocket-engine-nozzle", "deadlock-crating-2")
if mods["Krastorio2"] then
deadlock_crating.add_crate("enriched-tungsten", "deadlock-crating-2")
end
if data.raw.item["tungsten-ingot"] then
deadlock_crating.add_crate("tungsten-ingot", "deadlock-crating-2")
end
if util.me.cuw() then
deadlock_crating.add_crate("cuw", "deadlock-crating-2")
end
if data.raw.item["tungsten-powder"] then
deadlock_crating.add_crate("tungsten-powder", "deadlock-crating-2")
end
end

View file

@ -1,4 +1,4 @@
local util = require("data-util") local util = require("data-util");
local cuw = "tungsten-plate" local cuw = "tungsten-plate"
if util.me.cuw() then cuw = "cuw" end if util.me.cuw() then cuw = "cuw" end
@ -102,14 +102,6 @@ util.add_ingredient("deadlock-floor-lamp", "tungsten-plate", 2)
---- K2 ---- K2
if mods["Krastorio2"] then if mods["Krastorio2"] then
util.remove_prerequisite("kr-mineral-water-gathering", "chemical-science-pack")
util.add_prerequisite("kr-mineral-water-gathering", "kr-fluids-chemistry")
util.add_prerequisite("kr-mineral-water-gathering", "logistic-science-pack")
util.set_tech_recipe(
"kr-mineral-water-gathering",
{ { "kr-basic-tech-card", 1 }, { "automation-science-pack", 1 }, { "logistic-science-pack", 1 } }
)
util.set_tech_recipe("engine", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) util.set_tech_recipe("engine", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
util.set_tech_recipe("fluid-handling", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) util.set_tech_recipe("fluid-handling", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
util.set_tech_recipe("lamp", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) util.set_tech_recipe("lamp", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})