Rename observed facades as entity snapshots
This commit is contained in:
parent
8f2ed3326b
commit
ee0f73d40d
17 changed files with 152 additions and 152 deletions
|
|
@ -34,7 +34,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
private AetheriaRuntimeCatalogSnapshot _catalog;
|
||||
private AetheriaRuntimePlayerSettingsDocument _playerSettings;
|
||||
private AetheriaUnityActionBarPresentation _actionBarPresentation;
|
||||
private AetheriaUnityObservedFacadeIndex _observedFacadeIndex;
|
||||
private AetheriaUnityObservedEntityIndex _observedEntityIndex;
|
||||
private readonly AetheriaEveUnitySurfaceChrome _shipSettingsSurfaceChrome = PanelChrome(360f, 420f);
|
||||
private readonly AetheriaEveUnitySurfaceChrome _cargoItemDetailsSurfaceChrome = PanelChrome(420f, 520f);
|
||||
private readonly AetheriaEveUnitySurfaceChrome _equippedItemDetailsSurfaceChrome = PanelChrome(460f, 560f);
|
||||
|
|
@ -58,9 +58,9 @@ public class InventoryMenu : MonoBehaviour
|
|||
_actionBarPresentation = actionBarPresentation;
|
||||
}
|
||||
|
||||
public void SetObservedFacadeIndex(AetheriaUnityObservedFacadeIndex observedFacadeIndex)
|
||||
public void SetObservedEntityIndex(AetheriaUnityObservedEntityIndex observedEntityIndex)
|
||||
{
|
||||
_observedFacadeIndex = observedFacadeIndex;
|
||||
_observedEntityIndex = observedEntityIndex;
|
||||
}
|
||||
// private int2 _dragCellOffset;
|
||||
// private ItemRotation _originalRotation;
|
||||
|
|
@ -704,8 +704,8 @@ public class InventoryMenu : MonoBehaviour
|
|||
private bool TryResolveEntityRecordKey(Entity entity, out string recordKey)
|
||||
{
|
||||
recordKey = "";
|
||||
return _observedFacadeIndex != null &&
|
||||
_observedFacadeIndex.TryResolveEntityRecordKey(entity, out recordKey);
|
||||
return _observedEntityIndex != null &&
|
||||
_observedEntityIndex.TryResolveEntityRecordKey(entity, out recordKey);
|
||||
}
|
||||
|
||||
private bool IsCurrentEntity(Entity entity)
|
||||
|
|
@ -799,10 +799,10 @@ public class InventoryMenu : MonoBehaviour
|
|||
private bool TryResolveObservedDockingIndex(out AetheriaUnityObservedDockingIndex dockingIndex)
|
||||
{
|
||||
dockingIndex = null;
|
||||
if (_observedFacadeIndex == null)
|
||||
if (_observedEntityIndex == null)
|
||||
return false;
|
||||
|
||||
dockingIndex = new AetheriaUnityObservedDockingIndex(ResolveClient, _observedFacadeIndex);
|
||||
dockingIndex = new AetheriaUnityObservedDockingIndex(ResolveClient, _observedEntityIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
private Texture2D _temperatureTexture;
|
||||
private RectTransform _firstRect;
|
||||
private AetheriaUnityDragSession _dragSession;
|
||||
private AetheriaUnityObservedFacadeIndex _observedFacadeIndex;
|
||||
private AetheriaUnityObservedEntityIndex _observedEntityIndex;
|
||||
|
||||
public ItemInstance FakeItem;
|
||||
public Shape FakeOccupancy;
|
||||
|
|
@ -85,9 +85,9 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler
|
|||
_dragSession = dragSession;
|
||||
}
|
||||
|
||||
public void SetObservedFacadeIndex(AetheriaUnityObservedFacadeIndex observedFacadeIndex)
|
||||
public void SetObservedEntityIndex(AetheriaUnityObservedEntityIndex observedEntityIndex)
|
||||
{
|
||||
_observedFacadeIndex = observedFacadeIndex;
|
||||
_observedEntityIndex = observedEntityIndex;
|
||||
}
|
||||
|
||||
private AetheriaUnityDragSession DragSession => _dragSession ??= new AetheriaUnityDragSession();
|
||||
|
|
@ -1109,8 +1109,8 @@ private void Update()
|
|||
private bool TryResolveEntityRecordKey(Entity entity, out string recordKey)
|
||||
{
|
||||
recordKey = "";
|
||||
return _observedFacadeIndex != null &&
|
||||
_observedFacadeIndex.TryResolveEntityRecordKey(entity, out recordKey);
|
||||
return _observedEntityIndex != null &&
|
||||
_observedEntityIndex.TryResolveEntityRecordKey(entity, out recordKey);
|
||||
}
|
||||
|
||||
private bool IsCurrentEntity(Entity entity)
|
||||
|
|
@ -1178,10 +1178,10 @@ private void Update()
|
|||
private bool TryResolveObservedDockingIndex(out AetheriaUnityObservedDockingIndex dockingIndex)
|
||||
{
|
||||
dockingIndex = null;
|
||||
if (_observedFacadeIndex == null)
|
||||
if (_observedEntityIndex == null)
|
||||
return false;
|
||||
|
||||
dockingIndex = new AetheriaUnityObservedDockingIndex(ResolveClient, _observedFacadeIndex);
|
||||
dockingIndex = new AetheriaUnityObservedDockingIndex(ResolveClient, _observedEntityIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1201,10 +1201,10 @@ private void Update()
|
|||
private bool TryResolveObservedAvailableEntityByKey(string entityKey, out Entity entity)
|
||||
{
|
||||
entity = null;
|
||||
if (_observedFacadeIndex == null || string.IsNullOrWhiteSpace(entityKey))
|
||||
if (_observedEntityIndex == null || string.IsNullOrWhiteSpace(entityKey))
|
||||
return false;
|
||||
|
||||
return _observedFacadeIndex.TryResolveEntityByRecordKey(entityKey, out entity);
|
||||
return _observedEntityIndex.TryResolveEntityByRecordKey(entityKey, out entity);
|
||||
}
|
||||
|
||||
private bool IsDisplayedEntityKey(string entityKey)
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ public class LocalMenu : MonoBehaviour
|
|||
private readonly List<ActiveStoryChoice> _activeChoices = new List<ActiveStoryChoice>();
|
||||
private UIDocument _surfaceDocument;
|
||||
private readonly AetheriaEveUnitySurfaceChrome _surfaceChrome = new AetheriaEveUnitySurfaceChrome();
|
||||
private AetheriaUnityObservedFacadeIndex _observedFacadeIndex;
|
||||
private AetheriaUnityObservedEntityIndex _observedEntityIndex;
|
||||
|
||||
public void SetObservedFacadeIndex(AetheriaUnityObservedFacadeIndex observedFacadeIndex)
|
||||
public void SetObservedEntityIndex(AetheriaUnityObservedEntityIndex observedEntityIndex)
|
||||
{
|
||||
_observedFacadeIndex = observedFacadeIndex;
|
||||
_observedEntityIndex = observedEntityIndex;
|
||||
}
|
||||
|
||||
private sealed class ActiveStoryChoice
|
||||
|
|
@ -224,12 +224,12 @@ public class LocalMenu : MonoBehaviour
|
|||
private bool TryResolveDockedLocalStory(out LocationStory story)
|
||||
{
|
||||
story = null;
|
||||
if (_observedFacadeIndex == null ||
|
||||
if (_observedEntityIndex == null ||
|
||||
!TryResolveDockingState(out var dockingState) ||
|
||||
dockingState?.IsDocked != true ||
|
||||
string.IsNullOrWhiteSpace(dockingState.DockParentEntityKey) ||
|
||||
dockingState.DockingBayIndex < 0 ||
|
||||
!_observedFacadeIndex.TryResolveDockingBayByRecordKey(
|
||||
!_observedEntityIndex.TryResolveDockingBayByRecordKey(
|
||||
dockingState.DockParentEntityKey,
|
||||
dockingState.DockingBayIndex,
|
||||
out var dockingBay) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue