@@ -31,13 +31,17 @@ public void onInitializeClient() {
3131 // =======================================================
3232 // Initialize
3333 // =======================================================
34- // toggle play dev
35- KeyMapping toggle_play_dev = KeyBindingHelper .registerKeyBinding (new KeyMapping (
36- "key.recode.toggle_play_dev " , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
34+ // set play mode
35+ KeyMapping play_mode = KeyBindingHelper .registerKeyBinding (new KeyMapping (
36+ "key.recode.play_mode " , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
3737
38- // toggle play build
39- KeyMapping toggle_play_build = KeyBindingHelper .registerKeyBinding (new KeyMapping (
40- "key.recode.toggle_play_build" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
38+ // set build mode
39+ KeyMapping build_mode = KeyBindingHelper .registerKeyBinding (new KeyMapping (
40+ "key.recode.build_mode" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
41+
42+ // set dev mode
43+ KeyMapping dev_mode = KeyBindingHelper .registerKeyBinding (new KeyMapping (
44+ "key.recode.dev_mode" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
4145
4246 // spawn
4347 KeyMapping spawn = KeyBindingHelper .registerKeyBinding (new KeyMapping (
@@ -46,6 +50,8 @@ public void onInitializeClient() {
4650 // =======
4751
4852 // fs toggle
53+ KeyMapping toggleFsSlow = KeyBindingHelper .registerKeyBinding (new KeyMapping (
54+ "key.recode.toggle_fs_slow" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
4955 KeyMapping toggleFsMedium = KeyBindingHelper .registerKeyBinding (new KeyMapping (
5056 "key.recode.toggle_fs_medium" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
5157 KeyMapping toggleFsFast = KeyBindingHelper .registerKeyBinding (new KeyMapping (
@@ -84,7 +90,7 @@ public void onInitializeClient() {
8490 // show tags
8591
8692 showTags = KeyBindingHelper .registerKeyBinding (new KeyMapping (
87- "key.recode.showTags" , Type .KEYSYM , -1 , "key.category.recode"
93+ "key.recode.showTags" , Type .KEYSYM , -1 , "key.category.recode"
8894 ));
8995
9096 // chat global
@@ -109,6 +115,29 @@ public void onInitializeClient() {
109115 KeyMapping supportQueue = KeyBindingHelper .registerKeyBinding (new KeyMapping (
110116 "key.recode.support.queue" , InputConstants .Type .KEYSYM , -1 , "key.category.recode" ));
111117
118+ KeyMapping node1 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
119+ "key.recode.node1" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
120+ KeyMapping node2 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
121+ "key.recode.node2" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
122+ KeyMapping node3 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
123+ "key.recode.node3" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
124+ KeyMapping node4 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
125+ "key.recode.node4" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
126+ KeyMapping node5 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
127+ "key.recode.node5" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
128+ KeyMapping node6 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
129+ "key.recode.node6" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
130+ KeyMapping node7 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
131+ "key.recode.node7" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
132+ KeyMapping beta = KeyBindingHelper .registerKeyBinding (new KeyMapping (
133+ "key.recode.beta" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
134+ KeyMapping dev = KeyBindingHelper .registerKeyBinding (new KeyMapping (
135+ "key.recode.dev1" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
136+ KeyMapping dev2 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
137+ "key.recode.dev2" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
138+ KeyMapping dev3 = KeyBindingHelper .registerKeyBinding (new KeyMapping (
139+ "key.recode.dev3" , InputConstants .Type .KEYSYM , -1 , "key.category.nodesel" ));
140+
112141 // register all the KeyMappings for the chat rooms
113142 for (ChatShortcut chatShortcut : ChatShortcut .values ()) {
114143 ChatShortcut .addKeyMapping (KeyBindingHelper .registerKeyBinding (new KeyMapping (
@@ -125,27 +154,38 @@ public void onInitializeClient() {
125154
126155 ClientTickEvents .END_CLIENT_TICK .register (client -> {
127156 // toggle play dev
128- while (toggle_play_dev .consumeClick ()) {
129- sendCommand (DF . isInMode ( DF . getCurrentDFState (), PlotMode . Play . INSTANCE ) ? "dev" : "play" );
157+ while (play_mode .consumeClick ()) {
158+ sendCommand ("play" );
130159 }
131160
132161 // toggle play build
133- while (toggle_play_build .consumeClick ()) {
134- sendCommand (DF .isInMode (DF .getCurrentDFState (), PlotMode .Play .INSTANCE ) ? "build" : "play" );
162+ while (build_mode .consumeClick ()) {
163+ sendCommand ("build" );
164+ }
165+
166+ // toggle dev mode
167+ while (dev_mode .consumeClick ()) {
168+ sendCommand ("dev" );
135169 }
136170
137171 // spawn
138172 while (spawn .consumeClick ()) {
139173 sendCommand ("s" );
140174 }
141175
142- // toggle fs
176+ // fs keybinds
177+ while (toggleFsSlow .consumeClick ()) {
178+ sendCommand ("fs " + Config .getInteger ("fsNormal" ).toString ());
179+ }
180+
143181 while (toggleFsMedium .consumeClick ()) {
144- fsToggle .toggleFlightSpeed (Config .getInteger ("fsMed" ));
182+ //fsToggle.toggleFlightSpeed(Config.getInteger("fsMed"));
183+ sendCommand ("fs " + Config .getInteger ("fsMed" ).toString ());
145184 }
146185
147186 while (toggleFsFast .consumeClick ()) {
148- fsToggle .toggleFlightSpeed (Config .getInteger ("fsFast" ));
187+ //fsToggle.toggleFlightSpeed(Config.getInteger("fsFast"));
188+ sendCommand ("fs " + Config .getInteger ("fsFast" ).toString ());
149189 }
150190
151191 // lagslayer
@@ -224,6 +264,40 @@ public void onInitializeClient() {
224264 sendCommand ("support queue" );
225265 }
226266
267+ while (node1 .consumeClick ()){
268+ sendCommand ("server node1" );
269+ }
270+ while (node2 .consumeClick ()){
271+ sendCommand ("server node2" );
272+ }
273+ while (node3 .consumeClick ()){
274+ sendCommand ("server node3" );
275+ }
276+ while (node4 .consumeClick ()){
277+ sendCommand ("server node4" );
278+ }
279+ while (node5 .consumeClick ()){
280+ sendCommand ("server node5" );
281+ }
282+ while (node6 .consumeClick ()){
283+ sendCommand ("server node6" );
284+ }
285+ while (node7 .consumeClick ()){
286+ sendCommand ("server node7" );
287+ }
288+ while (beta .consumeClick ()){
289+ sendCommand ("server beta" );
290+ }
291+ while (dev .consumeClick ()){
292+ sendCommand ("server dev" );
293+ }
294+ while (dev2 .consumeClick ()){
295+ sendCommand ("server dev2" );
296+ }
297+ while (dev3 .consumeClick ()){
298+ sendCommand ("server dev3" );
299+ }
300+
227301 // chat shortcuts
228302 Optional <KeyMapping > pressedChatShortcut = ChatShortcut .KeyMappings ().stream ()
229303 .filter (KeyMapping -> {
0 commit comments