From 0f3eb79aa71f573c31a8491626507156769cdc9c Mon Sep 17 00:00:00 2001 From: Dorragon <101672978+Dorragon@users.noreply.github.com> Date: Sun, 18 Jan 2026 21:47:07 +0300 Subject: [PATCH] Port Ready Manifest from Impstation (#5187) Meow meow moew meow emweo --- Content.Client/Lobby/LobbyState.cs | 13 ++ Content.Client/Lobby/UI/LobbyGui.xaml | 4 + .../ReadyManifest/ReadyManifestEui.cs | 47 +++++ .../ReadyManifest/ReadyManifestSystem.cs | 20 ++ .../ReadyManifest/ReadyManifestUi.xaml | 10 + .../ReadyManifest/ReadyManifestUi.xaml.cs | 137 +++++++++++++ .../GameTicking/GameTicker.Lobby.cs | 22 +- .../ReadyManifest/ReadyManifestEui.cs | 35 ++++ .../ReadyManifest/ReadyManifestSystem.cs | 188 ++++++++++++++++++ .../SharedReadyManifestSystem.cs | 29 +++ 10 files changed, 504 insertions(+), 1 deletion(-) create mode 100644 Content.Client/_Impstation/ReadyManifest/ReadyManifestEui.cs create mode 100644 Content.Client/_Impstation/ReadyManifest/ReadyManifestSystem.cs create mode 100644 Content.Client/_Impstation/ReadyManifest/ReadyManifestUi.xaml create mode 100644 Content.Client/_Impstation/ReadyManifest/ReadyManifestUi.xaml.cs create mode 100644 Content.Server/_Impstation/ReadyManifest/ReadyManifestEui.cs create mode 100644 Content.Server/_Impstation/ReadyManifest/ReadyManifestSystem.cs create mode 100644 Content.Shared/_Impstation/ReadyManifest/SharedReadyManifestSystem.cs 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" /> + +