SSD sleep take 2 (#34039)
* ssd sleep part 2 * forgot this * apply review * yeah * add onmapinit * cache cvar values --------- Co-authored-by: EmoGarbage404 <retron404@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.StatusIcon;
|
||||
using Content.Shared.StatusIcon;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.SSDIndicator;
|
||||
/// Shows status icon when player in SSD
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[AutoGenerateComponentState]
|
||||
[AutoGenerateComponentState, AutoGenerateComponentPause]
|
||||
public sealed partial class SSDIndicatorComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
@@ -19,4 +19,17 @@ public sealed partial class SSDIndicatorComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField]
|
||||
public ProtoId<SsdIconPrototype> Icon = "SSDIcon";
|
||||
|
||||
/// <summary>
|
||||
/// When the entity should fall asleep
|
||||
/// </summary>
|
||||
[DataField, AutoPausedField, Access(typeof(SSDIndicatorSystem))]
|
||||
public TimeSpan FallAsleepTime = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// Required to don't remove forced sleep from other sources
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[AutoNetworkedField]
|
||||
public bool ForcedSleepAdded = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user