Skip to content

Add spacebar default-action and reusable hook infrastructure#22

Merged
MBurchard merged 1 commit intomainfrom
feature/spacebar-action
Mar 26, 2026
Merged

Add spacebar default-action and reusable hook infrastructure#22
MBurchard merged 1 commit intomainfrom
feature/spacebar-action

Conversation

@MBurchard
Copy link
Copy Markdown
Owner

Pressing Space triggers the primary action on the selected target: engage (ships), mine (nodes), or warp (star systems).

  • New tracker.rs: instance_tracker! macro, field read helpers, lifecycle hook utilities (reusable for future features)
  • New spacebar.rs: viewer visibility checks, action dispatch
  • Hook GetKeyDownInt for key consumption, suppress Scopely's ShortcutsManager.InitializeActions, deselect EventSystem
  • Process hotkeys before original ScreenManager.Update
  • Refactor reward tracking to use instance_tracker! macro

Pressing Space triggers the primary action on the selected target: engage (ships), mine (nodes),
or warp (star systems).

- New tracker.rs: instance_tracker! macro, field read helpers, lifecycle hook utilities
  (reusable for future features)
- New spacebar.rs: viewer visibility checks, action dispatch
- Hook GetKeyDownInt for key consumption, suppress Scopely's ShortcutsManager.InitializeActions,
  deselect EventSystem
- Process hotkeys before original ScreenManager.Update
- Refactor reward tracking to use instance_tracker! macro
@MBurchard MBurchard merged commit f732275 into main Mar 26, 2026
1 check passed
@MBurchard MBurchard deleted the feature/spacebar-action branch March 26, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant