Compare commits
9 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9df5d0fcc3 | ||
|
|
ceb4dfe657 | ||
|
|
4627a45cdb | ||
|
|
e11da23987 | ||
|
|
1a411368c5 | ||
|
|
99cab50b68 | ||
|
|
db3137985e | ||
|
|
04a1e986dd | ||
| 8db4982e5b |
10 changed files with 250 additions and 234 deletions
|
|
@ -1,4 +1,16 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 2.0.3
|
||||||
|
Date: 10.12.2025
|
||||||
|
Bug Fixes:
|
||||||
|
- Fix tech coal-liquefaction has no prereq with catalysis off
|
||||||
|
- Fix recipe name of blank-tech-card-silver
|
||||||
|
- Fix autoplace of rich-copper-ore
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 2.0.2
|
||||||
|
Date: 01.11.2025
|
||||||
|
Bug Fixes:
|
||||||
|
- Fix K2 matter integration (thanks pla)
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.0.1
|
Version: 2.0.1
|
||||||
Date: 21.10.2025
|
Date: 21.10.2025
|
||||||
Changes:
|
Changes:
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,12 @@ end
|
||||||
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.need_stabilizer = true
|
params.k2matter.needs_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_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"
|
||||||
|
|
@ -132,7 +132,7 @@ function util.k2matter(params)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
type = "technology",
|
type = "technology",
|
||||||
name = params.k2matter.unlocked_by_technology,
|
name = params.k2matter.unlocked_by,
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -163,12 +163,17 @@ function util.k2matter(params)
|
||||||
},
|
},
|
||||||
time = 45,
|
time = 45,
|
||||||
},
|
},
|
||||||
localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
effects = {},
|
||||||
|
-- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
if params.k2matter.only_deconversion then
|
||||||
|
matter.make_deconversion_recipe(params.k2matter)
|
||||||
|
else
|
||||||
matter.make_recipes(params.k2matter)
|
matter.make_recipes(params.k2matter)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- se matter
|
-- se matter
|
||||||
|
|
@ -1188,8 +1193,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
|
||||||
end
|
end
|
||||||
util.remove_prior_unlocks(tech, old)
|
util.remove_prior_unlocks(tech, old)
|
||||||
for i, recipe in pairs(data.raw.recipe) do
|
for i, recipe in pairs(data.raw.recipe) do
|
||||||
if (recipe.enabled and recipe.enabled ~= 'false')
|
if (recipe.enabled and recipe.enabled ~= false)
|
||||||
and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes
|
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 :(
|
and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :(
|
||||||
then
|
then
|
||||||
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|
|
-- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :|
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,5 @@ require("compatibility/248k")
|
||||||
|
|
||||||
local util = require("data-util");
|
local util = require("data-util");
|
||||||
|
|
||||||
if util.se6() then
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Must be last
|
-- Must be last
|
||||||
util.create_list()
|
util.create_list()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzgold2",
|
"name": "bzgold2",
|
||||||
"version": "2.0.1",
|
"version": "2.0.3",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"title": "Noble Metals",
|
"title": "Noble Metals",
|
||||||
"description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.",
|
"description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.",
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,31 @@
|
||||||
-- 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")
|
||||||
|
|
||||||
|
if not data.raw.recipe["kr-gold-ore-to-matter"] then
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
material = { type = "item", name = "gold-ore", amount = 30 },
|
material = { type = "item", name = "gold-ore", amount = 30 },
|
||||||
item_name = "gold-ore",
|
item_name = "gold-ore",
|
||||||
matter_count = 30,
|
matter_count = 30,
|
||||||
energy_required = 10,
|
energy_required = 10,
|
||||||
need_stabilizer = false,
|
needs_stabilizer = false,
|
||||||
unlocked_by_technology = "gold-matter-processing",
|
unlocked_by = "gold-matter-processing",
|
||||||
},
|
},
|
||||||
k2baseicon = "stone",
|
icon = { icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5 },
|
||||||
icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1}
|
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
if settings.startup["bzgold-silver"].value then
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
material = { type = "item", name = "silver-ore", amount = 8 },
|
material = { type = "item", name = "silver-ore", amount = 8 },
|
||||||
item_name = "silver-ore",
|
item_name = "silver-ore",
|
||||||
matter_count = 8,
|
matter_count = 8,
|
||||||
energy_required = 5,
|
energy_required = 5,
|
||||||
need_stabilizer = false,
|
needs_stabilizer = false,
|
||||||
unlocked_by_technology = "silver-matter-processing",
|
unlocked_by = "silver-matter-processing",
|
||||||
},
|
},
|
||||||
k2baseicon = "stone",
|
icon = { icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5 },
|
||||||
icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1}
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("data-util");
|
local util = require("data-util")
|
||||||
|
|
||||||
if mods.Krastorio2 then
|
if mods.Krastorio2 then
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ data:extend({
|
||||||
{
|
{
|
||||||
icon = data.raw.item["gold-ore"].icon,
|
icon = data.raw.item["gold-ore"].icon,
|
||||||
icon_size = data.raw.item["gold-ore"].icon_size,
|
icon_size = data.raw.item["gold-ore"].icon_size,
|
||||||
scale = 0.2,
|
scale = 0.2 * 64 / (data.raw.item["gold-ore"].icon_size or 64),
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("data-util");
|
local util = require("data-util")
|
||||||
|
|
||||||
if mods.Krastorio2 and util.me.silver() then
|
if mods.Krastorio2 and util.me.silver() then
|
||||||
data:extend({
|
data:extend({
|
||||||
|
|
@ -111,7 +111,7 @@ data:extend({
|
||||||
{
|
{
|
||||||
icon = data.raw.item["silver-ore"].icon,
|
icon = data.raw.item["silver-ore"].icon,
|
||||||
icon_size = data.raw.item["silver-ore"].icon_size,
|
icon_size = data.raw.item["silver-ore"].icon_size,
|
||||||
scale = 0.2,
|
scale = 0.2 * 64 / (data.raw.item["silver-ore"].icon_size or 64),
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ end
|
||||||
if mods.Krastorio2 and util.me.silver() then
|
if mods.Krastorio2 and util.me.silver() then
|
||||||
local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"])
|
local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"])
|
||||||
tc.name = "blank-tech-card-silver"
|
tc.name = "blank-tech-card-silver"
|
||||||
|
tc.localised_name = { "item-name.blank-tech-card" }
|
||||||
data:extend({tc})
|
data:extend({tc})
|
||||||
util.replace_ingredient("blank-tech-card-silver", "copper-cable", "silver-wire")
|
util.replace_ingredient("blank-tech-card-silver", "copper-cable", "silver-wire")
|
||||||
local amt = util.get_amount("kr-blank-tech-card")
|
local amt = util.get_amount("kr-blank-tech-card")
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ if mods.Krastorio2 then
|
||||||
util.set_main_product("rare-metals-1", "kr-rare-metals")
|
util.set_main_product("rare-metals-1", "kr-rare-metals")
|
||||||
util.set_main_product("rare-metals-2", "kr-rare-metals")
|
util.set_main_product("rare-metals-2", "kr-rare-metals")
|
||||||
|
|
||||||
|
|
||||||
if util.me.platinum() and util.me.palladium() then
|
if util.me.platinum() and util.me.palladium() then
|
||||||
util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "platinum-powder", 2, { force = true })
|
util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "platinum-powder", 2, { force = true })
|
||||||
util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "palladium-powder", 2, { force = true })
|
util.replace_some_product("rare-metals-1", "kr-rare-metals", 2, "palladium-powder", 2, { force = true })
|
||||||
|
|
@ -74,18 +73,17 @@ elseif util.me.palladium() then
|
||||||
{ type = "item", name = "copper-plate", amount = 2, probability = 0.75 },
|
{ type = "item", name = "copper-plate", amount = 2, probability = 0.75 },
|
||||||
{ type = "item", name = "palladium-powder", amount = 1, probability = 0.5 },
|
{ type = "item", name = "palladium-powder", amount = 1, probability = 0.5 },
|
||||||
}
|
}
|
||||||
else -- should never happen
|
else
|
||||||
|
-- should never happen
|
||||||
results = {
|
results = {
|
||||||
{ type = "item", name = "copper-plate", amount = 2 },
|
{ type = "item", name = "copper-plate", amount = 2 },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if data.raw.resource["copper-ore"] then
|
if data.raw.resource["copper-ore"] then
|
||||||
if mods["space-exploration"] then
|
if mods["space-exploration"] then
|
||||||
-- decrease richness of copper a bit (ok if it stacks with aluminum)
|
-- decrease richness of copper a bit (ok if it stacks with aluminum)
|
||||||
data.raw.resource["copper-ore"].autoplace.richness_expression =
|
data.raw.resource["copper-ore"].autoplace.richness_expression = data.raw.resource["copper-ore"].autoplace.richness_expression .. "*(3/4)"
|
||||||
data.raw.resource["copper-ore"].autoplace.richness_expression .. "*(3/4)"
|
|
||||||
else
|
else
|
||||||
log("Replacing vanilla copper-ore autoplace")
|
log("Replacing vanilla copper-ore autoplace")
|
||||||
local resource_autoplace = require('resource-autoplace');
|
local resource_autoplace = require('resource-autoplace');
|
||||||
|
|
@ -102,6 +100,7 @@ if data.raw.resource["copper-ore"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
if util.se6() then
|
if util.se6() then
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["rich-copper-ore"] = {}
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "autoplace-control",
|
type = "autoplace-control",
|
||||||
|
|
@ -113,6 +112,9 @@ if util.se6() then
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["rich-copper-ore"] = {}
|
||||||
|
resource_autoplace.initialize_patch_set("rich-copper-ore", true)
|
||||||
|
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "resource",
|
type = "resource",
|
||||||
|
|
@ -124,8 +126,7 @@ data:extend({
|
||||||
map_color = { r = 0.9, g = 0.5, b = 0.4 },
|
map_color = { r = 0.9, g = 0.5, b = 0.4 },
|
||||||
tree_removal_probability = 0.7,
|
tree_removal_probability = 0.7,
|
||||||
tree_removal_max_distance = 32 * 32,
|
tree_removal_max_distance = 32 * 32,
|
||||||
minable =
|
minable = {
|
||||||
{
|
|
||||||
hardness = 1,
|
hardness = 1,
|
||||||
mining_particle = "copper-ore-particle",
|
mining_particle = "copper-ore-particle",
|
||||||
mining_time = 1,
|
mining_time = 1,
|
||||||
|
|
@ -148,10 +149,8 @@ data:extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 },
|
stage_counts = { 15000, 9500, 5500, 2900, 1300, 400, 150, 80 },
|
||||||
stages =
|
stages = {
|
||||||
{
|
sheet = {
|
||||||
sheet =
|
|
||||||
{
|
|
||||||
filename = "__bzgold2__/graphics/entity/ores/hr-rich-copper-ore.png",
|
filename = "__bzgold2__/graphics/entity/ores/hr-rich-copper-ore.png",
|
||||||
priority = "extra-high",
|
priority = "extra-high",
|
||||||
size = 128,
|
size = 128,
|
||||||
|
|
@ -178,7 +177,6 @@ data:extend({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "recipe",
|
type = "recipe",
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ end
|
||||||
util.add_unlock("processing-unit", "cpu")
|
util.add_unlock("processing-unit", "cpu")
|
||||||
util.add_unlock("processing-unit", "mainboard")
|
util.add_unlock("processing-unit", "mainboard")
|
||||||
|
|
||||||
|
if settings.startup["bzgold-catalysis"].value == true then
|
||||||
util.add_prerequisite("coal-liquefaction", "catalysis")
|
util.add_prerequisite("coal-liquefaction", "catalysis")
|
||||||
util.remove_prerequisite("coal-liquefaction", "production-science-pack")
|
util.remove_prerequisite("coal-liquefaction", "production-science-pack")
|
||||||
util.remove_prerequisite("coal-liquefaction", "advanced-oil-processing")
|
util.remove_prerequisite("coal-liquefaction", "advanced-oil-processing")
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue