diff --git a/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs index 43439748d8..1d71d5bdf4 100644 --- a/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs @@ -27,6 +27,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab _decalPlacerController = UserInterfaceManager.GetUIController(); var adminManager = IoCManager.Resolve(); + adminManager.AdminStatusUpdated += OnStatusUpdate; // For the SpawnEntitiesButton and SpawnTilesButton we need to do the press manually // TODO: This will probably need some command check at some point @@ -34,8 +35,15 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab SpawnTilesButton.OnPressed += SpawnTilesButtonOnOnPressed; SpawnDecalsButton.OnPressed += SpawnDecalsButtonOnPressed; LoadGamePrototypeButton.OnPressed += LoadGamePrototypeButtonOnPressed; - LoadGamePrototypeButton.Disabled = !adminManager.HasFlag(AdminFlags.Query); - LoadBlueprintsButton.Disabled = !adminManager.HasFlag(AdminFlags.Mapping); + LoadGamePrototypeButton.Disabled = !adminManager.CanCommand("loadprototype"); + LoadBlueprintsButton.Disabled = !adminManager.CanCommand("loadgrid"); + } + + private void OnStatusUpdate() + { + var adminManager = IoCManager.Resolve(); + LoadGamePrototypeButton.Disabled = !adminManager.CanCommand("loadprototype"); + LoadBlueprintsButton.Disabled = !adminManager.CanCommand("loadgrid"); } private void LoadGamePrototypeButtonOnPressed(BaseButton.ButtonEventArgs obj)