using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Atmos.Miasma
{
///
/// This makes mobs eventually start rotting when they die.
/// It may be expanded to food at some point, but it's just for mobs right now.
///
[RegisterComponent]
public sealed class PerishableComponent : Component
{
///
/// Is this progressing?
///
[ViewVariables(VVAccess.ReadWrite)]
public bool Progressing = true;
///
/// How long this creature has been dead.
///
[DataField("timeOfDeath", customTypeSerializer: typeof(TimeOffsetSerializer))]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan TimeOfDeath = TimeSpan.Zero;
///
/// When DeathAccumulator is greater than this, start rotting.
///
public TimeSpan RotAfter = TimeSpan.FromMinutes(5);
///
/// Gasses are released, this is when the next gas release update will be.
///
[DataField("rotNextUpdate", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan RotNextUpdate = TimeSpan.Zero;
///
/// How many moles of gas released per second, per unit of mass.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("molsPerSecondPerUnitMass")]
public float MolsPerSecondPerUnitMass = 0.0025f;
}
}