feat(cockpit): enter Cockpit with only the ridden aircraft's layer on

Cockpit entry no longer needs Contacts or both flight feeds: a civilian
aircraft needs Live Flights, a military one Military Flights. Contacts and
every other layer can be turned on or off before or during a session, and
turning off the ridden layer ends it. A Context mode change in flight still
blocks entry.

When the other air feed is off, Live Signals and the Contact card say
FLIGHTS FEED OFF or MILITARY FEED OFF · PARTIAL PICTURE instead of
presenting a partial picture as complete. Voice refuses entry with
subject-layer-off rather than contacts-inactive, and its tool description
says Contacts is not required.

Double-clicking the followed aircraft enters Cockpit through the same gate.
The Cockpit takes the scene's double-click before Cesium's stock handler,
which would otherwise untrack a followed aircraft whose model is a
primitive. The entry also shows under the Intel HUD readout, sharing the
Contacts button's face. A test keeps the classes the Cockpit adds to the
body from matching another element's rule.
This commit is contained in:
Denis Groshev committed 2026-11-04 21:53:05 +01:00
1 parent 82f17e694e
commit 219f3e1079
37 files changed
+964 -134

No files matched your search

+34 -3
View File
@@ -1,6 +1,8 @@
/** Coordinate Cockpit lifecycle through supplied aircraft, terrain, rendering and briefing operations. */
import {
readAircraftInfo,
readSubjectLayerId,
resolveEntryKind,
dispatchCockpitModeChanged,
toggleTrackedTr3b,
syncTr3bToggle,
@@ -48,6 +50,7 @@ import {
relocalizeBrief,
} from './cockpitBriefing.js';
import {
dropCockpitSignal,
handleSignalClick,
publishCockpitSignals,
pushCockpitSignal,
@@ -60,7 +63,11 @@ import {
syncContextLayout,
syncSignalLayout,
} from './cockpitLayout.js';
import { onKeyDown } from './cockpitInput.js';
import {
onKeyDown,
onSceneDoubleClick,
routeSceneDoubleClick,
} from './cockpitInput.js';
import * as Cesium from 'cesium';
export class CockpitViewController {
@@ -205,6 +212,13 @@ export class CockpitViewController {
}),
);
this._listen(this.entry, 'click', () => this.enter());
// Double-clicking the followed track is a third way in.
this._listenerRemovers.push(routeSceneDoubleClick.call(this));
// The readout's entry renders inside the Intel HUD, which may mount after
// this controller, so its clicks are delegated.
this._listen(document, 'click', (event) => {
if (event.target?.closest?.('#cockpit-entry-readout')) this.enter();
});
this._listen(this.tr3bToggle, 'click', () => this.toggleTrackedTr3b());
this._listen(this.mapViewButton, 'click', () => this.exit());
this._listen(this.visionPrevious, 'click', () => this.cycleVisionMode(-1));
@@ -272,6 +286,12 @@ export class CockpitViewController {
readAircraftInfo() {
return readAircraftInfo.call(this);
}
readSubjectLayerId() {
return readSubjectLayerId.call(this);
}
resolveEntryKind() {
return resolveEntryKind.call(this);
}
dispatchCockpitModeChanged(active, info) {
return dispatchCockpitModeChanged.call(this, active, info);
}
@@ -371,8 +391,16 @@ export class CockpitViewController {
pushCockpitSignal(key, tone, title, detail, target) {
return pushCockpitSignal.call(this, key, tone, title, detail, target);
}
updateCockpitSignals(snapshot, unknownCount) {
return updateCockpitSignals.call(this, snapshot, unknownCount);
dropCockpitSignal(key) {
return dropCockpitSignal.call(this, key);
}
updateCockpitSignals(snapshot, unknownCount, partialPicture) {
return updateCockpitSignals.call(
this,
snapshot,
unknownCount,
partialPicture,
);
}
scheduleContextLayout() {
return scheduleContextLayout.call(this);
@@ -392,6 +420,9 @@ export class CockpitViewController {
onKeyDown(event) {
return onKeyDown.call(this, event);
}
onSceneDoubleClick(position) {
return onSceneDoubleClick.call(this, position);
}
handleSignalClick(event) {
return handleSignalClick.call(this, event);