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:
parent
6957180450
commit
f6c0d24dba
13 changed files with 449 additions and 162 deletions
|
|
@ -122,6 +122,24 @@ public readonly struct Reveal
|
|||
}
|
||||
}
|
||||
|
||||
// What an observer aims at on its target (Entity.Aim): exactly one of a revealed item or a mount of the hull the observer
|
||||
// believes the target to be (Entity.LayoutOf), or nothing. A mount is a believed position, never the true item on it.
|
||||
public readonly struct AimTarget
|
||||
{
|
||||
public readonly EquippedItem Item;
|
||||
public readonly HardpointData Mount;
|
||||
|
||||
private AimTarget(EquippedItem item, HardpointData mount)
|
||||
{
|
||||
Item = item;
|
||||
Mount = mount;
|
||||
}
|
||||
|
||||
public static AimTarget None => default;
|
||||
public static AimTarget OfItem(EquippedItem item) => new AimTarget(item, null);
|
||||
public static AimTarget OfMount(HardpointData mount) => new AimTarget(null, mount);
|
||||
}
|
||||
|
||||
// One weapon or gear row of a ship's schematic as its viewer is entitled to read it (aetheria-ew, classify-from-belief; ruling
|
||||
// ew-claim-weapon-measure-ruled). Made only by Entity.SchematicRows. `Item` is the true item: the selection mark's key and,
|
||||
// on the viewer's own ship, the live gear. `Claimed` is the class the row shows. The range label is the live range on
|
||||
|
|
@ -152,9 +170,8 @@ public readonly struct SchematicRow
|
|||
// What a renderer compares to know the rows changed. Range is a reading, not part of the key.
|
||||
public (EquippedItem, EquippableItemData, HardpointData) Key => (Item, Claimed, Mount);
|
||||
|
||||
// Whether this row is the one `aimed` points at: a claimed-item row by its item, a mount row by the mount the aimed
|
||||
// item sits on (an aimed item with a claimed-item row has no mount row).
|
||||
public bool Marks(EquippedItem aimed) => Item != null ? Item == aimed : aimed != null && aimed.Hardpoint == Mount;
|
||||
// Whether this row is the one `aim` points at: a claimed-item row by its item, a mount row by its mount.
|
||||
public bool Marks(AimTarget aim) => Item != null ? aim.Item == Item : aim.Mount != null && aim.Mount == Mount;
|
||||
|
||||
public float? Range => _own
|
||||
? Item.Behaviors.OfType<Weapon>().First().Range
|
||||
|
|
|
|||
Loading…
Reference in a new issue