]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix radio jammer not blocking suit sensors. (#26632)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Mon, 1 Apr 2024 02:13:51 +0000 (02:13 +0000)
committerGitHub <noreply@github.com>
Mon, 1 Apr 2024 02:13:51 +0000 (13:13 +1100)
As it turns out, they are not in fact on their own netid. They are
actually just on wireless. The way I had tested my previous pr led to
this mistake being made. I originally had the radio jammer block
wireless as well, but decided to take out under the flase assumption
that it suit sensors were actually on their own netid and did not
require the ability to block all wireless packets at the last moment.

Content.Server/Radio/EntitySystems/JammerSystem.cs

index 1258cc10fa0eed0fa687fc577a86305b8e04ab02..5a2a854017bda63af5f615ecb3167505d9285576 100644 (file)
@@ -54,14 +54,10 @@ public sealed class JammerSystem : EntitySystem
         if (activated)
         {
             EnsureComp<ActiveRadioJammerComponent>(uid);
-            var stationId = _stationSystem.GetOwningStation(uid);
-            if (stationId != null && _singletonServerSystem.TryGetActiveServerAddress<CrewMonitoringServerComponent>(stationId.Value, out var netId))
-            {
-                EnsureComp<DeviceNetworkJammerComponent>(uid, out var jammingComp);
-                jammingComp.Range = comp.Range;
-                jammingComp.JammableNetworks.Add(netId);
-                Dirty(uid, jammingComp);
-            }
+            EnsureComp<DeviceNetworkJammerComponent>(uid, out var jammingComp);
+            jammingComp.Range = comp.Range;
+            jammingComp.JammableNetworks.Add(DeviceNetworkComponent.DeviceNetIdDefaults.Wireless.ToString());
+            Dirty(uid, jammingComp);
         }
         else
         {