Added alt g shortcut to gang and alt b shortcut to bladeburner

This commit is contained in:
Olivier Gagnon 2021-03-23 15:25:18 -04:00
parent 6efc3ec75e
commit 40713a4112
3 changed files with 53 additions and 27 deletions

@ -31,6 +31,8 @@ Alt + f Switch to 'Factions' page
Alt + a Switch to 'Augmentations' page Alt + a Switch to 'Augmentations' page
Alt + u Switch to 'Tutorial' page Alt + u Switch to 'Tutorial' page
Alt + o Switch to 'Options' page Alt + o Switch to 'Options' page
Alt + g Switch to 'Gang' page
Alt + b Switch to 'Bladeburner' page
========== =========================================================================== ========== ===========================================================================
Script Editor Script Editor

@ -134,7 +134,7 @@ $(document).keydown(function(e) {
} catch(e) {} } catch(e) {}
if (!Player.isWorking && !redPillFlag && !inMission && !cinematicTextFlag) { if (!Player.isWorking && !redPillFlag && !inMission && !cinematicTextFlag) {
if (e.keyCode == 84 && e.altKey) { if (e.keyCode == KEY.T && e.altKey) {
e.preventDefault(); e.preventDefault();
Engine.loadTerminalContent(); Engine.loadTerminalContent();
} else if (e.keyCode === KEY.C && e.altKey) { } else if (e.keyCode === KEY.C && e.altKey) {
@ -174,6 +174,12 @@ $(document).keydown(function(e) {
} else if (e.keyCode === KEY.U && e.altKey) { } else if (e.keyCode === KEY.U && e.altKey) {
e.preventDefault(); e.preventDefault();
Engine.loadTutorialContent(); Engine.loadTutorialContent();
} else if (e.keyCode === KEY.B && e.altKey) {
e.preventDefault();
Engine.loadBladeburnerContent();
} else if (e.keyCode === KEY.G && e.altKey) {
e.preventDefault();
Engine.loadGangContent();
} }
} }

@ -4,17 +4,33 @@ import { IMap } from "../../src/types";
* Keyboard key codes * Keyboard key codes
*/ */
export const KEY: IMap<number> = { export const KEY: IMap<number> = {
CTRL: 17,
DOWNARROW: 40,
ENTER: 13,
ESC: 27,
TAB: 9,
UPARROW: 38,
"0": 48,
"1": 49,
"2": 50,
"3": 51,
"4": 52,
"5": 53,
"6": 54,
"7": 55,
"8": 56,
"9": 57,
A: 65, A: 65,
B: 66, B: 66,
C: 67, C: 67,
CTRL: 17,
D: 68, D: 68,
DOWNARROW: 40,
E: 69, E: 69,
ENTER: 13,
ESC: 27,
F: 70, F: 70,
G: 71,
H: 72, H: 72,
I: 73,
J: 74, J: 74,
K: 75, K: 75,
L: 76, L: 76,
@ -22,12 +38,14 @@ export const KEY: IMap<number> = {
N: 78, N: 78,
O: 79, O: 79,
P: 80, P: 80,
Q: 81,
R: 82, R: 82,
S: 83, S: 83,
TAB: 9, T: 84,
U: 85, U: 85,
UPARROW: 38, V: 86,
W: 87, W: 87,
"1": 49, X: 88,
"2": 50, Y: 89,
Z: 90,
}; };