diff --git a/changelog.txt b/changelog.txt index c486a28..a9e2e6c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.5 +Date: 2025-01-07 + Fixes: + - Improve some mod compatibility +--------------------------------------------------------------------------------------------------- Version: 2.0.4 Date: 2025-01-06 Fixes: diff --git a/data-util.lua b/data-util.lua index ff639ad..788a86e 100644 --- a/data-util.lua +++ b/data-util.lua @@ -119,7 +119,12 @@ end -- Add the gleba rock. If it exists, still add resource to mine from it function util.add_gleba_rock(resource, amount_min, amount_max) - if not data.raw.planet.gleba then return end + if (not data.raw.planet.gleba or + not data.raw.planet.gleba.map_gen_settings or -- attempted compatibility fixes + not data.raw.planet.gleba.map_gen_settings.autoplace_settings or + not data.raw.planet.gleba.map_gen_settings.autoplace_settings.entity or + not data.raw.planet.gleba.map_gen_settings.autoplace_settings.entity.settings + ) then return end if not data.raw["simple-entity"]["gleba-rock"] then local autoplace_utils = require("autoplace_utils") local hit_effects = require ("__base__.prototypes.entity.hit-effects") diff --git a/info.json b/info.json index 58828e5..f79d664 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "2.0.4", + "version": "2.0.5", "factorio_version": "2.0", "title": "Tin", "author": "Brevven", diff --git a/tin-recipe-final-stacking.lua b/tin-recipe-final-stacking.lua index 5bf1889..9df36a0 100644 --- a/tin-recipe-final-stacking.lua +++ b/tin-recipe-final-stacking.lua @@ -2,7 +2,7 @@ local util = require("data-util"); -if deadlock then +if deadlock and deadlock["add_stack"] then deadlock.add_stack("tin-ore", "__bztin__/graphics/icons/stacked/tin-ore-stacked.png", "deadlock-stacking-1", 64) deadlock.add_stack("tin-plate", "__bztin__/graphics/icons/stacked/tin-plate-stacked.png", "deadlock-stacking-1", 128) deadlock.add_stack("solder", "__bztin__/graphics/icons/stacked/solder-stacked.png", "deadlock-stacking-1", 128)