Fix conveyors to allow doors to close over top (#22117)
This commit is contained in:
@@ -460,6 +460,10 @@ public abstract class SharedDoorSystem : EntitySystem
|
|||||||
//If the colliding entity is a slippable item ignore it by the airlock
|
//If the colliding entity is a slippable item ignore it by the airlock
|
||||||
if (otherPhysics.CollisionLayer == (int)CollisionGroup.SlipLayer && otherPhysics.CollisionMask == (int)CollisionGroup.ItemMask)
|
if (otherPhysics.CollisionLayer == (int)CollisionGroup.SlipLayer && otherPhysics.CollisionMask == (int)CollisionGroup.ItemMask)
|
||||||
continue;
|
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)
|
if ((physics.CollisionMask & otherPhysics.CollisionLayer) == 0 && (otherPhysics.CollisionMask & physics.CollisionLayer) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public enum CollisionGroup
|
|||||||
GhostImpassable = 1 << 5, // 32 Things impassible by ghosts/observers, ie blessed tiles or forcefields
|
GhostImpassable = 1 << 5, // 32 Things impassible by ghosts/observers, ie blessed tiles or forcefields
|
||||||
BulletImpassable = 1 << 6, // 64 Can be hit by bullets
|
BulletImpassable = 1 << 6, // 64 Can be hit by bullets
|
||||||
InteractImpassable = 1 << 7, // 128 Blocks interaction/InRangeUnobstructed
|
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.
|
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
|
// Machines, computers
|
||||||
MachineMask = Impassable | MidImpassable | LowImpassable,
|
MachineMask = Impassable | MidImpassable | LowImpassable,
|
||||||
MachineLayer = Opaque | MidImpassable | LowImpassable | BulletImpassable,
|
MachineLayer = Opaque | MidImpassable | LowImpassable | BulletImpassable,
|
||||||
|
ConveyorMask = Impassable | MidImpassable | LowImpassable | DoorPassable,
|
||||||
|
|
||||||
// Tables that SmallMobs can go under
|
// Tables that SmallMobs can go under
|
||||||
TableMask = Impassable | MidImpassable,
|
TableMask = Impassable | MidImpassable,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
- Impassable
|
- Impassable
|
||||||
- MidImpassable
|
- MidImpassable
|
||||||
- LowImpassable
|
- LowImpassable
|
||||||
|
- DoorPassable
|
||||||
hard: False
|
hard: False
|
||||||
- type: Conveyor
|
- type: Conveyor
|
||||||
- type: DeviceLinkSink
|
- type: DeviceLinkSink
|
||||||
|
|||||||
Reference in New Issue
Block a user