Files
crystall-punk-14/Content.Server/Zombies/ActiveZombieComponent.cs

34 lines
930 B
C#
Raw Normal View History

2022-08-07 23:16:43 -04:00
namespace Content.Server.Zombies;
/// <summary>
/// Indicates a zombie that is "alive", i.e not crit/dead.
/// Causes it to emote when damaged.
/// TODO: move this to generic EmoteWhenDamaged comp/system.
/// </summary>
2022-08-07 23:16:43 -04:00
[RegisterComponent]
public sealed class ActiveZombieComponent : Component
{
/// <summary>
/// What emote to preform.
2022-08-07 23:16:43 -04:00
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public string GroanEmoteId = "Scream";
2022-08-07 23:16:43 -04:00
/// <summary>
/// Minimum time between groans.
2022-08-07 23:16:43 -04:00
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan DamageGroanCooldown = TimeSpan.FromSeconds(2);
2022-08-07 23:16:43 -04:00
/// <summary>
/// Chance to groan.
2022-08-07 23:16:43 -04:00
/// </summary>
public float DamageGroanChance = 0.5f;
2022-08-07 23:16:43 -04:00
/// <summary>
/// The last time the zombie groaned from taking damage.
/// </summary>
2022-08-07 23:16:43 -04:00
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan LastDamageGroan = TimeSpan.Zero;
2022-08-07 23:16:43 -04:00
}