diff --git a/Content.Client/Lobby/LobbyState.cs b/Content.Client/Lobby/LobbyState.cs index 41328f37eb..e4508906bb 100644 --- a/Content.Client/Lobby/LobbyState.cs +++ b/Content.Client/Lobby/LobbyState.cs @@ -14,6 +14,7 @@ using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Shared.Configuration; using Robust.Shared.Timing; +using Content.Client._Impstation.ReadyManifest; // Impstation - Ready Manifest namespace Content.Client.Lobby { @@ -31,6 +32,7 @@ namespace Content.Client.Lobby private ClientGameTicker _gameTicker = default!; private ContentAudioSystem _contentAudioSystem = default!; + private ReadyManifestSystem _readyManifest = default!; // Impstation - Ready Manifest protected override Type? LinkedScreenType { get; } = typeof(LobbyGui); public LobbyGui? Lobby; @@ -48,6 +50,7 @@ namespace Content.Client.Lobby _gameTicker = _entityManager.System(); _contentAudioSystem = _entityManager.System(); _contentAudioSystem.LobbySoundtrackChanged += UpdateLobbySoundtrackInfo; + _readyManifest = _entityManager.EntitySysManager.GetEntitySystem(); // Impstation - Ready Manifest chatController.SetMainChat(true); @@ -69,6 +72,7 @@ namespace Content.Client.Lobby Lobby.CharacterPreview.CharacterSetupButton.OnPressed += OnSetupPressed; Lobby.ReadyButton.OnPressed += OnReadyPressed; Lobby.ReadyButton.OnToggled += OnReadyToggled; + Lobby.ManifestButton.OnPressed += OnManifestPressed; // Impstation - Ready Manifest _gameTicker.InfoBlobUpdated += UpdateLobbyUi; _gameTicker.LobbyStatusUpdated += LobbyStatusUpdated; @@ -89,6 +93,7 @@ namespace Content.Client.Lobby Lobby!.CharacterPreview.CharacterSetupButton.OnPressed -= OnSetupPressed; Lobby!.ReadyButton.OnPressed -= OnReadyPressed; Lobby!.ReadyButton.OnToggled -= OnReadyToggled; + Lobby!.ManifestButton.OnPressed -= OnManifestPressed; // Impstation - Ready Manifest Lobby = null; } @@ -120,6 +125,12 @@ namespace Content.Client.Lobby SetReady(args.Pressed); } + // Impstation - Ready Manifest + private void OnManifestPressed(BaseButton.ButtonEventArgs args) + { + _readyManifest.RequestReadyManifest(); + } + public override void FrameUpdate(FrameEventArgs e) { if (_gameTicker.IsGameStarted) @@ -182,6 +193,7 @@ namespace Content.Client.Lobby Lobby!.ReadyButton.ToggleMode = false; Lobby!.ReadyButton.Pressed = false; Lobby!.ObserveButton.Disabled = false; + Lobby!.ManifestButton.Disabled = true; //imp } else { @@ -191,6 +203,7 @@ namespace Content.Client.Lobby Lobby!.ReadyButton.ToggleMode = true; Lobby!.ReadyButton.Disabled = false; Lobby!.ObserveButton.Disabled = true; + Lobby!.ManifestButton.Disabled = false; // imp } if (_gameTicker.ServerInfoBlob != null) diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml index aea3281116..287e79eab9 100644 --- a/Content.Client/Lobby/UI/LobbyGui.xaml +++ b/Content.Client/Lobby/UI/LobbyGui.xaml @@ -36,6 +36,10 @@ Align="Left" FontColorOverride="{x:Static maths:Color.DarkGray}" StyleClasses="LabelBig" HorizontalExpand="True" /> + +