Remove Unity runtime state call chains
This commit is contained in:
parent
7285a82cb1
commit
f09c298bcd
5 changed files with 37 additions and 26 deletions
|
|
@ -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.");
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue