From e180293b5d058aabba6ba905238cba2c1c0459f8 Mon Sep 17 00:00:00 2001 From: username <32684670+Snorkcom@users.noreply.github.com> Date: Fri, 14 Aug 2026 04:10:29 +0600 Subject: [PATCH 1/2] Fix crew manifest station lookup Resolve the owning station from the PDA loader instead of the manifest program entity, preventing empty crew manifests when reopening the PDA --- .../CartridgeLoader/Cartridges/CrewManifestCartridgeSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/CartridgeLoader/Cartridges/CrewManifestCartridgeSystem.cs b/Content.Server/CartridgeLoader/Cartridges/CrewManifestCartridgeSystem.cs index 65ea57f98099..d60252408c86 100644 --- a/Content.Server/CartridgeLoader/Cartridges/CrewManifestCartridgeSystem.cs +++ b/Content.Server/CartridgeLoader/Cartridges/CrewManifestCartridgeSystem.cs @@ -59,7 +59,7 @@ private void UpdateUiState(EntityUid uid, EntityUid loaderUid, CrewManifestCartr if (!Resolve(uid, ref component)) return; - var owningStation = _stationSystem.GetOwningStation(uid); + var owningStation = _stationSystem.GetOwningStation(loaderUid); // CorvaxGoob Edit - fix-crew-manifest-open-refresh-v2 if (owningStation is null) return; From ef3fff485180fda50b37334e18030a0e04a80431 Mon Sep 17 00:00:00 2001 From: username <32684670+Snorkcom@users.noreply.github.com> Date: Fri, 14 Aug 2026 05:45:50 +0600 Subject: [PATCH 2/2] Refresh crew manifest when reopening PDA Request an updated crew manifest when the PDA reuses an existing manifest interface. This prevents the previous same-fragment check from skipping the refresh and displaying stale data. --- .../CartridgeLoaderBoundUserInterface.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Content.Client/CartridgeLoader/CartridgeLoaderBoundUserInterface.cs b/Content.Client/CartridgeLoader/CartridgeLoaderBoundUserInterface.cs index 037f5184b95c..0d7b56218f6a 100644 --- a/Content.Client/CartridgeLoader/CartridgeLoaderBoundUserInterface.cs +++ b/Content.Client/CartridgeLoader/CartridgeLoaderBoundUserInterface.cs @@ -1,5 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later +using Content.Client.CartridgeLoader.Cartridges; // CorvaxGoob - fix-crew-manifest-open-refresh-v2 using Content.Client.UserInterface.Fragments; using Content.Shared.CartridgeLoader; using Robust.Client.UserInterface; @@ -41,6 +42,17 @@ protected override void UpdateState(BoundUserInterfaceState state) var activeUI = _entManager.GetEntity(loaderUiState.ActiveUI); + // CorvaxGoob Start - fix-crew-manifest-open-refresh-v2 + // A reopened PDA can reuse its BUI, so refresh the attached manifest without recreating its controls. + if (_activeProgram == activeUI && _activeUiFragment is not null) + { + if (_activeCartridgeUI is CrewManifestUi && _activeProgram.HasValue) + SendCartridgeUiReadyEvent(_activeProgram.Value); + + return; + } + // CorvaxGoob End + _activeProgram = activeUI; var ui = RetrieveCartridgeUI(activeUI); @@ -48,8 +60,8 @@ protected override void UpdateState(BoundUserInterfaceState state) var control = ui?.GetUIFragmentRoot(); //Prevent the same UI fragment from getting disposed and attached multiple times - if (_activeUiFragment?.GetType() == control?.GetType()) - return; + //if (_activeUiFragment?.GetType() == control?.GetType()) + // return; if (_activeUiFragment is not null) DetachCartridgeUI(_activeUiFragment);