From e998a8d7897d399a711c562d725e63e8dbc4295e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 06:14:51 +0100 Subject: [PATCH] Use typed behavior kinds for schematic weapons --- .voidbot/state/aetheria.cc | Bin 68753 -> 68765 bytes Assets/Scripts/UI/HUD/SchematicDisplay.cs | 18 +++++++++++++++++- docs/aetheria-perfect-machine-map.md | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 23f25f9ee49f48a1fdebc4cc50e7d27331dac052..e175a7f1e838ba083129cb285ceab4538905f56f 100644 GIT binary patch delta 980 zcmZ{j&1(}u7{=Kol-A-WNUccwf(H@WZDO0W@gkHU1rK6dDfA+f-P!Ea-Fde=vk8fZ z`~iBf4AS=CQG4)UA%b}FYb|2dwCXYe z`XjJ(zjD&370EUr_nKxZl^6|mp0p%LH!6^Z^BogwD~X0fEGfW8?NB1fW9YaJeB41~% z^Q3!u)L2t{N3&N4u>WmU^$M?dCckbDO)sA8#eXfB@@d0yNkfckt~&GmirU$@q)r#} zox+b>=SO<8RV)`f&EJ1U2V2$6j`xSEd?OyJXK#%6!|5oN)vxTB!tBuYj$vT>SE;

_jc+o&IyC$0i^^};P!LJabLV{rLOz&))neMf_C+iBL z9`XZ1BOwP5f*+t4VFfRW<`^Wnco2d)#a|$J(u*~-vnvwuHua{f-m7|5kJi#FYw1_d zQXSdRlgCHw;n9)#6>I;)4_2%Bm|AY2V?z;YM9ZBf62CKT=|1af^=R7JShzdxXeRg> z63`2T6OT%8@LLifQZpy?N%R{$DZ&!t9&k|x$0tg$0;3A(t&o*U)J2>R`XuB|5i67_ zDG6?BJKbh;v*Wb=6f;<`wKc)GJ13^NX1W5Q!u+#DjW>9xdo9kJphdF8gdBi!kvT<> zl(^=`>uytRnI?;@6w zgnKlDEk;G4Kpd?GVqp!bF`=XZVOZdzF4Cs7!B_)0f)|(vdC6Rl+AvpS3Y<`b;C=-H zv4qWCna(6;H7s#ryUf6^K5t`Epeq{3r?ik1b{qX~hqZv)^>H9!-H}*p2F@q`#vxAE zSyVQdnaqJhB}ohDyRJm5@b`#?G%vP$_d!A6W+jVLS6O{r>*=&+%-gTSz5m-e^HTJi zPm4#Y*S9aVo|?Uk%;+w2CYdVvq!KkK{Ae6?`ow4{$_k|*EyeNsJ}$3W&vluVn}^N) zojui_Z~49L$@%1ltII!rcK!)Xt>s|jW=>?2+j`$ba>-q_u0F9W(S*k$cy%acJ!q>J W&SlN_maaFSQ`UNW@+y}do&OEfGFzYk diff --git a/Assets/Scripts/UI/HUD/SchematicDisplay.cs b/Assets/Scripts/UI/HUD/SchematicDisplay.cs index 11e4b92f7..c32c2639d 100644 --- a/Assets/Scripts/UI/HUD/SchematicDisplay.cs +++ b/Assets/Scripts/UI/HUD/SchematicDisplay.cs @@ -12,6 +12,16 @@ using static Unity.Mathematics.math; public class SchematicDisplay : MonoBehaviour { + private static readonly HashSet WeaponBehaviorKinds = new HashSet(StringComparer.Ordinal) + { + "GuidedWeapon", + "Launcher", + "InstantWeapon", + "ConstantWeapon", + "ChargedWeapon", + "AutoWeapon" + }; + public GameSettings Settings; public Prototype ListElementPrototype; @@ -108,7 +118,7 @@ public class SchematicDisplay : MonoBehaviour } _schematicItems = entity.Equipment - .Where(x => x.Behaviors.Any(b => b.Data is WeaponData)) + .Where(HasTypedWeaponBehavior) .Select(x => new SchematicDisplayItem { Item = x, @@ -144,6 +154,12 @@ public class SchematicDisplay : MonoBehaviour } + private static bool HasTypedWeaponBehavior(EquippedItem item) + { + var typedItem = FindTypedItem(item.EquippableItem); + return typedItem?.BehaviorKinds.Any(WeaponBehaviorKinds.Contains) == true; + } + void Update() { if (_entity != null) diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index f859af94f..55d9ab7bf 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -96,7 +96,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. before falling back to defaults. - The combat schematic HUD uses typed runtime catalog weapon facets for its static weapon icon strip; missing typed weapon facets no longer fall back to - legacy `WeaponItemData`. + legacy `WeaponItemData`. Schematic weapon-row selection now uses typed + behavior-kind rows instead of inspecting runtime `BehaviorData` subclasses; + live weapon behavior instances still own ammo, cooldown, and active firing + 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`. @@ -691,6 +694,9 @@ First Aetheria surfaces to publish: type inspection. - Done: import typed thermal bounds and move schematic HUD heat-fill ranges onto typed catalog rows. + - 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: 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