diff --git a/Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs b/Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs index 076479727f..8a5cab85b8 100644 --- a/Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs @@ -1,11 +1,12 @@ using Content.Server.Antag; using Content.Server.Cloning; using Content.Server.GameTicking.Rules.Components; +using Content.Server.Medical.SuitSensors; using Content.Server.Objectives.Components; using Content.Shared.GameTicking.Components; using Content.Shared.Gibbing.Components; +using Content.Shared.Medical.SuitSensor; using Content.Shared.Mind; -using Robust.Shared.Prototypes; using Robust.Shared.Random; namespace Content.Server.GameTicking.Rules; @@ -16,6 +17,7 @@ public sealed class ParadoxCloneRuleSystem : GameRuleSystem + /// Set all suit sensors on the equipment someone is wearing to the specified mode. + /// + public void SetAllSensors(EntityUid target, SuitSensorMode mode, SlotFlags slots = SlotFlags.All ) + { + // iterate over all inventory slots + var slotEnumerator = _inventory.GetSlotEnumerator(target, slots); + while (slotEnumerator.NextItem(out var item, out _)) + { + if (TryComp(item, out var sensorComp)) + SetSensor((item, sensorComp), mode); + } + } + public SuitSensorStatus? GetSensorState(EntityUid uid, SuitSensorComponent? sensor = null, TransformComponent? transform = null) { if (!Resolve(uid, ref sensor, ref transform))