Files
Delta-v/Content.Shared/Damage/Components/PassiveDamageComponent.cs
T
pathetic meowmeow f889c9f817 Initial decoupling pass on Damageable (#43103)
* Initial decoupling pass on Damageable

* ope

* e

* mroaw

* ok sure on the medibot thing

* no medibot bounds

* okidooks

* arcryox era

* cryox moment
2026-06-29 12:44:01 +02:00

35 lines
1.1 KiB
C#

using Content.Shared.Mobs;
using Content.Shared.FixedPoint;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.GameStates;
namespace Content.Shared.Damage.Components;
/// <summary>
/// Passively damages the entity on a specified interval.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class PassiveDamageComponent : Component
{
/// <summary>
/// The entitys' states that passive damage will apply in
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public List<MobState> AllowedStates = new();
/// <summary>
/// Damage / Healing per interval dealt to the entity every interval
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = new();
/// <summary>
/// Delay between damage events in seconds
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float Interval = 1f;
[DataField("nextDamage", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextDamage = TimeSpan.Zero;
}