From 4c7da3b3d65ad2a0f8814a147ad1d8bd525dc4ac Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 00:54:19 +0100 Subject: [PATCH] Use typed hardpoints for cargo tint --- .voidbot/state/aetheria.cc | Bin 54856 -> 56262 bytes Assets/Scripts/UI/Menu/InventoryPanel.cs | 22 +++++++++++++++++++++- docs/aetheria-perfect-machine-map.md | 2 ++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 167ac6e6ae5dbb58541f3af72d7be68555d61368..665e6ed4b995bdc392dcc0c05688c68c5304b2d3 100644 GIT binary patch delta 1332 zcmZuxL5mbe6h=qH6&5i>);%mdSTG)@*PYpQmsu}CSHqZum0)t%TTS>K8yXO!6^V`KQ?x&b4U38;yhoMbSa~5zpL}@7+giOaOuw2@}78yoC z!gQ1=I-8)q++GWo*Mion`+5B>x3hQ5eZKg{;*D-y4OKOSChY1^U;!tX5&Otx7xkdcP?Cysgj5a7teV7xL&QxcSV513yku#>DyTdGI;YAM z{Txjb&}5WEniXF4iX5p)R7!$p$O>dL;uE7v(Q2Y;M+r*87HF{+XY=Y72&D#jW3b$a8pj9NH@82%Lq-@chAK_D-N;au#&tAU#KFg>$RGQ{I zeaU<7rB2Cr{`2;^HWsdNo79N4v)!52+-!Sg!|$23&ib}H{&c?k;&|7x*nEAzUJ(y? z{mFmv&=U{P!mv!J_)*S-m;dJO!rtu6%oNTY-=ClCtIl$(+E;_8f7FqdkEq6Bx3#a1 e_^M9JJ#WmpfA>GB)BG~rz4`avOdVQjZ~qS+Pwt%n delta 174 zcmX@Mo%zHX<_*i3CJXFgV>U9hn7r|V*yN*3-4MQ!F_14axs3Dn0mdDD3bh<;;;`7h7! o2l1JVOeSx*&;yY&F##JLeX$YBHwW=I|Gsz-WCk0Hk*RSM0Fc{7tpET3 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