using Content.Shared.DoAfter; using Robust.Shared.Map; using Robust.Shared.Serialization; using Content.Shared._Offbrand.Wounds; // Offbrand namespace Content.Shared.Medical.SuitSensor; [Serializable, NetSerializable] public sealed class SuitSensorStatus { public SuitSensorStatus(NetEntity ownerUid, NetEntity suitSensorUid, string name, string job, string jobIcon, List jobDepartments) { OwnerUid = ownerUid; SuitSensorUid = suitSensorUid; Name = name; Job = job; JobIcon = jobIcon; JobDepartments = jobDepartments; } public TimeSpan Timestamp; public NetEntity SuitSensorUid; public NetEntity OwnerUid; public string Name; public string Job; public string JobIcon; public List JobDepartments; public bool IsAlive; // Begin Offbrand Changes // public int? TotalDamage; // public int? TotalDamageThreshold; // public float? DamagePercentage => TotalDamageThreshold == null || TotalDamage == null ? null : TotalDamage / (float) TotalDamageThreshold; public WoundableHealthAnalyzerData? WoundableData; // End Offbrand Changes public NetCoordinates? Coordinates; } [Serializable, NetSerializable] public enum SuitSensorMode : byte { /// /// Sensor doesn't send any information about owner /// SensorOff = 0, /// /// Sensor sends only binary status (alive/dead) /// SensorBinary = 1, /// /// Sensor sends health vitals status /// SensorVitals = 2, /// /// Sensor sends vitals status and GPS position /// SensorCords = 3 } public static class SuitSensorConstants { public const string NET_OWNER_UID = "ownerUid"; public const string NET_NAME = "name"; public const string NET_JOB = "job"; public const string NET_JOB_ICON = "jobIcon"; public const string NET_JOB_DEPARTMENTS = "jobDepartments"; public const string NET_IS_ALIVE = "alive"; // Begin Offbrand Changes // public const string NET_TOTAL_DAMAGE = "vitals"; // public const string NET_TOTAL_DAMAGE_THRESHOLD = "vitalsThreshold"; public const string NET_COORDINATES = "coords"; public const string NET_WOUNDABLE_DATA = "woundableData"; public const string NET_SUIT_SENSOR_UID = "uid"; // End Offbrand Changes ///Used by the CrewMonitoringServerSystem to send the status of all connected suit sensors to each crew monitor public const string NET_STATUS_COLLECTION = "suit-status-collection"; } [Serializable, NetSerializable] public sealed partial class SuitSensorChangeDoAfterEvent : DoAfterEvent { public SuitSensorMode Mode { get; private set; } = SuitSensorMode.SensorOff; public SuitSensorChangeDoAfterEvent(SuitSensorMode mode) { Mode = mode; } public override DoAfterEvent Clone() => this; }