Files
tbd-station-14/Content.Server/Zombies/PendingZombieComponent.cs
2023-09-23 18:49:39 +10:00

57 lines
1.6 KiB
C#

using Content.Shared.Damage;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Zombies;
/// <summary>
/// Temporary because diseases suck.
/// </summary>
[RegisterComponent]
public sealed partial class PendingZombieComponent : Component
{
/// <summary>
/// Damage dealt every second to infected individuals.
/// </summary>
[DataField("damage")] public DamageSpecifier Damage = new()
{
DamageDict = new ()
{
{ "Blunt", 0.25 },
{ "Poison", 0.1 },
}
};
/// <summary>
/// A multiplier for <see cref="Damage"/> applied when the entity is in critical condition.
/// </summary>
[DataField("critDamageMultiplier")]
public float CritDamageMultiplier = 10f;
[DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextTick;
/// <summary>
/// The amount of time left before the infected begins to take damage.
/// </summary>
[DataField("gracePeriod"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan GracePeriod = TimeSpan.Zero;
/// <summary>
/// The chance each second that a warning will be shown.
/// </summary>
[DataField("infectionWarningChance")]
public float InfectionWarningChance = 0.0166f;
/// <summary>
/// Infection warnings shown as popups
/// </summary>
[DataField("infectionWarnings")]
public List<string> InfectionWarnings = new()
{
"zombie-infection-warning",
"zombie-infection-underway"
};
[DataField] public EntityUid? Action;
}