Flatten Aetheria CultMesh reactive access
This commit is contained in:
parent
0a78a0071a
commit
0830588cbb
26 changed files with 306 additions and 405 deletions
|
|
@ -326,7 +326,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
_catalog = ResolveClient().State.Document<AetheriaRuntimeCatalogSnapshot>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -342,7 +342,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
_playerSettings = ResolveClient().State.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
_playerSettings = ResolveClient().State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -359,7 +359,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
_currentEntity = ResolveClient().State.Reactive<AetheriaRuntimeCurrentEntityDocument>();
|
||||
_currentEntity = ResolveClient().State.Document<AetheriaRuntimeCurrentEntityDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -393,8 +393,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -151,8 +151,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_sectorMap ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
.State.Document<AetheriaRuntimeSectorMapDocument>().Reactive();
|
||||
return _sectorMap?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -170,8 +169,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
return _playerSettings?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -189,8 +187,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_verseHostSettings ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeVerseHostSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimeVerseHostSettingsDocument>().Reactive();
|
||||
return _verseHostSettings?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -965,8 +965,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_currentEntity = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeCurrentEntityDocument>();
|
||||
.State.Document<AetheriaRuntimeCurrentEntityDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -984,8 +983,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
.State.Document<AetheriaRuntimeStationRefitDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1004,8 +1002,8 @@ public class InventoryMenu : MonoBehaviour
|
|||
{
|
||||
var nextInventory = ResolveClient()
|
||||
.State
|
||||
.Details
|
||||
.Reactive<AetheriaRuntimeInventoryDocument>(entityIndex);
|
||||
.Document<AetheriaRuntimeInventoryDocument>(entityIndex)
|
||||
.Reactive();
|
||||
_inventory?.Dispose();
|
||||
_inventoryEntityIndex = entityIndex;
|
||||
_inventory = nextInventory;
|
||||
|
|
@ -1077,7 +1075,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
_catalog = ResolveClient().State.Document<AetheriaRuntimeCatalogSnapshot>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1095,8 +1093,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1504,8 +1504,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_currentEntity = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeCurrentEntityDocument>();
|
||||
.State.Document<AetheriaRuntimeCurrentEntityDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1523,8 +1522,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
.State.Document<AetheriaRuntimeStationRefitDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1550,8 +1548,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_loadoutFrame = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeDaemonFrameDocument>();
|
||||
.State.Document<AetheriaRuntimeDaemonFrameDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1570,8 +1567,8 @@ private void Update()
|
|||
{
|
||||
var nextInventory = ResolveClient()
|
||||
.State
|
||||
.Details
|
||||
.Reactive<AetheriaRuntimeInventoryDocument>(entityIndex);
|
||||
.Document<AetheriaRuntimeInventoryDocument>(entityIndex)
|
||||
.Reactive();
|
||||
_inventory?.Dispose();
|
||||
_inventoryEntityIndex = entityIndex;
|
||||
_inventory = nextInventory;
|
||||
|
|
@ -1591,7 +1588,7 @@ private void Update()
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
_catalog = ResolveClient().State.Document<AetheriaRuntimeCatalogSnapshot>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1609,8 +1606,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -131,12 +131,12 @@ public class MapRenderer : MonoBehaviour
|
|||
ClearViewportCaches();
|
||||
_objectsViewport = client
|
||||
.State
|
||||
.Viewports
|
||||
.Reactive<AetheriaRuntimeObjectsViewportDocument>(viewport);
|
||||
.Document<AetheriaRuntimeObjectsViewportDocument>(viewport)
|
||||
.Reactive();
|
||||
_renderSplatsViewport = client
|
||||
.State
|
||||
.Viewports
|
||||
.Reactive<AetheriaRuntimeRenderSplatsViewportDocument>(viewport);
|
||||
.Document<AetheriaRuntimeRenderSplatsViewportDocument>(viewport)
|
||||
.Reactive();
|
||||
|
||||
var objectsViewport = _objectsViewport?.Current;
|
||||
var zoneName = string.IsNullOrWhiteSpace(objectsViewport?.ZoneName)
|
||||
|
|
@ -319,8 +319,7 @@ public class MapRenderer : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings ??= ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
return _playerSettings?.Current?.ShowAsteroidsInMinimap ?? false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ public class MenuPanel : MonoBehaviour
|
|||
docking = null;
|
||||
try
|
||||
{
|
||||
_currentDocking ??= ResolveClient().State.Reactive<AetheriaRuntimeCurrentDockingDocument>();
|
||||
_currentDocking ??= ResolveClient().State.Document<AetheriaRuntimeCurrentDockingDocument>().Reactive();
|
||||
docking = _currentDocking.Current;
|
||||
return docking != null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,8 +222,7 @@ public class SectorMap : MonoBehaviour
|
|||
private void EnsureSectorMapLoaded()
|
||||
{
|
||||
_sectorMapDocument ??= ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
.State.Document<AetheriaRuntimeSectorMapDocument>().Reactive();
|
||||
_sectorMap = _sectorMapDocument?.Current;
|
||||
|
||||
if (_sectorMapLoaded)
|
||||
|
|
|
|||
|
|
@ -175,8 +175,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_sectorMap ??= ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
.State.Document<AetheriaRuntimeSectorMapDocument>().Reactive();
|
||||
var sectorMap = _sectorMap?.Current;
|
||||
return (sectorMap?.Zones ?? Array.Empty<AetheriaRuntimeSectorMapZone>())
|
||||
.FirstOrDefault(zone => zone.ZoneIndex == zoneIndex);
|
||||
|
|
@ -205,8 +204,8 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
{
|
||||
var nextZoneDetails = ResolveClient()
|
||||
.State
|
||||
.Details
|
||||
.Reactive<AetheriaRuntimeZoneDetailsDocument>(zoneIndex);
|
||||
.Document<AetheriaRuntimeZoneDetailsDocument>(zoneIndex)
|
||||
.Reactive();
|
||||
_zoneDetails?.Dispose();
|
||||
_zoneDetailsIndex = zoneIndex;
|
||||
_zoneDetails = nextZoneDetails;
|
||||
|
|
@ -232,7 +231,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
_catalog = ResolveClient().State.Document<AetheriaRuntimeCatalogSnapshot>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -250,8 +249,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -322,8 +320,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_currentZone ??= ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimeCurrentZoneDocument>();
|
||||
.State.Document<AetheriaRuntimeCurrentZoneDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_stationRefit = ResolveClient().State.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
_stationRefit = ResolveClient().State.Document<AetheriaRuntimeStationRefitDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -533,7 +533,7 @@ public class TradeMenu : MonoBehaviour
|
|||
docking = null;
|
||||
try
|
||||
{
|
||||
_currentDocking ??= ResolveClient().State.Reactive<AetheriaRuntimeCurrentDockingDocument>();
|
||||
_currentDocking ??= ResolveClient().State.Document<AetheriaRuntimeCurrentDockingDocument>().Reactive();
|
||||
docking = _currentDocking.Current;
|
||||
return docking != null;
|
||||
}
|
||||
|
|
@ -627,7 +627,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
_catalog = ResolveClient().State.Document<AetheriaRuntimeCatalogSnapshot>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -645,8 +645,7 @@ public class TradeMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
.State.Document<AetheriaRuntimePlayerSettingsDocument>().Reactive();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue