Skip to content

Commit ad02797

Browse files
committed
Add shortcut to toggle between multiplier options
1 parent 37d61d5 commit ad02797

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/services/shortcuts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function registerShortcuts(): void
1717
createShortcut("train-previous", "[RVE] Select previous train", null, () => navigateTrains(-1));
1818
createShortcut("vehicle-next", "[RVE] Select next vehicle", null, () => navigateVehicles(1));
1919
createShortcut("vehicle-previous", "[RVE] Select previous vehicle", null, () => navigateVehicles(-1));
20+
createShortcut("multiplier", "[RVE] Select next multiplier option", null, () => model._toggleMultiplier());
2021
}
2122

2223
/**

src/viewmodels/vehicleViewModel.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,18 @@ export class VehicleViewModel
397397
}
398398
}
399399

400+
/**
401+
* Toggles to the next multiplier option.
402+
*/
403+
_toggleMultiplier(): void
404+
{
405+
if (this._isOpen)
406+
{
407+
const index = this._multiplierIndex.get();
408+
this._multiplierIndex.set((index + 1) % 3);
409+
}
410+
}
411+
400412
/**
401413
* Updates the viewmodel with refreshed information from a ride vehicle.
402414
*/

0 commit comments

Comments
 (0)