Use the generated accessor for Cycle Target Item

Regenerate AetheriaInput.cs from the committed Aetheria.inputactions so the
wrapper carries Cycle Target Item, and bind it through Input.Player like the
other target actions. The by-name FindAction lookup was a stopgap from when
the generator could not be run outside the editor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 23:38:48 +02:00
commit e0a802084e
2 changed files with 42 additions and 5 deletions

View file

@ -405,11 +405,8 @@ public class ActionGameManager : MonoBehaviour
// Cut 2 (docs/fire-control-cut.md): cycles the aim point among the current target's revealed
// subsystems -- decides nothing itself, only calls the one writer (TrySelectTargetItem), same
// predicate (FireControl.IsRevealed) the AI path uses. No generated typed accessor exists for this
// action yet (it was hand-authored into Aetheria.inputactions rather than regenerated through the
// Unity Input Actions editor, unavailable here), so it is looked up by name instead of through
// Input.Player.
Input.asset.FindAction("Player/Cycle Target Item").performed += context =>
// predicate (FireControl.IsRevealed) the AI path uses.
Input.Player.CycleTargetItem.performed += context =>
{
var target = CurrentEntity.Target.Value;
if (target == null) return;