forked from cacklingfiend/bztungsten2
Compare commits
5 commits
bf7d7df599
...
f0061c6a7f
| Author | SHA1 | Date | |
|---|---|---|---|
| f0061c6a7f | |||
|
|
46bcd93aea | ||
|
|
720fba8be7 | ||
|
|
75d607652d | ||
|
|
0e98d24361 |
7 changed files with 83 additions and 98 deletions
|
|
@ -1,4 +1,10 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.2
|
||||
Date: 02.11.2025
|
||||
Bug Fixes:
|
||||
- Change "optics" to "lamp" to respect the Factorio 2.0 renaming
|
||||
- Remove duplicate pumpjack technology
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.1
|
||||
Date: 21.10.2025
|
||||
Changes:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ end
|
|||
|
||||
|
||||
-- SE + K2: Keep radar at red science level
|
||||
util.remove_prerequisite("kr-radar", "optics")
|
||||
util.remove_prerequisite("kr-radar", "lamp")
|
||||
util.add_prerequisite("kr-radar", "electricity")
|
||||
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ util.add_ingredient("omt-electric-mining-drill", "tungsten-carbide", 10)
|
|||
|
||||
|
||||
-- Junk Trains, no optics:
|
||||
util.remove_prerequisite("automated-scrap-rail-transportation", "optics")
|
||||
util.remove_prerequisite("automated-scrap-rail-transportation", "lamp")
|
||||
util.remove_ingredient("train-stop-scrap", "small-lamp")
|
||||
util.remove_ingredient("rail-signal-scrap", "small-lamp")
|
||||
util.remove_ingredient("rail-chain-signal-scrap", "small-lamp")
|
||||
|
|
|
|||
|
|
@ -109,65 +109,65 @@ function util.se_landfill(params)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
-- k2 matter
|
||||
-- k2 matter
|
||||
-- params: {k2matter}, k2baseicon , {icon}
|
||||
function util.k2matter(params)
|
||||
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||
if mods["space-exploration"] then
|
||||
params.k2matter.need_stabilizer = true
|
||||
if mods["space-exploration"] then
|
||||
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"
|
||||
icon = util.k2assets() .. "/technologies/matter-" .. params.k2baseicon .. ".png"
|
||||
else
|
||||
icon = util.k2assets().."/technologies/backgrounds/matter.png"
|
||||
icon = util.k2assets() .. "/technologies/backgrounds/matter.png"
|
||||
end
|
||||
|
||||
data:extend(
|
||||
{
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = params.k2matter.unlocked_by,
|
||||
icons = {
|
||||
{
|
||||
type = "technology",
|
||||
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}},
|
||||
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,
|
||||
},
|
||||
effects = {},
|
||||
-- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
||||
},
|
||||
})
|
||||
end
|
||||
matter.make_recipes(params.k2matter)
|
||||
if params.k2matter.only_deconversion then
|
||||
matter.make_deconversion_recipe(params.k2matter)
|
||||
else
|
||||
matter.make_recipes(params.k2matter)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -1193,8 +1193,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
|
|||
end
|
||||
util.remove_prior_unlocks(tech, old)
|
||||
for i, recipe in pairs(data.raw.recipe) do
|
||||
if (recipe.enabled and recipe.enabled ~= 'false')
|
||||
and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes
|
||||
if (recipe.enabled and recipe.enabled ~= false)
|
||||
and (not recipe.hidden or recipe.hidden == true) -- probably don't want to change hidden recipes
|
||||
and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :(
|
||||
then
|
||||
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bztungsten2",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"factorio_version": "2.0",
|
||||
"title": "Tungsten",
|
||||
"description": "Adds tungsten ore (wolframite), tungsten plates, tungsten carbide and rocket engine nozzles to the base game.",
|
||||
|
|
|
|||
|
|
@ -1,22 +1,32 @@
|
|||
-- Matter recipes for Krastorio2
|
||||
if mods["Krastorio2"] then
|
||||
local util = require("data-util");
|
||||
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||
local util = require("data-util")
|
||||
|
||||
matter.make_recipes({
|
||||
material = { type = "item", name = "tungsten-ore", amount = 1 },
|
||||
util.k2matter({
|
||||
k2matter = {
|
||||
material = { type = "item", name = "tungsten-ore", amount = 30 },
|
||||
item_name = "tungsten-ore",
|
||||
matter_count = 6,
|
||||
energy_required = 1,
|
||||
need_stabilizer = false,
|
||||
unlocked_by_technology = "tungsten-matter-processing",
|
||||
icon = {icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", icon_size = 64, scale = 1.25}
|
||||
needs_stabilizer = false,
|
||||
unlocked_by = "tungsten-matter-processing",
|
||||
},
|
||||
icon = {
|
||||
icon = "__bztungsten2__/graphics/icons/tungsten-ore.png",
|
||||
icon_size = 64,
|
||||
scale = 1
|
||||
},
|
||||
})
|
||||
|
||||
matter.make_recipes({
|
||||
material = { type = "item", name = "tungsten-plate", amount = 1 },
|
||||
util.k2matter({
|
||||
k2matter = {
|
||||
material = { type = "item", name = "tungsten-plate", amount = 10 },
|
||||
item_name = "tungsten-plate",
|
||||
matter_count = 10,
|
||||
energy_required = 2,
|
||||
need_stabilizer = false,
|
||||
unlocked_by_technology = "tungsten-matter-processing",
|
||||
only_deconversion = true,
|
||||
needs_stabilizer = true,
|
||||
unlocked_by = "tungsten-matter-processing",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ local cuw = "tungsten-plate"
|
|||
if util.me.cuw() then cuw = "cuw" end
|
||||
|
||||
-- Lamps
|
||||
util.add_prerequisite("optics", util.me.tungsten_processing)
|
||||
util.set_tech_recipe("optics", {{"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||
util.add_prerequisite("lamp", util.me.tungsten_processing)
|
||||
util.set_tech_recipe("lamp", {{"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||
util.add_ingredient("small-lamp", "tungsten-plate", 1)
|
||||
|
||||
-- Rail signals use lamps
|
||||
util.add_prerequisite("rail-signals", "optics")
|
||||
util.add_prerequisite("rail-signals", "lamp")
|
||||
util.add_ingredient("rail-signal", "small-lamp", 1)
|
||||
util.add_ingredient("rail-chain-signal", "small-lamp", 1)
|
||||
|
||||
|
|
@ -104,14 +104,14 @@ util.add_ingredient("deadlock-floor-lamp", "tungsten-plate", 2)
|
|||
if mods["Krastorio2"] then
|
||||
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("optics", {{"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}})
|
||||
-- TODO: Fix
|
||||
--util.set_tech_recipe("oil-processing", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||
util.set_tech_recipe("plastics", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||
if util.me.get_setting("bztungsten-avoid-military") == "yes" then
|
||||
util.set_tech_recipe("rocketry", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}})
|
||||
end
|
||||
util.remove_prerequisite("kr-sentinel", "optics")
|
||||
util.remove_prerequisite("kr-sentinel", "lamp")
|
||||
|
||||
|
||||
util.add_prerequisite(util.me.tungsten_processing, "kr-mineral-water-gathering")
|
||||
|
|
@ -453,7 +453,7 @@ util.add_ingredient("simply-power-armor-mk3", "tungsten-plate", 20)
|
|||
|
||||
|
||||
-- Cargo Ships
|
||||
util.add_prerequisite("water_transport_signals", "optics")
|
||||
util.add_prerequisite("water_transport_signals", "lamp")
|
||||
util.add_ingredient("buoy", "small-lamp", 1)
|
||||
util.add_ingredient("chain_buoy", "small-lamp", 1)
|
||||
util.add_ingredient("oil_rig", "tungsten-carbide", 5)
|
||||
|
|
|
|||
|
|
@ -101,37 +101,6 @@ data:extend({
|
|||
} or nil,
|
||||
})
|
||||
|
||||
if mods["aai-industry"] and not data.raw.technology["pumpjack"] then
|
||||
data:extend({
|
||||
{
|
||||
type = "technology",
|
||||
name = "pumpjack",
|
||||
icons = {
|
||||
{ icon = data.raw.technology["oil-processing"].icon, icon_size=data.raw.technology["oil-processing"].icon_size },
|
||||
},
|
||||
effects =
|
||||
{
|
||||
{
|
||||
type = "unlock-recipe",
|
||||
recipe = "pumpjack",
|
||||
},
|
||||
},
|
||||
unit =
|
||||
{
|
||||
count = 25,
|
||||
ingredients =
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
{"logistic-science-pack", 1}
|
||||
},
|
||||
time = 30,
|
||||
},
|
||||
prerequisites = {"fluid-handling"},
|
||||
order = "b-b",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue