From c4ad996a8dc7a73520dda5d87cde285c73a2d474 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 28 Dec 2024 22:08:38 -0800 Subject: [PATCH] tenebris --- changelog.txt | 5 +++++ control-util.lua | 11 +++++++++-- info.json | 3 ++- titanium-ore.lua | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 7882a6f..c6674aa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.9 +Date: 2024-12-28 + Changes: + - Compatible with Tenebris +--------------------------------------------------------------------------------------------------- Version: 2.0.8 Date: 2024-12-28 Fixes: diff --git a/control-util.lua b/control-util.lua index 1b9f33b..55c6b0b 100644 --- a/control-util.lua +++ b/control-util.lua @@ -96,15 +96,22 @@ function util.warptorio2_expansion_helper() end 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 - 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 map_gen_settings.autoplace_controls[resource] = {} end if map_gen_settings.autoplace_settings.entity.settings[resource] == nil then map_gen_settings.autoplace_settings.entity.settings[resource] = {} end - game.surfaces.nauvis.map_gen_settings = map_gen_settings + game.surfaces[surface_name].map_gen_settings = map_gen_settings end end diff --git a/info.json b/info.json index 2ae4dd8..4ccd133 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "2.0.8", + "version": "2.0.9", "factorio_version": "2.0", "title": "Titanium", "author": "Brevven", @@ -21,6 +21,7 @@ "? EndgameCombat", "(?) Power Armor MK3", "? 248k", + "? tenebris", "(?) atan-nuclear-science", "! nullius" ], diff --git a/titanium-ore.lua b/titanium-ore.lua index 8f3c0a4..e0b3622 100644 --- a/titanium-ore.lua +++ b/titanium-ore.lua @@ -8,6 +8,11 @@ end data.raw.planet.nauvis.map_gen_settings.autoplace_controls["titanium-ore"] = {} data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["titanium-ore"] = {} +if mods.tenebris then + data.raw.planet.tenebris.map_gen_settings.autoplace_controls["titanium-ore"] = {} + data.raw.planet.tenebris.map_gen_settings.autoplace_settings.entity.settings["titanium-ore"] = {} +end + if (not mods["pyrawores"]) then data:extend({ {