Centralize managed docking snapshot reads
This commit is contained in:
parent
14a4680c5f
commit
a924b0e35b
7 changed files with 110 additions and 79 deletions
|
|
@ -1162,18 +1162,11 @@ private void Update()
|
|||
|
||||
private AetheriaClientDockingSnapshot ResolveDockingState()
|
||||
{
|
||||
try
|
||||
{
|
||||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.DockingState
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogWarning($"Failed to read Aetheria docking state for inventory panel: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
if (ResolveClient().Aetheria().DockingState.TryLatest(out var docking))
|
||||
return docking;
|
||||
|
||||
Debug.LogWarning("Failed to read Aetheria docking state for inventory panel.");
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool TryResolveObservedDockingIndex(out AetheriaUnityObservedDockingIndex dockingIndex)
|
||||
|
|
|
|||
Loading…
Reference in a new issue