diff --git a/Content.Server/Silicons/Laws/IonStormSystem.cs b/Content.Server/Silicons/Laws/IonStormSystem.cs index 87df0d8cf2..cf31a9e19f 100644 --- a/Content.Server/Silicons/Laws/IonStormSystem.cs +++ b/Content.Server/Silicons/Laws/IonStormSystem.cs @@ -9,7 +9,6 @@ using Content.Shared.Random; using Content.Shared.Random.Helpers; using Content.Shared.Silicons.Laws; using Content.Shared.Silicons.Laws.Components; -using Content.Shared.Station.Components; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -60,12 +59,8 @@ public sealed class IonStormSystem : EntitySystem [ValidatePrototypeId] private const string Foods = "IonStormFoods"; - public void IonStormTarget(EntityUid ent, SiliconLawBoundComponent lawBound, TransformComponent xform, IonStormTargetComponent target, EntityUid? chosenStation, bool ignoreStation = false, bool adminlog = true) + public void IonStormTarget(EntityUid ent, SiliconLawBoundComponent lawBound, TransformComponent xform, IonStormTargetComponent target, EntityUid? chosenStation, bool adminlog = true) { - // only affect law holders on the station unless ignoreStation is true. - if (CompOrNull(xform.GridUid)?.Station != chosenStation && !ignoreStation) - return; - if (!_robustRandom.Prob(target.Chance)) return; diff --git a/Content.Server/Silicons/Laws/StartIonStormedSystem.cs b/Content.Server/Silicons/Laws/StartIonStormedSystem.cs index f7b65e1a04..887bc051dd 100644 --- a/Content.Server/Silicons/Laws/StartIonStormedSystem.cs +++ b/Content.Server/Silicons/Laws/StartIonStormedSystem.cs @@ -31,7 +31,7 @@ public sealed class StartIonStormedSystem : EntitySystem for (int currentIonStorm = 0; currentIonStorm < component.IonStormAmount; currentIonStorm++) { - _ionStorm.IonStormTarget(uid, lawBound, xform, target, null, true, false); + _ionStorm.IonStormTarget(uid, lawBound, xform, target, null, false); } var laws = _siliconLaw.GetLaws(uid, lawBound); diff --git a/Content.Server/StationEvents/Events/IonStormRule.cs b/Content.Server/StationEvents/Events/IonStormRule.cs index 6d1834c576..05d079fb3d 100644 --- a/Content.Server/StationEvents/Events/IonStormRule.cs +++ b/Content.Server/StationEvents/Events/IonStormRule.cs @@ -4,6 +4,7 @@ using Content.Server.StationEvents.Components; using Content.Shared.GameTicking.Components; using Content.Shared.Silicons.Laws; using Content.Shared.Silicons.Laws.Components; +using Content.Shared.Station.Components; namespace Content.Server.StationEvents.Events; @@ -21,6 +22,10 @@ public sealed class IonStormRule : StationEventSystem var query = EntityQueryEnumerator(); while (query.MoveNext(out var ent, out var lawBound, out var xform, out var target)) { + // only affect law holders on the station + if (CompOrNull(xform.GridUid)?.Station != chosenStation) + continue; + _ionStorm.IonStormTarget(ent, lawBound, xform, target, chosenStation); } }