mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
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:
1 parent
b98bc4b0dc
commit
36a2216528
2 files changed
+25
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user