Fix collision masks

This commit is contained in:
Simon Brodtmann 2025-07-05 18:08:57 +02:00
parent 66f7c41e0f
commit bcf3c766a9
2 changed files with 3 additions and 2 deletions

View file

@ -1,3 +1,4 @@
local default_masks = require("collision-mask-defaults")
local BioInd = require('common')('Bio_Industries_2') local BioInd = require('common')('Bio_Industries_2')
--[[ --[[
@ -65,7 +66,7 @@ for id, prototype in pairs(data.raw.tree) do
end end
tree.max_health = math.floor(50 * i/TREE_LEVELS) tree.max_health = math.floor(50 * i/TREE_LEVELS)
tree.flags = {"placeable-neutral", "breaths-air"} 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.autoplace = nil
tree.selection_box = { tree.selection_box = {
{-0.9/TREE_LEVELS * i, -2.2/TREE_LEVELS * i}, {-0.9/TREE_LEVELS * i, -2.2/TREE_LEVELS * i},

View file

@ -35,7 +35,7 @@ if not BioInd.is_debug then
table.insert(BI.hidden_entities.flags, "not-selectable-in-game") table.insert(BI.hidden_entities.flags, "not-selectable-in-game")
end 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.collision_box = {{0, 0}, {0, 0}}
BI.hidden_entities.selection_box = BioInd.is_debug and BI.hidden_entities.selection_box = BioInd.is_debug and
{{-0.5, -0.5}, {0.5, 0.5}} or {{-0.5, -0.5}, {0.5, 0.5}} or