Name main menu catalog access as document read

This commit is contained in:
Meta Vens 2026-06-28 03:21:47 +01:00
commit 09e18a4b4c
2 changed files with 10 additions and 2 deletions

View file

@ -13216,8 +13216,10 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
if (!mainMenu.Contains("AetheriaClient", StringComparison.Ordinal) ||
!mainMenu.Contains("LatestSectorMap(AetheriaRuntimeStateBootReport stateBoot)", StringComparison.Ordinal) ||
!mainMenu.Contains("LatestRuntimeCatalog(AetheriaRuntimeStateBootReport stateBoot)", StringComparison.Ordinal) ||
!mainMenu.Contains(".Aetheria()", StringComparison.Ordinal) ||
!mainMenu.Contains(".SectorMap", StringComparison.Ordinal) ||
!mainMenu.Contains(".Catalog.Latest()", StringComparison.Ordinal) ||
!mainMenu.Contains(".LatestAsync()", StringComparison.Ordinal))
{
throw new InvalidOperationException(
@ -13230,6 +13232,12 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
"MainMenu still reads daemon frames through the runtime file reader instead of the shared Aetheria client facade.");
}
if (mainMenu.Contains("OpenRuntimeCatalog(", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"MainMenu still names runtime catalog access as a raw catalog open instead of a managed latest document read.");
}
var forbiddenMainMenuReaderSymbols = new[]
{
"AetheriaRuntimeStateReader.ReadPlayerSettings",

View file

@ -131,7 +131,7 @@ public class MainMenu : MonoBehaviour
setState($"Observing sector-map frame {sectorMap.FrameId}");
var backgroundSettings = sectorMap.IsTutorial ? Settings.TutorialBackgroundSettings : Settings.SectorBackgroundSettings;
backgroundSettings.NoisePosition = sectorMap.GenerationSeed == 0 ? 1 : sectorMap.GenerationSeed;
var runtimeCatalog = OpenRuntimeCatalog(stateBoot);
var runtimeCatalog = LatestRuntimeCatalog(stateBoot);
if (runtimeCatalog == null)
{
Debug.LogWarning($"Cannot start Aetheria observer scene without a runtime catalog in {stateBoot.StateFilePath}.");
@ -215,7 +215,7 @@ public class MainMenu : MonoBehaviour
}
}
private AetheriaRuntimeCatalogSnapshot OpenRuntimeCatalog(AetheriaRuntimeStateBootReport stateBoot)
private AetheriaRuntimeCatalogSnapshot LatestRuntimeCatalog(AetheriaRuntimeStateBootReport stateBoot)
{
if (!stateBoot.SupportsLocalStateFileRead || !stateBoot.StateFileExists)
return null;