From: Quantum-cross <7065792+Quantum-cross@users.noreply.github.com> Date: Thu, 29 May 2025 23:48:27 +0000 (-0400) Subject: Make `TryGetWires` actually work. (#37937) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=394aa7e7b8020f96cca19423e56e9c22c9f01be4;p=space-station-14.git Make `TryGetWires` actually work. (#37937) --- diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index 3e75659072..397b199ecb 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -579,14 +579,14 @@ public sealed class WiresSystem : SharedWiresSystem /// Tries to get all the wires on this entity by the wire action type. /// /// Enumerator of all wires in this entity according to the given type. - public IEnumerable TryGetWires(EntityUid uid, WiresComponent? wires = null) + public IEnumerable TryGetWires(EntityUid uid, WiresComponent? wires = null) where T: IWireAction { if (!Resolve(uid, ref wires)) yield break; foreach (var wire in wires.WiresList) { - if (wire.GetType() == typeof(T)) + if (wire.Action?.GetType() == typeof(T)) { yield return wire; }