One aim slot holds an item or a mount; the cycle covers every located mount

Entity.AimedAt (AimTarget: a revealed item or a believed mount) replaces
TargetItem. Two writers, TrySelectTargetItem (IsRevealed) and TrySelectMount
(in LayoutOf, not seen destroyed); ResolvedAim re-validates both on every read.
AimCycle is SchematicRows' enemy rows minus mounts in the observer's
seen-destroyed record, written only in Sense through PerceivesDestroyed.
SchematicRows drops its covering filter. IsLocated and AimsAtMount are deleted;
PendingShot.AimedMount and Silhouette's HardpointData mount replace the bool.
The cycle key calls Entity.CycleAim; the schematic marks read ResolvedAim.
Entity.ToString names an entity (follow-up entity-formats-safely).

The slot is AimedAt, not Aim: Entity.Aim is the pilot's pointing direction.
Not yet built or run; ActionGameManager and SchematicDisplay are uncompiled
without Unity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-15 04:42:38 +02:00
commit f6c0d24dba
13 changed files with 449 additions and 162 deletions

View file

@ -441,22 +441,9 @@ public class ActionGameManager : MonoBehaviour
Input.Player.TargetNext.performed += context => CurrentEntity.TargetNext();
Input.Player.TargetPrevious.performed += context => CurrentEntity.TargetPrevious();
// Cut 2 (docs/fire-control-cut.md): cycles the aim point among the current target's located
// subsystems -- decides nothing itself, only calls the one writer (TrySelectTargetItem), gated on the
// same predicate (FireControl.IsLocated) the writer reads. Entity-only: a chunk has no subsystems.
Input.Player.CycleTargetItem.performed += context =>
{
var target = CurrentEntity.Target.Value.Entity;
if (target == null) return;
var located = target.Equipment.Where(x => FireControl.IsLocated(CurrentEntity, x)).ToArray();
if (located.Length == 0)
{
CurrentEntity.TrySelectTargetItem(null);
return;
}
var currentItemIndex = Array.IndexOf(located, CurrentEntity.ResolvedTargetItem);
CurrentEntity.TrySelectTargetItem(located[(currentItemIndex + 1) % located.Length]);
};
// Cut 2 (docs/fire-control-cut.md): steps the aim through the target's schematic rows -- every mount this ship
// has located, empty or not, minus the ones it saw destroyed. Decides nothing: the entity owns the cycle.
Input.Player.CycleTargetItem.performed += context => CurrentEntity.CycleAim();
#endregion