Use named managed map and viewport accessors
This commit is contained in:
parent
68fc0b0aa1
commit
e1052eba30
11 changed files with 188 additions and 80 deletions
|
|
@ -95,10 +95,7 @@ public sealed class AetheriaUnityObservedTargetQuery
|
|||
{
|
||||
return _resolveClient()
|
||||
?.Aetheria()
|
||||
.ZoneContacts
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestZoneContacts();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -107,10 +107,7 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour
|
|||
_document = ResolveClient()
|
||||
.Aetheria()
|
||||
.Viewports
|
||||
.RenderSplats(ResolveViewportBounds())
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestRenderSplats(ResolveViewportBounds());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -367,10 +367,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
_currentEntityDocument = ResolveClient()
|
||||
.Aetheria()
|
||||
.Current
|
||||
.Entity
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestEntity();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -163,10 +163,7 @@ public class MainMenu : MonoBehaviour
|
|||
{
|
||||
return ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.SectorMap
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestSectorMap();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,17 +127,11 @@ public class MapRenderer : MonoBehaviour
|
|||
_objectsViewport = client
|
||||
.Aetheria()
|
||||
.Viewports
|
||||
.Objects(viewport)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestObjects(viewport);
|
||||
_renderSplatsViewport = client
|
||||
.Aetheria()
|
||||
.Viewports
|
||||
.RenderSplats(viewport)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestRenderSplats(viewport);
|
||||
|
||||
var zoneName = string.IsNullOrWhiteSpace(_objectsViewport?.ZoneName)
|
||||
? "Unknown"
|
||||
|
|
|
|||
|
|
@ -221,10 +221,7 @@ public class SectorMap : MonoBehaviour
|
|||
{
|
||||
_sectorMap = ResolveClient()
|
||||
.Aetheria()
|
||||
.SectorMap
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestSectorMap();
|
||||
|
||||
if (_sectorMapLoaded)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -171,10 +171,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
{
|
||||
var sectorMap = ResolveClient()
|
||||
.Aetheria()
|
||||
.SectorMap
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestSectorMap();
|
||||
return (sectorMap?.Zones ?? Array.Empty<AetheriaRuntimeSectorMapZone>())
|
||||
.FirstOrDefault(zone => zone.ZoneIndex == zoneIndex);
|
||||
}
|
||||
|
|
@ -200,10 +197,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.Details
|
||||
.Zone(zoneIndex)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestZone(zoneIndex);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -309,10 +303,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.Current
|
||||
.Zone
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestZone();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,8 +102,7 @@ public class VolumeCloudRenderer : EffectBase
|
|||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.Settings
|
||||
.Player
|
||||
.Latest();
|
||||
.LatestPlayer();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -895,10 +895,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
var objects = ResolveClient()
|
||||
.Aetheria()
|
||||
.Viewports
|
||||
.Objects(ToViewportBounds(viewport))
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestObjects(ToViewportBounds(viewport));
|
||||
foreach (var entity in objects?.Objects ?? Array.Empty<AetheriaRuntimeRtsViewportObject>())
|
||||
{
|
||||
if (entity != null && entity.EntityIndex >= 0)
|
||||
|
|
@ -943,10 +940,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
{
|
||||
var contacts = ResolveClient()
|
||||
.Aetheria()
|
||||
.ZoneContacts
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestZoneContacts();
|
||||
foreach (var target in contacts?.Targets ?? Array.Empty<AetheriaRuntimeZoneTargetRow>())
|
||||
{
|
||||
if (target != null && target.EntityIndex >= 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue