From: Kyle Tyo <36606155+VerinSenpai@users.noreply.github.com> Date: Mon, 26 May 2025 02:37:21 +0000 (-0400) Subject: Add a safety net to the round controls in the Admin window. (#37836) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=2ec019dc0fa3b32a2a450ac1e3f0a7d6622a9a7c;p=space-station-14.git Add a safety net to the round controls in the Admin window. (#37836) some changes. --- diff --git a/Content.Client/Administration/UI/Tabs/RoundTab.xaml b/Content.Client/Administration/UI/Tabs/RoundTab.xaml index 2c8a400ecd..36c06cab76 100644 --- a/Content.Client/Administration/UI/Tabs/RoundTab.xaml +++ b/Content.Client/Administration/UI/Tabs/RoundTab.xaml @@ -1,13 +1,13 @@  - - - - + + + + diff --git a/Content.Client/Administration/UI/Tabs/RoundTab.xaml.cs b/Content.Client/Administration/UI/Tabs/RoundTab.xaml.cs index 28073bc91d..70f12bb393 100644 --- a/Content.Client/Administration/UI/Tabs/RoundTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/RoundTab.xaml.cs @@ -1,10 +1,24 @@ using Robust.Client.AutoGenerated; +using Robust.Client.Console; using Robust.Client.UserInterface; +using Robust.Client.UserInterface.XAML; namespace Content.Client.Administration.UI.Tabs { [GenerateTypedNameReferences] public sealed partial class RoundTab : Control { + [Dependency] private readonly IClientConsoleHost _console = default!; + + public RoundTab() + { + RobustXamlLoader.Load(this); + IoCManager.InjectDependencies(this); + + StartRound.OnPressed += _ => _console.ExecuteCommand("startround"); + EndRound.OnPressed += _ => _console.ExecuteCommand("endround"); + RestartRound.OnPressed += _ => _console.ExecuteCommand("restartround"); + RestartRoundNow.OnPressed += _ => _console.ExecuteCommand("restartroundnow"); + } } }