I need to prevent placement of certain entities in certain surfaces. For now, I have a placement cancelling logic which directly mines the entity if it is prohibited there. But it is still colored green in the cursor.
Applying collision masks on these entities and some tiles wouldn't work because when using concrete or other floors, placement is (dis)allowed either on all or none surfaces.
So what I would need, to not copy all existing tiles with custom collision masks, is
a) that collision masks of hidden tiles are also applied to placement logic
or b) that whole surfaces can have a collision mask.
Collision masks for whole surfaces OR collision mask of hidden tiles
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Collision masks for whole surfaces OR collision mask of hidden tiles
Something along this line might be in 2.0, as you can't build certain entities on space platforms. Although this may be a simple allow in space boolean, but if that's the case I would hope we can ask them to change it.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Collision masks for whole surfaces OR collision mask of hidden tiles
You can take a look at how Space Exploration solved this, which, I believe, is done via collisions on ground tiles. Space-only building collide with all natural ground tiles, land-only buildings collide with the space platform tile. Obviously, this wont help you in case some ground tiles are used on surfaces with different building restrictions, although a bit of duplication in the data stage probably can work around that (which could get messy if you need to touch the chunk generation - or replace them afterwards in on_chunk_generated).
Re: Collision masks for whole surfaces OR collision mask of hidden tiles
Yeah I know how it is done there, but in SE you can't place concrete or other floor tiles in space which makes it a lot easierNidan wrote: ↑Sun May 12, 2024 4:13 pmYou can take a look at how Space Exploration solved this, which, I believe, is done via collisions on ground tiles. Space-only building collide with all natural ground tiles, land-only buildings collide with the space platform tile. Obviously, this wont help you in case some ground tiles are used on surfaces with different building restrictions, although a bit of duplication in the data stage probably can work around that (which could get messy if you need to touch the chunk generation - or replace them afterwards in on_chunk_generated).