Cut 8: EquippedItem.ConditionRatio -- how healthy a behaviour actually is

Operator ask (2026-09-19): thruster particles only reflected thrust intent,
so a cooked or starved thruster looked identical to a healthy one.

EquippedItem.ConditionRatio (Entity.cs) resolves a stat's actual value
against what the same item, same lot, same modifiers would produce with
Heat/Durability/PowerSupply pinned to their identity (NominalContext) --
quality and lot are not part of "perfect", so a cheap item still reads 1
at full health. The nominal side bypasses the resolver's cache (which is
keyed only by (owner, stat) and would otherwise collide with the real
cached value) with one direct Evaluate call, a handful of flops.

Thruster.Condition and AetherDrive.Condition expose that ratio against
each behaviour's own governing stat (Thrust, Torque) for presentation to
read next.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-19 04:41:13 +02:00
commit 4cdfa22fb0
3 changed files with 52 additions and 1 deletions

View file

@ -73,6 +73,11 @@ public class AetherDrive : Behavior, IPowerConsumer
public AetherDriveData DriveData => _data;
// Cut 8 (operator ask 2026-09-19): the equivalent quantity to Thruster.Condition -- Torque is the stat that
// actually governs this behaviour's rotor spin-up (PowerRequest/Execute above both read it), so it is what
// "broken" means for a drive. 1f for the item-less ConsumableItemEffect case, same reasoning as Thruster.
public float Condition => Item?.ConditionRatio(_data.Torque) ?? 1f;
public float3 Axis
{
get => _axis;