Remove Unity runtime state call chains

This commit is contained in:
Meta Vens 2026-06-29 12:33:48 +01:00
commit f09c298bcd
5 changed files with 37 additions and 26 deletions

View file

@ -34,11 +34,10 @@ public sealed class AetheriaUnityGameplayBootShell
$"Aetheria runtime state file is missing at {stateBoot.StateFilePath}; gameplay requires an authoritative daemon mirror.");
}
var runtimeState = AetheriaUnityRuntimeClientProvider.RuntimeState(stateBoot, stateBoot.RuntimeId);
var runtimeCatalog = runtimeState.CurrentCatalog();
var runtimeCatalog = AetheriaUnityRuntimeClientProvider.CurrentCatalog(stateBoot, stateBoot.RuntimeId);
if (runtimeCatalog == null)
throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot.");
var sectorMap = runtimeState.CurrentSectorMap();
var sectorMap = AetheriaUnityRuntimeClientProvider.CurrentSectorMap(stateBoot, stateBoot.RuntimeId);
if (sectorMap == null)
throw new InvalidOperationException("Aetheria typed sector map is required before gameplay boot.");

View file

@ -105,9 +105,7 @@ public sealed class AetheriaUnityGameplaySceneWiring
{
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-target-presentation")
.CurrentZoneContacts();
return AetheriaUnityRuntimeClientProvider.CurrentZoneContacts("unity-target-presentation");
}
catch (Exception ex)
{

View file

@ -126,6 +126,11 @@ public static class AetheriaUnityRuntimeClientProvider
return RuntimeState(runtimeId).CurrentZoneState();
}
public static AetheriaRuntimeZoneContactsDocument CurrentZoneContacts(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentZoneContacts();
}
public static AetheriaRuntimeStationRefitDocument CurrentStationRefit(string runtimeId = "")
{
return RuntimeState(runtimeId).CurrentStationRefit();
@ -158,6 +163,13 @@ public static class AetheriaUnityRuntimeClientProvider
return RuntimeState(runtimeId).CurrentDaemonFrame();
}
public static AetheriaRuntimeDaemonFrameDocument CurrentDaemonFrame(
AetheriaRuntimeStateBootReport stateBoot,
string runtimeId = "")
{
return RuntimeState(stateBoot, runtimeId).CurrentDaemonFrame();
}
public static AetheriaRuntimeVerseHostSettingsDocument CurrentVerseHostSettings(
AetheriaRuntimeStateBootReport stateBoot,
string runtimeId = "")
@ -220,7 +232,7 @@ public static class AetheriaUnityRuntimeClientProvider
{
try
{
var stored = RuntimeState().CurrentPlayerSettings();
var stored = CurrentPlayerSettings();
if (stored == null)
return;

View file

@ -312,8 +312,7 @@ public class MapRenderer : MonoBehaviour
try
{
return AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-map-renderer")
.CurrentPlayerSettings()
.CurrentPlayerSettings("unity-map-renderer")
?.ShowAsteroidsInMinimap ?? false;
}
catch (Exception ex)