Ability to specify a collision_mask for a gate barrier

Post Reply
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Ability to specify a collision_mask for a gate barrier

Post by Earendel »

I have a gate that can only go on a spaceship so I set it to collide with ground-tile so it can't be placed on normal ground.

Code: Select all

{
  "ground-tile",
  "water-tile",
  "object-layer",
  "item-layer",
}
The problem is that the player can go through closed doors.

If I add "player-layer" to the list, the player can't go through open doors.

I'm thinking that the entity has two default collision masks normally, but setting the value on the prototype seems to affect both?

If there's something like a secondary collision mask it would be great to be able to set that in the prototype.

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Ability to specify a collision_mask for a gate barrier

Post by Bilka »

Earendel wrote:
Sat Apr 20, 2019 11:11 pm
I'm thinking that the entity has two default collision masks normally, but setting the value on the prototype seems to affect both?
This is indeed the case, the second collision mask is also loaded as "collision_mask", just like the normal entity collision mask. Must have been an oversight (a 3 year old oversight). I renamed that secondary collision mask to opened_collision_mask for the next version.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: Ability to specify a collision_mask for a gate barrier

Post by Earendel »

Great, thanks. Funny how these things can can go so long unnoticed.

Post Reply

Return to “Implemented mod requests”