From 93ece6b3050d33d2b8882e4ea31735ed88896252 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 12:28:10 +0100 Subject: [PATCH] Let daemon validate docked ship selection --- Aetheria.State.Verify/Program.cs | 22 ++++++++++++++++++-- Assets/Scripts/Gameplay/ActionGameManager.cs | 5 +---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 0c961c7c7..892d20bc7 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -8512,8 +8512,9 @@ static void RequireRuntimeSimulationTuningRequests(string root) "entity?.Settings == null", "entity.Settings == null" }; - var unityAcceptanceHits = forbiddenUnityAcceptanceSymbols - .Where(symbol => actionGameManager.Contains(symbol, StringComparison.Ordinal)) + var unityAcceptanceHits = FindMethodScopedLineHits(actionGameManager, forbiddenUnityAcceptanceSymbols) + .Where(hit => hit.MethodName == "RequestEntityShutdownPerformance") + .Select(hit => $"ActionGameManager.cs:{hit.LineNumber}: {hit.Line.Trim()}") .ToArray(); if (unityAcceptanceHits.Length > 0) { @@ -9338,6 +9339,23 @@ static void RequireDockedCurrentShipRequestAuthority(string root) "Unity docked current-ship selection still rejects through renderer-local child membership instead of daemon acceptance."); } + var forbiddenUnityAcceptanceSymbols = new[] + { + "!ship.IsPlayerShip", + "DockedEntity == null", + "DockingBay == null" + }; + var unityAcceptanceHits = FindMethodScopedLineHits(actionGameManager, forbiddenUnityAcceptanceSymbols) + .Where(hit => hit.MethodName == "RequestDockedCurrentShip") + .Select(hit => $"ActionGameManager.cs:{hit.LineNumber}: {hit.Line.Trim()}") + .ToArray(); + if (unityAcceptanceHits.Length > 0) + { + throw new InvalidOperationException( + "Unity docked current-ship selection still rejects through renderer-local player/docking state instead of daemon acceptance: " + + string.Join(", ", unityAcceptanceHits)); + } + var inventoryPanelPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryPanel.cs"); var forbiddenSymbols = new[] { diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index d5c6c4dd6..23a84995c 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -951,10 +951,7 @@ public class ActionGameManager : MonoBehaviour public bool RequestDockedCurrentShip(Ship ship) { - if (ship == null || - !ship.IsPlayerShip || - DockedEntity == null || - DockingBay == null) + if (ship == null) { return false; }