Use red damage animation for guns too (#10938)

This commit is contained in:
metalgearsloth
2022-09-06 18:01:35 +10:00
committed by GitHub
parent 4e8267d40a
commit fae71aeb3e
6 changed files with 161 additions and 4 deletions

View 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;
}

View 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;
}
}