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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user