mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
Use cockpit readiness for voice entry on either globe
This commit is contained in:
1 parent
d7ab85f5c4
commit
b7431d7823
2 files changed
+6
-3
No files matched your search
@@ -1076,7 +1076,9 @@ export function createGevActionRunner({
|
||||
contextState?.mode === 'flights' &&
|
||||
contextState?.active !== false &&
|
||||
contextState?.changing !== true;
|
||||
if (!contactsReady && engine?.kind !== 'navara') {
|
||||
const directEntry = !targetLayer && !aircraftClass &&
|
||||
styleManager.getCockpitState?.()?.entryAllowed === true;
|
||||
if (!contactsReady && !directEntry) {
|
||||
const contextResult = await styleManager.setContextMode('flights', {
|
||||
signal: runOptions.signal,
|
||||
isCurrent: runOptions.isCurrent,
|
||||
|
||||
@@ -104,10 +104,11 @@ test('the viewer-only actions are one exported list of real tools', () => {
|
||||
assert.ok(tools.has(name), `${name} is a voice tool`);
|
||||
});
|
||||
|
||||
test('Navara enters cockpit on the tracked aircraft without starting Contacts', async () => {
|
||||
const engine = engineOverAustin({ kind: 'navara' });
|
||||
for (const kind of ['cesium', 'navara']) test(`${kind} enters cockpit on a ready tracked aircraft without starting Contacts`, async () => {
|
||||
const engine = engineOverAustin({kind});
|
||||
const runner = runnerOn(engine, {
|
||||
styleManager: {
|
||||
getCockpitState: () => ({ entryAllowed: true }),
|
||||
getAircraftTrackingTarget: () => ({ layerId: 'flights', id: '507c84' }),
|
||||
setContextMode: () => assert.fail('the selected flight already owns the camera'),
|
||||
controlCockpit: (action, { rollbackTarget }) => {
|
||||
|
||||
Reference in new issue
Block a user