From 0f1e8e38dfa17e78a70d2d3d2810c0ea4720dcd3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 13:40:29 +0100 Subject: [PATCH] Wait for daemon ship settings state --- Aetheria.State.Verify/Program.cs | 12 ++++++++++++ Assets/Scripts/UI/Menu/InventoryMenu.cs | 3 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 682ffb576..86deefc90 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -8723,6 +8723,18 @@ static void RequireRuntimeSimulationTuningRequests(string root) string.Join("; ", hits)); } + var inventoryMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryMenu.cs"); + var inventoryMenu = File.Exists(inventoryMenuPath) + ? File.ReadAllText(inventoryMenuPath) + : throw new InvalidOperationException("Cannot verify runtime simulation tuning authority; InventoryMenu.cs is missing."); + var shutdownRequest = inventoryMenu.IndexOf("GameManager.RequestEntityShutdownPerformance", StringComparison.Ordinal); + var staleShipSettingsRender = inventoryMenu.IndexOf("RenderCurrentShipSettingsSurface(entity);", shutdownRequest, StringComparison.Ordinal); + if (shutdownRequest >= 0 && staleShipSettingsRender >= 0) + { + throw new InvalidOperationException( + "InventoryMenu still redraws ship settings immediately after submitting daemon shutdown-performance requests."); + } + var forbiddenUnityAcceptanceSymbols = new[] { "entity?.Settings == null", diff --git a/Assets/Scripts/UI/Menu/InventoryMenu.cs b/Assets/Scripts/UI/Menu/InventoryMenu.cs index 7075ef9ad..67f4d1141 100644 --- a/Assets/Scripts/UI/Menu/InventoryMenu.cs +++ b/Assets/Scripts/UI/Menu/InventoryMenu.cs @@ -202,19 +202,16 @@ public class InventoryMenu : MonoBehaviour GameManager.RequestEntityShutdownPerformance( entity, Mathf.Clamp01(entity.Settings.ShutdownPerformance - ShutdownThresholdStep)); - RenderCurrentShipSettingsSurface(entity); return; case AetheriaRuntimeShipSettingsCommandKind.IncrementShutdownThreshold: GameManager.RequestEntityShutdownPerformance( entity, Mathf.Clamp01(entity.Settings.ShutdownPerformance + ShutdownThresholdStep)); - RenderCurrentShipSettingsSurface(entity); return; case AetheriaRuntimeShipSettingsCommandKind.ResetShutdownThreshold: GameManager.RequestEntityShutdownPerformance( entity, Mathf.Clamp01(GameManager.Settings.GameplaySettings.DefaultShutdownPerformance)); - RenderCurrentShipSettingsSurface(entity); return; case AetheriaRuntimeShipSettingsCommandKind.Close: HideCurrentShipSettingsSurface();