diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 167ac6e6a..665e6ed4b 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/UI/Menu/InventoryPanel.cs b/Assets/Scripts/UI/Menu/InventoryPanel.cs index 651953ef7..e6a951c4a 100644 --- a/Assets/Scripts/UI/Menu/InventoryPanel.cs +++ b/Assets/Scripts/UI/Menu/InventoryPanel.cs @@ -6,6 +6,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; +using GameCult.Aetheria.State.Unity; using TMPro; using UniRx; using UniRx.Triggers; @@ -851,7 +852,9 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler return Color.white * .25f; var c = float3(1); - if (GameManager.ItemManager.GetData(item) is EquippableItemData equippable) + if (TryGetTypedHardpointType(item, out var typedHardpoint)) + c = HardpointData.GetColor(typedHardpoint); + else if (GameManager.ItemManager.GetData(item) is EquippableItemData equippable) c = HardpointData.GetColor(equippable.HardpointType); if(!highlight) @@ -861,6 +864,23 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler } } + private static bool TryGetTypedHardpointType(ItemInstance item, out HardpointType hardpointType) + { + hardpointType = HardpointType.Hull; + var typedItem = FindTypedInventoryItem(item); + return typedItem != null && + !string.IsNullOrWhiteSpace(typedItem.HardpointType) && + Enum.TryParse(typedItem.HardpointType, true, out hardpointType); + } + + private static AetheriaRuntimeCatalogItem FindTypedInventoryItem(ItemInstance item) + { + var itemId = item?.Data?.ItemId ?? Guid.Empty; + return itemId == Guid.Empty + ? null + : ActionGameManager.RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D")); + } + public bool CanDropItem(ItemInstance item) { if (_displayedEntity != null && item is EquippableItem equippableItem) diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index be3f4bfbb..f15567510 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -150,6 +150,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. reflection, thermal curves, and durability math that have not yet moved to typed behavior surfaces. Inventory selection highlighting now uses typed item shape cells for UI tint geometry before falling back to legacy `ItemData.Shape`. + Inventory cargo cell tint now uses typed hardpoint facets before falling back + to legacy `EquippableItemData.HardpointType`. - `Galaxy` generation no longer accepts a runtime item catalog reader or `ItemManager`. Sector and tutorial generation receive the package-owned typed runtime catalog. `Galaxy` projects typed corporation v2 records into temporary legacy