From 952b0280bf023c18ed1f551c7dfe4c410fdc3f7e Mon Sep 17 00:00:00 2001 From: Brevven Date: Wed, 8 Jan 2025 19:29:24 -0800 Subject: [PATCH] up --- data-util.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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")