Defibrillator (#15922)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Nemanja
2023-05-02 20:10:19 -04:00
committed by GitHub
parent 32b29fb05a
commit 0604c93d50
38 changed files with 796 additions and 56 deletions

View File

@@ -1,7 +1,6 @@
using Content.Shared.FixedPoint;
using Content.Shared.Mobs.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Mobs.Components;
@@ -9,23 +8,18 @@ namespace Content.Shared.Mobs.Components;
[Access(typeof(MobThresholdSystem))]
public sealed class MobThresholdsComponent : Component
{
[DataField("thresholds", required:true)]public SortedDictionary<FixedPoint2, MobState> Thresholds = new();
[DataField("thresholds", required:true), AutoNetworkedField(true)]
public SortedDictionary<FixedPoint2, MobState> Thresholds = new();
[DataField("triggersAlerts")] public bool TriggersAlerts = true;
[DataField("triggersAlerts"), AutoNetworkedField]
public bool TriggersAlerts = true;
[DataField("currentThresholdState"), AutoNetworkedField]
public MobState CurrentThresholdState;
}
[Serializable, NetSerializable]
public sealed class MobThresholdComponentState : ComponentState
{
public Dictionary<FixedPoint2, MobState> Thresholds;
public MobState CurrentThresholdState;
public MobThresholdComponentState(MobState currentThresholdState,
Dictionary<FixedPoint2, MobState> thresholds)
{
CurrentThresholdState = currentThresholdState;
Thresholds = thresholds;
}
/// <summary>
/// Whether or not this entity can be revived out of a dead state.
/// </summary>
[DataField("allowRevives"), AutoNetworkedField]
public bool AllowRevives;
}