Add a safety net to the round controls in the Admin window. (#37836)
some changes.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user