Remove dead behavior data query API

This commit is contained in:
Meta Vens 2026-06-14 08:13:47 +01:00
commit 19297f2252
3 changed files with 3 additions and 44 deletions

Binary file not shown.

View file

@ -970,50 +970,6 @@ public abstract class Entity
yield return b;
}
public IEnumerable<T> GetBehaviorData<T>() where T : BehaviorData
{
foreach (var equippedItem in Equipment)
foreach (var behavior in equippedItem.Behaviors)
if (behavior.Data is T b)
yield return b;
}
// public IEnumerable<(T t, Switch s)> GetSwitch<T>() where T : class, IBehavior
// {
// foreach (var equippedItem in Equipment)
// foreach (var group in equippedItem.BehaviorGroups.Values)
// foreach(var behavior in group.Behaviors)
// if (behavior is T t)
// {
// var s = group.GetExposed<Switch>();
// if (s != null) yield return (t, s);
// }
// }
//
// public IEnumerable<(T behavior, Trigger trigger)> GetTrigger<T>() where T : class, IBehavior
// {
// foreach (var equippedItem in Equipment)
// foreach (var group in equippedItem.BehaviorGroups.Values)
// foreach(var behavior in group.Behaviors)
// if (behavior is T t)
// {
// var s = group.GetExposed<Trigger>();
// if (s != null) yield return (t, s);
// }
// }
//
// public IEnumerable<(T behavior, Axis axis)> GetAxis<T>() where T : class, IBehavior
// {
// foreach (var equippedItem in Equipment)
// foreach (var group in equippedItem.BehaviorGroups.Values)
// foreach(var behavior in group.Behaviors)
// if (behavior is T t)
// {
// var s = group.GetExposed<Axis>();
// if (s != null) yield return (t, s);
// }
// }
public virtual void Update(float delta)
{
TargetRange = Target.Value == null ? -1 : length(Position - Target.Value.Position);

View file

@ -811,6 +811,9 @@ First Aetheria surfaces to publish:
- Done: delete `Entity` consumable activation overloads that accepted
`ConsumableItemData`; active lookup uses item ids and activation commands
accept typed runtime catalog rows only.
- Done: delete dead `Entity.GetBehaviorData<T>()` and stale commented
switch/trigger/axis behavior-query helpers; entity-level behavior queries
expose live behavior instances, not DTO config.
- Done: import action-bar icon resource paths into typed item definitions and
move `ActionBarSlot` custom gear icon lookup onto typed runtime item rows.
- Done: move `Ship` drag, combat/turret predicted shot height, and thruster