fix(cockpit): voice refuses entry while on a vessel bridge

Voice entry tracked an aircraft first, which cleared the vessel selection
and ended the bridge, and then failed because Cockpit was still active:
no bridge, no cockpit, no selected ship, and voice said entry was
unavailable. It now refuses before it touches tracking and says to exit
the bridge first.
This commit is contained in:
Sameh Khamis committed 2026-11-08 14:09:17 -08:00
1 parent b98bc4b0dc
commit 36a2216528
2 files changed
+25

No files matched your search

+4
View File
@@ -172,6 +172,10 @@ export class CockpitCoordinator {
_cockpitEntryRefusal() {
if (this._contextModeChanging)
return 'Context is still changing — try Cockpit again in a moment';
// Tracking an aircraft from the bridge ends the bridge and clears the
// vessel selection before the entry can run, leaving neither.
if (this.cockpitView?.active && this.cockpitView.subjectKind === 'vessel')
return 'Cockpit is on a vessel bridge — exit the bridge first, then track an aircraft to enter Cockpit';
if (!this._aircraftLayerEnabled)
return 'No aircraft layer is on — turn on Flights or Military Flights and track an aircraft to enter Cockpit';
return null;