From a950205ecc42d39babb3ff86916f35ffe6dea39c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 01:23:31 +0100 Subject: [PATCH] Use typed durability in properties panel --- .voidbot/state/aetheria.cc | Bin 57072 -> 57436 bytes .../UI/Properties Panel/PropertiesPanel.cs | 13 +++++++++++-- docs/aetheria-perfect-machine-map.md | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index ddfda4c06027b6ad3501265a1515aad7efd78aeb..393c9e1adb3f4d5ddd93094d19b69032bef998c7 100644 GIT binary patch delta 883 zcmZvbziSjh6vs&}N}>o66M|^qS*T5NubKvi0rWCTn50`<}D-@x?am`4$7Hw4ZQd7W97cGpSW5XT8AqUMa&b0R~N zQ4@j*kXayS2smWY!;ESSj3Op(=-+~mp|V7kj^@XjHMrn*4MJuEpavG%4Ifl9v5jzj zE?dczP+y#bhUR_?fhx6>M7OXz)c$x^5u1z=aMfxuH`$+Okp}d?1h}*WmAFFKf}qV< z(ngZOks#ah`TlWyg%e}pC=RP-(21goDU`mltcY{orP7T$_d{f*Yg94==VAH(r zod5Es;6AM{bY{O!_l!Q8Wf2|pl%`0c)4SHq%hm2(9SWHt+{E(SK)3zv{$O&kE5%x^ zwDiuhmU-*09Bf?N%xjFNnRoUME({Eu?sbQS%l+LaFEIG1y!;xBKpPV0LDinZ0B!JVZjU z3m6)+uU^zn`19BN z#*}|$uDO2foa=oab$hkdlFnQnQsv#RNMlHjk6f&MeBGZMd9*#gwiHAdGs^?Gb#DQp zR0v=)bZ-VLi>pgKP6UGaClaQbwYcCmgAk>Pxnx#p156_%8VyQIpVVsETmq?V4t~5J>%Fun4TZlw{^P+d#tr3lCPgU7#at)He12hin-mwAWuT@&&Y49v6XURr?!|3BBk$Q+idiozI)=ipC5jW-B@G^MFOSiM%52 0) + return (float)typedItem.Durability; + + return GameManager.ItemManager.GetData(item).Durability; + } + private static AetheriaRuntimeCatalogItem FindTypedPropertyItem(ItemInstance item) { var itemId = item?.Data?.ItemId ?? Guid.Empty; @@ -499,7 +508,7 @@ public class PropertiesPanel : MonoBehaviour var statusSheet = AddStatSheet(); if (item.EquippableItem.Durability < .01f) statusSheet.AddStat("Durability", () => "Item Destroyed!"); - else statusSheet.AddStat("Durability", () => $"{(int)(item.EquippableItem.Durability / gearData.Durability * 100)}%"); + else statusSheet.AddStat("Durability", () => $"{(int)(item.EquippableItem.Durability / GetMaxDurability(item.EquippableItem) * 100)}%"); statusSheet.AddStat("Temperature", () => ActionGameManager.RuntimePlayerSettings.FormatTemperature(item.Temperature)); var heatCurve = AddCurveField(); @@ -541,7 +550,7 @@ public class PropertiesPanel : MonoBehaviour AddSpacer(); var gearData = GameManager.ItemManager.GetData(gear); var statusSheet = AddStatSheet(); - statusSheet.AddStat("Durability", () => $"{(int)(gear.Durability / gearData.Durability * 100)}%"); + statusSheet.AddStat("Durability", () => $"{(int)(gear.Durability / GetMaxDurability(gear) * 100)}%"); var heatCurve = AddCurveField(); heatCurve.Show( "Thermal Performance", diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index e2fccabfd..859045f77 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -150,8 +150,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. 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. The item properties panel also reads typed catalog description, manufacturer, - and base mass for item presentation before hydrating legacy DTOs for behavior - reflection, thermal curves, and durability math that have not yet moved to + base mass, and max durability for item presentation before hydrating legacy + DTOs for behavior reflection and thermal curves 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