]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Try fix RestartTest (#36725)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sat, 19 Apr 2025 12:17:03 +0000 (22:17 +1000)
committerGitHub <noreply@github.com>
Sat, 19 Apr 2025 12:17:03 +0000 (22:17 +1000)
Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs
Content.Server/GameTicking/GameTicker.GamePreset.cs

index 3109df890a7d8a3e206f2c4b16a12034cc96899b..b9a02339fbacfee12b5333294a5a9c040c9f5db7 100644 (file)
@@ -85,7 +85,7 @@ public sealed class FailAndStartPresetTest
         Assert.That(ticker.PlayerGameStatuses[client.User!.Value], Is.EqualTo(PlayerGameStatus.NotReadyToPlay));
 
         // Try to start nukeops without readying up
-        await pair.WaitCommand("setgamepreset TestPresetTenPlayers");
+        await pair.WaitCommand("setgamepreset TestPresetTenPlayers 9999");
         await pair.WaitCommand("startround");
         await pair.RunTicksSync(10);
 
@@ -99,7 +99,7 @@ public sealed class FailAndStartPresetTest
         // Ready up and start nukeops
         await pair.WaitClientCommand("toggleready True");
         Assert.That(ticker.PlayerGameStatuses[client.User!.Value], Is.EqualTo(PlayerGameStatus.ReadyToPlay));
-        await pair.WaitCommand("setgamepreset TestPreset");
+        await pair.WaitCommand("setgamepreset TestPreset 9999");
         await pair.WaitCommand("startround");
         await pair.RunTicksSync(10);
 
index 14985051e78ebf0ae72fd8e69b2ccd3882031e9a..c062b95361948342d3af6c431c8679b7b8dfa0fb 100644 (file)
@@ -109,7 +109,11 @@ public sealed partial class GameTicker
             // Reset counter is checked and changed at the end of each round
             // So if the game is in the lobby, the first requested round will happen before the check, and we need one less check
             if (CurrentPreset is null)
-                ResetCountdown = resetDelay.Value -1;
+                ResetCountdown = resetDelay.Value - 1;
+        }
+        else
+        {
+            ResetCountdown = null;
         }
 
         Preset = preset;