Use named managed shared state accessors
This commit is contained in:
parent
a924b0e35b
commit
68fc0b0aa1
15 changed files with 144 additions and 56 deletions
|
|
@ -85,7 +85,7 @@ public abstract class ActionBarBinding
|
|||
|
||||
try
|
||||
{
|
||||
_catalog ??= Client.Aetheria().Catalog.Latest();
|
||||
_catalog ??= Client.Aetheria().LatestCatalog();
|
||||
return _catalog?.FindItem(item.ItemKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ public sealed class AetheriaUnityGameplayBootShell
|
|||
|
||||
var runtimeCatalog = AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)
|
||||
.Aetheria()
|
||||
.Catalog
|
||||
.Latest();
|
||||
.LatestCatalog();
|
||||
if (runtimeCatalog == null)
|
||||
throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot.");
|
||||
|
||||
|
|
|
|||
|
|
@ -163,11 +163,8 @@ public sealed class AetheriaUnityObservedDockingIndex
|
|||
snapshot = null;
|
||||
try
|
||||
{
|
||||
snapshot = _resolveClient()
|
||||
?.Aetheria()
|
||||
.DockingState
|
||||
.Latest();
|
||||
return snapshot != null;
|
||||
var client = _resolveClient();
|
||||
return client?.Aetheria().DockingState.TryLatest(out snapshot) == true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
var stored = ResolveClient(AetheriaUnityRuntimePaths.RuntimeStateFilePath)
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
if (stored == null)
|
||||
return settings;
|
||||
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -347,8 +347,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -391,8 +391,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -185,8 +185,7 @@ public class MainMenu : MonoBehaviour
|
|||
return ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -205,8 +204,7 @@ public class MainMenu : MonoBehaviour
|
|||
return ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.VerseHost
|
||||
.Latest();
|
||||
.LatestVerseHost();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -225,7 +223,7 @@ public class MainMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient(stateBoot).Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient(stateBoot).Aetheria().LatestCatalog();
|
||||
return _catalog;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -999,7 +999,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1019,8 +1019,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1496,7 +1496,7 @@ private void Update()
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1516,8 +1516,7 @@ private void Update()
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -320,8 +320,7 @@ public class MapRenderer : MonoBehaviour
|
|||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest()
|
||||
.LatestPlayer()
|
||||
?.ShowAsteroidsInMinimap ?? false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -245,8 +245,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -648,8 +648,7 @@ public class TradeMenu : MonoBehaviour
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().Catalog.Latest();
|
||||
_catalog = ResolveClient().Aetheria().LatestCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue