From bcf3c766a9cd3950ebfb0b01c6f7a87c50af9d15 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sat, 5 Jul 2025 18:08:57 +0200 Subject: [PATCH] Fix collision masks --- Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua | 3 ++- .../prototypes/compound_entities/hidden_entities.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua index 720cfda..fa94688 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua @@ -1,3 +1,4 @@ +local default_masks = require("collision-mask-defaults") local BioInd = require('common')('Bio_Industries_2') --[[ @@ -65,7 +66,7 @@ for id, prototype in pairs(data.raw.tree) do end tree.max_health = math.floor(50 * i/TREE_LEVELS) tree.flags = {"placeable-neutral", "breaths-air"} - tree.collision_mask = {"item-layer", "object-layer", "player-layer", "water-tile", "layer-13"} + tree.collision_mask = table.deepcopy(default_masks["tree"]) tree.autoplace = nil tree.selection_box = { {-0.9/TREE_LEVELS * i, -2.2/TREE_LEVELS * i}, diff --git a/Bio_Industries_2/prototypes/compound_entities/hidden_entities.lua b/Bio_Industries_2/prototypes/compound_entities/hidden_entities.lua index 78b48d6..aca6388 100644 --- a/Bio_Industries_2/prototypes/compound_entities/hidden_entities.lua +++ b/Bio_Industries_2/prototypes/compound_entities/hidden_entities.lua @@ -35,7 +35,7 @@ if not BioInd.is_debug then table.insert(BI.hidden_entities.flags, "not-selectable-in-game") end -BI.hidden_entities.collision_mask = BioInd.is_debug and {"ground-tile"} or {} +BI.hidden_entities.collision_mask = nil BI.hidden_entities.collision_box = {{0, 0}, {0, 0}} BI.hidden_entities.selection_box = BioInd.is_debug and {{-0.5, -0.5}, {0.5, 0.5}} or