Remove dead StatModifier item DTO stat path

This commit is contained in:
Meta Vens 2026-06-14 07:22:35 +01:00
commit 6ccf8c1ace
2 changed files with 14 additions and 21 deletions

View file

@ -42,8 +42,7 @@ public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwa
private bool _applied;
private bool _executed;
private static Type[] StatObjects => _statObjects = _statObjects ?? typeof(BehaviorData).GetAllChildClasses()
.Concat(typeof(EquippableItemData).GetAllChildClasses()).ToArray();
private static Type[] StatObjects => _statObjects = _statObjects ?? typeof(BehaviorData).GetAllChildClasses().ToArray();
public StatModifier(StatModifierData data, EquippedItem item) : base(data, item)
{
@ -64,21 +63,13 @@ public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwa
.Where(f => f.FieldType == typeof(PerformanceStat)).FirstOrDefault(f => f.Name == _data.Stat.Stat);
if (statField != null)
{
if (typeof(EquippableItemData).IsAssignableFrom(targetType))
_stats = Entity.Equipment
.Select(hp => hp.EquippableItem)
.Where(HasRequiredBehavior)
.Where(gear => ItemManager.GetData(gear).GetType() == targetType)
.Select(gear => statField.GetValue(ItemManager.GetData(gear)) as PerformanceStat)
.ToArray();
else
_stats = Entity.Equipment
.Select(hp => hp.EquippableItem)
.Where(HasRequiredBehavior)
.SelectMany(gear => ItemManager.GetRuntimeBehaviorProjections(gear))
.Where(behaviorData => behaviorData.GetType() == targetType)
.Select(behaviorData => statField.GetValue(behaviorData) as PerformanceStat)
.ToArray();
_stats = Entity.Equipment
.Select(hp => hp.EquippableItem)
.Where(HasRequiredBehavior)
.SelectMany(gear => ItemManager.GetRuntimeBehaviorProjections(gear))
.Where(behaviorData => behaviorData.GetType() == targetType)
.Select(behaviorData => statField.GetValue(behaviorData) as PerformanceStat)
.ToArray();
}
}
}

View file

@ -210,8 +210,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
temporary behavior-class config bridge, not the runtime behavior payload
owner. `StatModifier` behavior requirements and behavior-stat targets also
read that typed behavior projection bridge instead of hydrating
`EquippableItemData.Behaviors`; item performance stat fields are still a
legacy DTO bridge until those stats move to typed runtime rows.
`EquippableItemData.Behaviors`. Its old item-DTO stat branch was deleted
after inspection showed no active `PerformanceStat` fields on the live
equippable item DTO hierarchy.
Ship drag, combat/turret shot prediction height, and thruster
torque geometry now consume typed hull facets and typed shape masks.
The item properties panel also reads typed catalog title names, descriptions,
@ -759,8 +760,9 @@ First Aetheria surfaces to publish:
`BehaviorData` remains only the temporary behavior-class config bridge.
- Done: move `StatModifier` behavior requirements and behavior-stat targets
off `EquippableItemData.Behaviors` and onto typed runtime behavior
projections; equippable item performance stat fields remain a separate DTO
bridge.
projections; the obsolete item-DTO stat target branch is deleted because
the live equippable item DTO hierarchy has no active `PerformanceStat`
fields.
- Done: move runtime blueprint price aggregation and conductivity restore
geometry onto typed runtime item price and hull shape rows; legacy
`ItemData.Price` and `HullData.Shape` no longer own those blueprint paths.