Remove ICollideSpecial
Handled in an ECS way by PreventCollideEvent. The disposals one doesn't work anyway and would've required a larger refactor of disposals to fix so out of scope.
This commit is contained in:
23
Content.Shared/GameObjects/EntitySystems/SharedDoorSystem.cs
Normal file
23
Content.Shared/GameObjects/EntitySystems/SharedDoorSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Shared.GameObjects.Components.Doors;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
|
||||
namespace Content.Shared.GameObjects.EntitySystems
|
||||
{
|
||||
public abstract class SharedDoorSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SharedDoorComponent, PreventCollideEvent>(PreventCollision);
|
||||
}
|
||||
|
||||
private void PreventCollision(EntityUid uid, SharedDoorComponent component, PreventCollideEvent args)
|
||||
{
|
||||
if (component.IsCrushing(args.BodyB.Owner))
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user