Sample sector map through current typed access

This commit is contained in:
Meta Vens 2026-06-29 10:16:04 +01:00
commit 19ca2619c8
2 changed files with 18 additions and 19 deletions

View file

@ -3,7 +3,6 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using GameCult.Aetheria.State.Verse;
using GameCult.Mesh;
using TMPro;
using UniRx;
using UnityEngine;
@ -53,7 +52,6 @@ public class SectorMap : MonoBehaviour
private readonly Queue<IEnumerable<int>> _queuedZoneReveals = new Queue<IEnumerable<int>>();
private readonly Dictionary<int, AetheriaRuntimeSectorMapZone> _zonesByIndex =
new Dictionary<int, AetheriaRuntimeSectorMapZone>();
private CultMeshReactiveDocument<AetheriaRuntimeSectorMapDocument> _sectorMapDocument;
private AetheriaRuntimeSectorMapDocument _sectorMap;
private bool _sectorMapLoaded;
@ -221,9 +219,9 @@ public class SectorMap : MonoBehaviour
private void EnsureSectorMapLoaded()
{
_sectorMapDocument ??= AetheriaUnityRuntimeClientProvider
.ReactiveSectorMap("unity-sector-map");
_sectorMap = _sectorMapDocument?.Current;
_sectorMap = AetheriaUnityRuntimeClientProvider
.RuntimeState("unity-sector-map")
.CurrentSectorMap();
if (_sectorMapLoaded)
return;
@ -252,13 +250,6 @@ public class SectorMap : MonoBehaviour
TryMarkPlayerLocation(_sectorMap.CurrentZoneIndex);
}
private void OnDestroy()
{
_sectorMapDocument?.Dispose();
_sectorMapDocument = null;
_sectorMapLoaded = false;
}
private void AddFactionMaterials(int factionIndex)
{
if (_factionMaterials.ContainsKey(factionIndex))