This commit is contained in:
Brevven 2024-12-28 22:06:18 -08:00
parent aab4cb07cc
commit d2d5652978
4 changed files with 20 additions and 3 deletions

View file

@ -1,4 +1,9 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 2.0.2
Date: 2024-12-28
Changes:
- Compatible with Tenebris
---------------------------------------------------------------------------------------------------
Version: 2.0.1 Version: 2.0.1
Date: 2024-12-28 Date: 2024-12-28
Fixes: Fixes:

View file

@ -96,15 +96,22 @@ function util.warptorio2_expansion_helper()
end end
function util.ore_fix() function util.ore_fix()
ore_fix("nauvis")
if game.surfaces.tenebris then
ore_fix("tenebris")
end
end
function ore_fix(surface_name)
for _, resource in pairs(me.resources) do for _, resource in pairs(me.resources) do
local map_gen_settings = game.surfaces.nauvis.map_gen_settings local map_gen_settings = game.surfaces[surface_name].map_gen_settings
if map_gen_settings.autoplace_controls[resource] == nil then if map_gen_settings.autoplace_controls[resource] == nil then
map_gen_settings.autoplace_controls[resource] = {} map_gen_settings.autoplace_controls[resource] = {}
end end
if map_gen_settings.autoplace_settings.entity.settings[resource] == nil then if map_gen_settings.autoplace_settings.entity.settings[resource] == nil then
map_gen_settings.autoplace_settings.entity.settings[resource] = {} map_gen_settings.autoplace_settings.entity.settings[resource] = {}
end end
game.surfaces.nauvis.map_gen_settings = map_gen_settings game.surfaces[surface_name].map_gen_settings = map_gen_settings
end end
end end

View file

@ -1,6 +1,6 @@
{ {
"name": "bzlead", "name": "bzlead",
"version": "2.0.1", "version": "2.0.2",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "Lead", "title": "Lead",
"author": "Brevven", "author": "Brevven",
@ -14,6 +14,7 @@
"? Krastorio2", "? Krastorio2",
"? Rich-Rocks-Requiem", "? Rich-Rocks-Requiem",
"? 248k", "? 248k",
"? tenebris",
"? deadlock-beltboxes-loaders", "? deadlock-beltboxes-loaders",
"? DeadlockCrating" "? DeadlockCrating"
], ],

View file

@ -6,6 +6,10 @@ data.raw.planet.nauvis.map_gen_settings.autoplace_controls["lead-ore"] = {}
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["lead-ore"] = {} data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["lead-ore"] = {}
resource_autoplace.initialize_patch_set("lead-ore", true) resource_autoplace.initialize_patch_set("lead-ore", true)
if mods.tenebris then
data.raw.planet.tenebris.map_gen_settings.autoplace_controls["lead-ore"] = {}
data.raw.planet.tenebris.map_gen_settings.autoplace_settings.entity.settings["lead-ore"] = {}
end
data:extend({ data:extend({