Bullet impact effects (#9530)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Projectiles
|
||||
{
|
||||
@@ -20,5 +22,39 @@ namespace Content.Shared.Projectiles
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetShooter(SharedProjectileComponent component, EntityUid uid)
|
||||
{
|
||||
if (component.Shooter == uid) return;
|
||||
|
||||
component.Shooter = uid;
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
protected sealed class ProjectileComponentState : ComponentState
|
||||
{
|
||||
public ProjectileComponentState(EntityUid shooter, bool ignoreShooter)
|
||||
{
|
||||
Shooter = shooter;
|
||||
IgnoreShooter = ignoreShooter;
|
||||
}
|
||||
|
||||
public EntityUid Shooter { get; }
|
||||
public bool IgnoreShooter { get; }
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class ImpactEffectEvent : EntityEventArgs
|
||||
{
|
||||
public string Prototype;
|
||||
public EntityCoordinates Coordinates;
|
||||
|
||||
public ImpactEffectEvent(string prototype, EntityCoordinates coordinates)
|
||||
{
|
||||
Prototype = prototype;
|
||||
Coordinates = coordinates;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user