2023-05-07 01:26:04 +10:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Emp;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// While entity has this component it is "disabled" by EMP.
|
2023-08-22 18:14:33 -07:00
|
|
|
/// Add desired behaviour in other systems
|
2023-05-07 01:26:04 +10:00
|
|
|
/// </summary>
|
2024-02-26 04:36:19 +01:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentPause]
|
2023-05-07 01:26:04 +10:00
|
|
|
[Access(typeof(SharedEmpSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class EmpDisabledComponent : Component
|
2023-05-07 01:26:04 +10:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Moment of time when component is removed and entity stops being "disabled"
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("timeLeft", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
|
2024-02-26 04:36:19 +01:00
|
|
|
[AutoPausedField]
|
2023-05-07 01:26:04 +10:00
|
|
|
public TimeSpan DisabledUntil;
|
|
|
|
|
|
|
|
|
|
[DataField("effectCoolDown"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float EffectCooldown = 3f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When next effect will be spawned
|
|
|
|
|
/// </summary>
|
2024-02-26 04:36:19 +01:00
|
|
|
[AutoPausedField]
|
2023-05-07 01:26:04 +10:00
|
|
|
public TimeSpan TargetTime = TimeSpan.Zero;
|
|
|
|
|
}
|