From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sat, 19 Apr 2025 12:17:03 +0000 (+1000) Subject: Try fix RestartTest (#36725) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=49da5c540b2681bc847bf1bad88e10ef0e666839;p=space-station-14.git Try fix RestartTest (#36725) --- diff --git a/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs b/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs index 3109df890a..b9a02339fb 100644 --- a/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs +++ b/Content.IntegrationTests/Tests/GameRules/FailAndStartPresetTest.cs @@ -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); diff --git a/Content.Server/GameTicking/GameTicker.GamePreset.cs b/Content.Server/GameTicking/GameTicker.GamePreset.cs index 14985051e7..c062b95361 100644 --- a/Content.Server/GameTicking/GameTicker.GamePreset.cs +++ b/Content.Server/GameTicking/GameTicker.GamePreset.cs @@ -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;