From 8104f5eb677923911a0c3191964069ebee8e2710 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 13:30:10 +0100 Subject: [PATCH] Wait for daemon hull conductivity state --- Aetheria.State.Verify/Program.cs | 17 +++++++++++++++++ Assets/Scripts/UI/Menu/InventoryPanel.cs | 12 ++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index f0cb60627..e1971266f 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -8810,6 +8810,23 @@ static void RequireHullConductivityRequestAuthority(string root) "Hull conductivity still has renderer-local UI write authority: " + string.Join("; ", hits)); } + + var submissionAcceptanceHits = Directory.EnumerateFiles(uiRoot, "*.cs", SearchOption.AllDirectories) + .SelectMany(path => File.ReadLines(path) + .Select((line, index) => new { Path = path, LineNumber = index + 1, Line = line })) + .Where(line => + line.Line.Contains("if (GameManager.RequestHullConductivityToggle", StringComparison.Ordinal) || + line.Line.Contains("if (RequestHullConductivityToggle", StringComparison.Ordinal) || + line.Line.Contains("RefreshCells(new []{v,int2", StringComparison.Ordinal)) + .Select(line => $"{Path.GetRelativePath(root, line.Path)}:{line.LineNumber}: {line.Line.Trim()}") + .ToArray(); + + if (submissionAcceptanceHits.Length > 0) + { + throw new InvalidOperationException( + "Hull conductivity UI still treats daemon submission as accepted cell state: " + + string.Join("; ", submissionAcceptanceHits)); + } } static void RequireInventoryEntityRenameRequestAuthority(string root) diff --git a/Assets/Scripts/UI/Menu/InventoryPanel.cs b/Assets/Scripts/UI/Menu/InventoryPanel.cs index 18bc419dd..c4b95c3b7 100644 --- a/Assets/Scripts/UI/Menu/InventoryPanel.cs +++ b/Assets/Scripts/UI/Menu/InventoryPanel.cs @@ -664,23 +664,19 @@ private void Update() // Debug.Log($"Clicked at pos {data.position}, normalized {point}"); if (_displayedHullShape[int2(v.x - 1, v.y)] && point.x < ThermalToggleRegionSize) { - if (GameManager.RequestHullConductivityToggle(entity, int2(v.x - 1, v.y), 0)) - RefreshCells(new []{v,int2(v.x - 1, v.y)}); + GameManager.RequestHullConductivityToggle(entity, int2(v.x - 1, v.y), 0); } if (_displayedHullShape[int2(v.x + 1, v.y)] && point.x > 1 - ThermalToggleRegionSize) { - if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 0)) - RefreshCells(new []{v,int2(v.x + 1, v.y)}); + GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 0); } if (_displayedHullShape[int2(v.x, v.y - 1)] && point.y < ThermalToggleRegionSize) { - if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y - 1), 1)) - RefreshCells(new []{v,int2(v.x, v.y - 1)}); + GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y - 1), 1); } if (_displayedHullShape[int2(v.x, v.y + 1)] && point.y > 1 - ThermalToggleRegionSize) { - if (GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 1)) - RefreshCells(new []{v,int2(v.x, v.y + 1)}); + GameManager.RequestHullConductivityToggle(entity, int2(v.x, v.y), 1); } }); }