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:
metalgearsloth
2021-05-30 23:30:44 +10:00
parent 8a6ab624ab
commit d93ebe9409
17 changed files with 119 additions and 107 deletions

View File

@@ -11,7 +11,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Shared.GameObjects.Components.Doors
{
public abstract class SharedDoorComponent : Component, ICollideSpecial
public abstract class SharedDoorComponent : Component
{
public override string Name => "Door";
public override uint? NetID => ContentNetIDs.DOOR;
@@ -94,17 +94,16 @@ namespace Content.Shared.GameObjects.Components.Doors
/// </summary>
protected List<EntityUid> CurrentlyCrushing = new();
public bool IsCrushing(IEntity entity)
{
return CurrentlyCrushing.Contains(entity.Uid);
}
protected void SetAppearance(DoorVisualState state)
{
AppearanceComponent?.SetData(DoorVisuals.VisualState, state);
}
// stops us colliding with people we're crushing, to prevent hitbox clipping and jank
public bool PreventCollide(IPhysBody collidedwith)
{
return CurrentlyCrushing.Contains(collidedwith.Owner.Uid);
}
/// <summary>
/// Called when the door is partially opened.
/// </summary>