Page 1 of 1

Make EntityPrototype.tile_buildability_rules also search entity collision masks

Posted: Fri Dec 19, 2025 6:51 am
by protocol_1903
As in title, tile_buildability rules should support all collision mask sources and not just tiles. This would be really nice for creating things like wind turbines that can't be in a certain distance from other wind turbines but other entities can be nearby.

Re: Make EntityPrototype.tile_buildability_rules also search entity collision masks

Posted: Sat Dec 20, 2025 5:09 pm
by Osmo
Not sure if this would be fitting for tile buildability rules, but having a similar way to restrict placement based on entities around would be handy, especially for showing the valid placement spots to the user as highlighting entities green/red based on cursor position isn't something mods can do

Re: Make EntityPrototype.tile_buildability_rules also search entity collision masks

Posted: Sat Dec 20, 2025 9:36 pm
by protocol_1903
Osmo wrote: Sat Dec 20, 2025 5:09 pm Not sure if this would be fitting for tile buildability rules, but having a similar way to restrict placement based on entities around would be handy, especially for showing the valid placement spots to the user as highlighting entities green/red based on cursor position isn't something mods can do
Rather, I think it should be renamed to something like buildability_rules and cover both cases. Or add entity_buildability_rules but checking collision layers twice seems excessive.