Use red damage animation for guns too (#10938)
This commit is contained in:
11
Content.Shared/Weapons/DamageEffectComponent.cs
Normal file
11
Content.Shared/Weapons/DamageEffectComponent.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Content.Shared.Weapons;
|
||||
|
||||
/// <summary>
|
||||
/// Stores the original sprite color for a damaged entity to be able to restore it later.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class DamageEffectComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
public Color Color = Color.White;
|
||||
}
|
||||
17
Content.Shared/Weapons/Melee/DamageEffectEvent.cs
Normal file
17
Content.Shared/Weapons/Melee/DamageEffectEvent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Weapons.Melee;
|
||||
|
||||
/// <summary>
|
||||
/// Raised on the server and sent to a client to play the damage animation.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DamageEffectEvent : EntityEventArgs
|
||||
{
|
||||
public EntityUid Entity;
|
||||
|
||||
public DamageEffectEvent(EntityUid entity)
|
||||
{
|
||||
Entity = entity;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user