diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 23f25f9ee..e175a7f1e 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ 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