]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix loneops (#15874)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sat, 29 Apr 2023 03:14:15 +0000 (23:14 -0400)
committerGitHub <noreply@github.com>
Sat, 29 Apr 2023 03:14:15 +0000 (13:14 +1000)
Content.Server/GameTicking/Rules/GameRuleSystem.cs
Content.Server/StationEvents/Events/LoneOpsSpawnRule.cs
Resources/Prototypes/GameRules/events.yml

index a55189d0f2e118428f439480c1e5cc12d0485eae..4f788e00527dfac77a20bbf61d6b6908fce02d7a 100644 (file)
@@ -4,7 +4,7 @@ namespace Content.Server.GameTicking.Rules;
 
 public abstract class GameRuleSystem<T> : EntitySystem where T : Component
 {
-    [Dependency] protected GameTicker GameTicker = default!;
+    [Dependency] protected readonly GameTicker GameTicker = default!;
 
     public override void Initialize()
     {
index 57f0a2cbb626c95575f032930ea1a154c55b86d6..8e1a2f3b3b06ca4269a0bab339acca721446a55b 100644 (file)
@@ -20,7 +20,10 @@ public sealed class LoneOpsSpawnRule : StationEventSystem<LoneOpsSpawnRuleCompon
         base.Started(uid, component, gameRule, args);
 
         if (!_nukeopsRuleSystem.CheckLoneOpsSpawn())
+        {
+            ForceEndSelf(uid, gameRule);
             return;
+        }
 
         var shuttleMap = _mapManager.CreateMap();
         var options = new MapLoadOptions
index 5b54e1a60ddc436563925e7fa4a9f984bafdd84a..7163998af58022d772a7373eada86ebc15b0e302 100644 (file)
     reoccurrenceDelay: 25
     duration: 1
   - type: LoneOpsSpawnRule
-  - type: NukeopsRule