From 64257aff6502fdd5b9f1a7bd4b7b5161e2d2dce2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 06:28:08 +0100 Subject: [PATCH] Use typed durability for target hitpoints --- .voidbot/state/aetheria.cc | Bin 68712 -> 68656 bytes Assets/Scripts/Gameplay/ActionGameManager.cs | 6 +++++- docs/aetheria-perfect-machine-map.md | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index d68945627a9f0c4749c66b3736e781466ee8bec3..e334b093a5fb85067a6a61bf736041da36f6f3b4 100644 GIT binary patch delta 988 zcmZ`&L1+^}6m^qO8$?0SDuOaM6`F0@*jTj+N~#s~W-mE8*_rGP-I-ZuX4?c00l|}A zWRZCBrWATAL=ZfP2p+ukCPl%k;HjW^5W&BjU9$uWb9yuL|9kJh|Ls|63(iKNT)#M9 zw`GAAygRq>V&{ZdouJ1TBS6AI56R+dEl3DC*KFm(nE(c{W%igZRR^TVd%i! zK6T(qg+cYl!Q#~BkW0l2$!4zUsVJAz93>x<(LDc8wnVKq5kJy)(5tO?tY=?w+iRLV{;6 zGDvb2BDn@O;878B5Iy9YC;2K%+JOQv>4IcFMz5BR$l9Zj2LY=Kj0>yGvf^t;Fz&B*9!N|+(S`e{8%q03 zIyh#T1x$&#lAw{f27LAy+)%SR7u>d!7A`k|VC|$8SWm04=|ybmXtYwxPoL$~?c5-= zxb=X64yENjZl!22A?nPT1ZoUiI?4|Ok`&txXdtaxrnq2H8k%ACW2yq(SOXZ#g@8%K zz`(!q6258cA;}RCYzhM>)Kh2%frTzt#KLU+AhYV|u_>#xHP{{|e#vCWJIM?ty9 z^8fD@DYmMYNH@YbnGUR+-aB&bhH~4q83CzqlqR-R{Eph0NqL5-zVr0+_gwkbb;nY; zqok+1&%m_hPAF)jU1%W-X#JYBR{@tz2o0L(>c+`vUJi8Lt{>_@m|jt(GBIyi(|p-g z>1_Pim+S2QxxdiY`-@g`$GgWgd^tX*mt&cCU7%Fzp4*<;N+uKZ(B$T3mou4XJtQf7 OgW1gcLKiBRCjJ1_pkSr| diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 32ea15417..68a048351 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -1514,7 +1514,11 @@ public class ActionGameManager : MonoBehaviour var threshold = Settings.GameplaySettings.TargetDetectionInfoThreshold; TargetVisibilityFill.fillAmount = lerp(.25f, .75f, (CurrentEntity.EntityInfoGathered[target] - threshold)/(1-threshold)); VisibilityToTargetFill.fillAmount = lerp(.25f, .75f, target.EntityInfoGathered[CurrentEntity] / threshold); - TargetHitpointsFill.fillAmount = lerp(.25f, .75f, target.Hull.Durability / target.EquippedHull.Data.Durability); + var targetHull = ItemManager.GetRuntimeItem(target.Hull); + var targetMaxDurability = targetHull?.Durability > 0 + ? (float)targetHull.Durability + : Math.Max(target.Hull.Durability, 1f); + TargetHitpointsFill.fillAmount = lerp(.25f, .75f, target.Hull.Durability / targetMaxDurability); TargetShieldsFill.fillAmount = target.Shield == null ? 0 : lerp(.25f, .75f, target.Shield.Progress); } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index dd14f1a46..e635a12ee 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -102,7 +102,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. values until those session facts have typed runtime surfaces. Hull and item durability percentages use typed max durability only; incomplete typed rows use current runtime durability as the generic denominator instead - of falling back to legacy `ItemData.Durability`. + of falling back to legacy `ItemData.Durability`. Target HUD hitpoint fill also + reads target hull max durability from the typed runtime hull row instead of + `EquippedHull.Data.Durability`. Gear heat-fill ranges in the schematic HUD also read typed catalog thermal bounds; rows without typed thermal bounds use a neutral current-temperature range instead of hydrating legacy `ItemData`. @@ -701,6 +703,8 @@ First Aetheria surfaces to publish: - Done: move schematic HUD weapon-row classification onto typed behavior-kind rows; runtime `Weapon` instances remain the owner for live ammo/cooldown display values. + - Done: move target HUD hitpoint fill denominator onto typed hull durability; + live hull item durability remains the numerator/runtime damage owner. - Done: import typed item specific heat and move `ItemManager` generic mass, thermal-mass, and crafted-price helpers onto typed runtime catalog rows. - Done: import typed thermal performance curve keys and move PropertiesPanel