Emp more effects (#14550)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
27
Content.Shared/Emp/EmpDisabledComponent.cs
Normal file
27
Content.Shared/Emp/EmpDisabledComponent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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.
|
||||
/// Add desired behaviour in other systems
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[Access(typeof(SharedEmpSystem))]
|
||||
public sealed class EmpDisabledComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Moment of time when component is removed and entity stops being "disabled"
|
||||
/// </summary>
|
||||
[DataField("timeLeft", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public TimeSpan DisabledUntil;
|
||||
|
||||
[DataField("effectCoolDown"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float EffectCooldown = 3f;
|
||||
|
||||
/// <summary>
|
||||
/// When next effect will be spawned
|
||||
/// </summary>
|
||||
public TimeSpan TargetTime = TimeSpan.Zero;
|
||||
}
|
||||
Reference in New Issue
Block a user