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

@@ -6,13 +6,13 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Projectiles
{
public abstract class SharedProjectileComponent : Component, ICollideSpecial
public abstract class SharedProjectileComponent : Component
{
private bool _ignoreShooter = true;
public override string Name => "Projectile";
public override uint? NetID => ContentNetIDs.PROJECTILE;
protected abstract EntityUid Shooter { get; }
public EntityUid Shooter { get; protected set; }
public bool IgnoreShooter
{
@@ -29,7 +29,7 @@ namespace Content.Shared.GameObjects.Components.Projectiles
[NetSerializable, Serializable]
protected class ProjectileComponentState : ComponentState
{
public ProjectileComponentState(uint netId, EntityUid shooter, bool ignoreShooter) : base(netId)
public ProjectileComponentState(EntityUid shooter, bool ignoreShooter) : base(ContentNetIDs.PROJECTILE)
{
Shooter = shooter;
IgnoreShooter = ignoreShooter;
@@ -38,10 +38,5 @@ namespace Content.Shared.GameObjects.Components.Projectiles
public EntityUid Shooter { get; }
public bool IgnoreShooter { get; }
}
public bool PreventCollide(IPhysBody collidedwith)
{
return IgnoreShooter && collidedwith.Owner.Uid == Shooter;
}
}
}