Fix mission brief trigger by using InputControlManager state
All checks were successful
Build / build (push) Successful in 1m45s

- Use InputControlManager.shipControlsEnabled instead of local flag
- Remove unused _controlsEnabled field from Ship class
- Fixes trigger press not dismissing mission brief screen

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Michael Mainguy 2025-12-01 05:31:16 -06:00
parent 5ce26c64ff
commit d3d6175360

View File

@ -69,8 +69,6 @@ export class Ship {
// Flag to prevent game end checks until gameplay has started // Flag to prevent game end checks until gameplay has started
private _gameplayStarted: boolean = false; private _gameplayStarted: boolean = false;
// Controls enabled state
private _controlsEnabled: boolean = true;
// Scene observer references (for cleanup) // Scene observer references (for cleanup)
private _physicsObserver: any = null; private _physicsObserver: any = null;
@ -696,7 +694,8 @@ export class Ship {
*/ */
private handleShoot(): void { private handleShoot(): void {
// If controls are disabled, fire mission brief trigger observable instead of shooting // If controls are disabled, fire mission brief trigger observable instead of shooting
if (!this._controlsEnabled) { const inputManager = InputControlManager.getInstance();
if (!inputManager.shipControlsEnabled) {
log.debug('[Ship] Controls disabled - firing mission brief trigger observable'); log.debug('[Ship] Controls disabled - firing mission brief trigger observable');
this._onMissionBriefTriggerObservable.notifyObservers(); this._onMissionBriefTriggerObservable.notifyObservers();
return; return;