]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Changes IonStorm related code with no gameplay changes.
authorThe Canned One <greentopcan@gmail.com>
Thu, 3 Oct 2024 09:34:24 +0000 (11:34 +0200)
committerThe Canned One <greentopcan@gmail.com>
Thu, 3 Oct 2024 09:34:24 +0000 (11:34 +0200)
Content.Server/Silicons/Laws/IonStormSystem.cs
Content.Server/Silicons/Laws/StartIonStormedSystem.cs
Content.Server/StationEvents/Events/IonStormRule.cs

index b8d8f432e77294f1e76e7aecce395d9efe361502..637155228cb29dceee65cfede21b805456da77f2 100644 (file)
@@ -60,8 +60,10 @@ public sealed class IonStormSystem : EntitySystem
     private const string Foods = "IonStormFoods";
 
     //Randomly alters the laws of an individual silicon.
-    public void IonStormTarget(EntityUid ent, SiliconLawBoundComponent lawBound, TransformComponent xform, IonStormTargetComponent target, EntityUid? chosenStation, bool adminlog = true)
+    public void IonStormTarget(Entity<SiliconLawBoundComponent, IonStormTargetComponent> ent, TransformComponent xform, EntityUid? chosenStation, bool adminlog = true)
     {
+        var lawBound = ent.Comp1;
+        var target = ent.Comp2;
         if (!_robustRandom.Prob(target.Chance))
             return;
 
index 546b3b27772d683163c97c6168045bec9f3a0e28..d679b558b321539caf0887e2dca01769f7341e5d 100644 (file)
@@ -31,7 +31,7 @@ public sealed class StartIonStormedSystem : EntitySystem
 
         for (int currentIonStorm = 0; currentIonStorm < ent.Comp.IonStormAmount; currentIonStorm++)
         {
-            _ionStorm.IonStormTarget(ent.Owner, lawBound, xform, target, null, false);
+            _ionStorm.IonStormTarget((ent.Owner, lawBound, target), xform, null, false);
         }
 
         var laws = _siliconLaw.GetLaws(ent.Owner, lawBound);
index 26f6d3263f00d3a4c1abd86890064acbdb09b9be..9b67f25608d3dd02d79fcf093634b4bc3e1ce0b7 100644 (file)
@@ -24,7 +24,7 @@ public sealed class IonStormRule : StationEventSystem<IonStormRuleComponent>
             if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station != chosenStation)
                 continue;
 
-            _ionStorm.IonStormTarget(ent, lawBound, xform, target, chosenStation);
+            _ionStorm.IonStormTarget((ent, lawBound, target), xform, chosenStation);
         }
     }
 }