From a9b90470a1e2bac2ff309963db19dc7fcafe748e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 00:05:05 +0100 Subject: [PATCH] Use typed catalog for pickup presentation --- .voidbot/state/aetheria.cc | Bin 54046 -> 54227 bytes Assets/Scripts/Zone Display/ZoneRenderer.cs | 22 ++++++++++++++++++-- docs/aetheria-perfect-machine-map.md | 4 +++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 636d18fb1728037828909122c5b4f2750ccd1bd2..d6c673a77424369426bc3e3a6a653ad42c83fb1a 100644 GIT binary patch delta 1054 zcmZvbziSjh6vs_25QA03Ag0MH6fKgw;hH+|B3tuzMb78Q7q@p?Ay=x`@ZkRtJ1IS($4na@cfnP zba`ezIV_z`z7IYbDb91X^?|WOm+t2es?+pfcJSM?^y1LR=jR_RYwaN7!CD+aWYD5= z%yF$i=?=seEx6>v&R8#C4x8F^fvFG_lL$t4EYz`~4MKwn!BrFLELa1lL12>wUEmHS zEZ$n7&iXC}S>N(jAQ+biaZM{+MHQk!1G=Luw7HF$0IsZK%5je|3H8{4>-HiHff$(3 zO`v;+`8T1_QFi73)Mu=Cz6J}Ng-#0`v@IQr5Y`YQkh-09BdI6|u<(Ot zusqPJVD>_JgVS|3Xs0{OgaumP;^V^&QJ|x~Gf+30(ZFDd=DJA3fL1p&zDxNnQ$b6c zRczSbC&nLb7;GFYCwEpZq)#`7P7N$2<*jp-|K*HXVE_C)LyaYx^zi+)q2avObh2>u z%xD%GSmZVmtXs(r$^I@#xkxFp0)@bWD%(@Q1Z+X0;Spp zOcmZ8&$S=o(SXxRdTC@dU#_{i+NNVoQaq8iK0O|oO!Kx=$2aNSJ>r})MbuwQl-kfp z){`4mn?|44PoC^IOZH3S`Px=zX8qbO{P@x@T=s>Dy>_w3Rln%z-oxTS)h~K_^XJ!* Ier3M)2dNo|TL1t6 delta 910 zcmaJ=ziSjh6gGFFITcYvM2YYk35a(lF_+va2+>#s3xA~wTFmaw?T*gQoHMg`EEWeA zg1-uxPQ=1rCpHRO31Sh87;OX#i3ke%52O?u-|p?16TxcX&G)|deec`%v0J?Vr1+v+ z7#=@7F;y8GuiI}+BldmaTB%o!$Jx!F@#G${Zc;#E7{gyBq(~3x(2&M*_A>^ zA#pg>;LwIt6oS}O#4zClr#^9G$S|D@1hey}bmg(j2@6;5&S&HLW3<6JAlpLsI(iM1 zGoLw(GZO>S16gyCX+HwT|45iKG@M1z&{Q&2h;~tHNElLfh{$?dC=JU^5_3tsj53$m zw>@)uPFK2y3XQ;(8z*oXID5_LAdNPR^ZX4r@UN5upe2}q>0`h&5b#rv9t~wr95De^ z_>STl5i$+9``d$T5pHii80ick+{kFqfsD8Zp=?obnDElQ=jPI^+C+JItgZ}0BD{mW zJ$urPLi`CdNa0fWuS+3;OW~tZwVz&&m_n=h(lAe89`fLhD$j^;1F6o^hW@f{cXH<8 z*yb%4&ZV)Ib(0Bd3Ey#az(5)x3o>zl#?hyBqy?y?q{kdsdvhVqiV)7;# zEp5l2y;`Z)YYUGI@p16p@VmuQzfxQH4W2tuPXGV_ diff --git a/Assets/Scripts/Zone Display/ZoneRenderer.cs b/Assets/Scripts/Zone Display/ZoneRenderer.cs index ac7fe35b4..b66d0027a 100644 --- a/Assets/Scripts/Zone Display/ZoneRenderer.cs +++ b/Assets/Scripts/Zone Display/ZoneRenderer.cs @@ -7,6 +7,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using Cinemachine; +using GameCult.Aetheria.State.Unity; using UniRx; using UnityEngine; using UnityEngine.Serialization; @@ -568,11 +569,12 @@ public class ZoneRenderer : MonoBehaviour public void DropItem(Vector3 position, Vector3 velocity, ItemInstance item) { + var typedItem = FindTypedPickupItem(item); var gridObject = item switch { SimpleCommodity _ => Instantiate(SimpleCommodityPickup), CompoundCommodity _ => Instantiate(CompoundCommodityPickup), - EquippableItem equippableItem when ItemManager.GetData(equippableItem) is WeaponItemData => Instantiate(WeaponPickup), + EquippableItem equippableItem when IsWeaponPickup(equippableItem, typedItem) => Instantiate(WeaponPickup), EquippableItem _ => Instantiate(GearPickup), _ => throw new NotImplementedException() }; @@ -584,7 +586,7 @@ public class ZoneRenderer : MonoBehaviour var itemPickup = gridObject.gameObject.GetComponent(); itemPickup.Item = item; itemPickup.ZoneRenderer = this; - itemPickup.ScanLabel.text = ItemManager.GetData(item).Name; + itemPickup.ScanLabel.text = typedItem?.Name ?? ItemManager.GetData(item).Name; if (item is CraftedItemInstance craftedItemInstance) { var c = ItemManager.GetTier(craftedItemInstance).tier.Color.ToColor(); @@ -595,6 +597,22 @@ public class ZoneRenderer : MonoBehaviour gridObject.gameObject.AddComponent().Duration = Settings.PickupLifetime; _loot.Add(itemPickup); } + + private bool IsWeaponPickup(EquippableItem item, AetheriaRuntimeCatalogItem typedItem) + { + if (typedItem != null) + return string.Equals(typedItem.Category, nameof(WeaponItemData), StringComparison.Ordinal); + + return ItemManager.GetData(item) is WeaponItemData; + } + + private static AetheriaRuntimeCatalogItem FindTypedPickupItem(ItemInstance item) + { + var itemId = item?.Data?.ItemId ?? Guid.Empty; + return itemId == Guid.Empty + ? null + : ActionGameManager.RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D")); + } } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 66791db88..fec131cf9 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -135,7 +135,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. hydrating `ItemData` projections for legacy commodity filters, columns, and buy actions. The sector properties UI also resolves station/turret/ship counts through typed hull classifications from the runtime catalog before - falling back to legacy `HullData` projection for missing rows. + falling back to legacy `HullData` projection for missing rows. Loot pickup + presentation now uses typed catalog category/name rows to choose weapon-vs-gear + pickup visuals and scan labels before falling back to legacy item projections. - `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