2023-05-07 17:50:37 +10:00
|
|
|
using Content.Shared.Damage;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Zombies;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Temporary because diseases suck.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class PendingZombieComponent : Component
|
2023-05-07 17:50:37 +10:00
|
|
|
{
|
2023-07-25 17:31:35 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Damage dealt every second to infected individuals.
|
|
|
|
|
/// </summary>
|
2023-05-07 17:50:37 +10:00
|
|
|
[DataField("damage")] public DamageSpecifier Damage = new()
|
|
|
|
|
{
|
2023-05-09 14:24:40 +12:00
|
|
|
DamageDict = new ()
|
2023-05-07 17:50:37 +10:00
|
|
|
{
|
2024-03-12 11:44:08 -07:00
|
|
|
{ "Poison", 0.3 },
|
2023-05-07 17:50:37 +10:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2023-07-25 17:31:35 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// A multiplier for <see cref="Damage"/> applied when the entity is in critical condition.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("critDamageMultiplier")]
|
|
|
|
|
public float CritDamageMultiplier = 10f;
|
|
|
|
|
|
2023-05-07 17:50:37 +10:00
|
|
|
[DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
|
|
|
|
public TimeSpan NextTick;
|
2023-05-09 14:24:40 +12:00
|
|
|
|
2023-05-16 17:59:39 +12:00
|
|
|
/// <summary>
|
2023-07-25 17:31:35 -04:00
|
|
|
/// The amount of time left before the infected begins to take damage.
|
2023-05-16 17:59:39 +12:00
|
|
|
/// </summary>
|
2023-07-25 17:31:35 -04:00
|
|
|
[DataField("gracePeriod"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public TimeSpan GracePeriod = TimeSpan.Zero;
|
2023-05-16 17:59:39 +12:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-07-25 17:31:35 -04:00
|
|
|
/// The chance each second that a warning will be shown.
|
2023-05-16 17:59:39 +12:00
|
|
|
/// </summary>
|
2023-07-25 17:31:35 -04:00
|
|
|
[DataField("infectionWarningChance")]
|
|
|
|
|
public float InfectionWarningChance = 0.0166f;
|
2023-05-16 17:59:39 +12:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-07-25 17:31:35 -04:00
|
|
|
/// Infection warnings shown as popups
|
2023-05-16 17:59:39 +12:00
|
|
|
/// </summary>
|
|
|
|
|
[DataField("infectionWarnings")]
|
2023-07-25 17:31:35 -04:00
|
|
|
public List<string> InfectionWarnings = new()
|
2023-05-16 17:59:39 +12:00
|
|
|
{
|
2023-07-25 17:31:35 -04:00
|
|
|
"zombie-infection-warning",
|
|
|
|
|
"zombie-infection-underway"
|
2023-05-16 17:59:39 +12:00
|
|
|
};
|
2023-09-23 04:49:39 -04:00
|
|
|
|
|
|
|
|
[DataField] public EntityUid? Action;
|
2023-05-07 17:50:37 +10:00
|
|
|
}
|