Fix conveyors to allow doors to close over top (#22117)

This commit is contained in:
Repo 2023-12-05 12:07:48 +13:00 committed by Debug
parent e1da8562fa
commit a3e93e0866
3 changed files with 7 additions and 0 deletions

View File

@ -460,6 +460,10 @@ public abstract class SharedDoorSystem : EntitySystem
//If the colliding entity is a slippable item ignore it by the airlock
if (otherPhysics.CollisionLayer == (int)CollisionGroup.SlipLayer && otherPhysics.CollisionMask == (int)CollisionGroup.ItemMask)
continue;
//For when doors need to close over conveyor belts
if (otherPhysics.CollisionLayer == (int) CollisionGroup.ConveyorMask)
continue;
if ((physics.CollisionMask & otherPhysics.CollisionLayer) == 0 && (otherPhysics.CollisionMask & physics.CollisionLayer) == 0)
continue;

View File

@ -22,6 +22,7 @@ public enum CollisionGroup
GhostImpassable = 1 << 5, // 32 Things impassible by ghosts/observers, ie blessed tiles or forcefields
BulletImpassable = 1 << 6, // 64 Can be hit by bullets
InteractImpassable = 1 << 7, // 128 Blocks interaction/InRangeUnobstructed
DoorPassable = 1 << 8, // 256 Allows door to close over top, Like blast doors over conveyors for disposals rooms/cargo.
MapGrid = MapGridHelpers.CollisionGroup, // Map grids, like shuttles. This is the actual grid itself, not the walls or other entities connected to the grid.
@ -45,6 +46,7 @@ public enum CollisionGroup
// Machines, computers
MachineMask = Impassable | MidImpassable | LowImpassable,
MachineLayer = Opaque | MidImpassable | LowImpassable | BulletImpassable,
ConveyorMask = Impassable | MidImpassable | LowImpassable | DoorPassable,
// Tables that SmallMobs can go under
TableMask = Impassable | MidImpassable,

View File

@ -32,6 +32,7 @@
- Impassable
- MidImpassable
- LowImpassable
- DoorPassable
hard: False
- type: Conveyor
- type: DeviceLinkSink