home · contact · privacy
Password-protect tiles from (un-)installing things on them.
[plomrogue2] / rogue_chat.html
index 51e8078611bf510f5c4656f7724f3dfecaf643a0..3a636198a9bd69e888bbcad4607ce26f214f5129 100644 (file)
@@ -57,7 +57,6 @@ keyboard input/control: <span id="keyboard_control"></span>
       <button id="consume"></button>
       <button id="switch_to_command_thing"></button>
       <button id="teleport"></button>
-      <button id="install"></button>
       <button id="wear"></button>
       <button id="spin"></button>
     </td>
@@ -67,6 +66,7 @@ keyboard input/control: <span id="keyboard_control"></span>
     <td>
       <button id="switch_to_write"></button>
       <button id="flatten"></button>
+      <button id="install"></button>
       <button id="switch_to_annotate"></button>
       <button id="switch_to_portal"></button>
       <button id="switch_to_name_thing"></button>
@@ -705,7 +705,7 @@ let tui = {
       this.mode_play.available_modes = ["chat", "study", "edit", "admin_enter",
                                         "command_thing", "take_thing", "drop_thing"]
       this.mode_play.available_actions = ["move", "teleport", "door", "consume",
-                                          "install", "wear", "spin"];
+                                          "wear", "spin"];
       this.mode_study.available_modes = ["chat", "play", "admin_enter", "edit"]
       this.mode_study.available_actions = ["toggle_map_mode", "move_explorer"];
       this.mode_admin.available_modes = ["admin_thing_protect", "control_pw_type",
@@ -717,7 +717,8 @@ let tui = {
       this.mode_edit.available_modes = ["write", "annotate", "portal", "name_thing",
                                         "password", "chat", "study", "play",
                                         "admin_enter", "enter_face"]
-      this.mode_edit.available_actions = ["move", "flatten", "toggle_map_mode"]
+      this.mode_edit.available_actions = ["move", "flatten", "install",
+                                          "toggle_map_mode"]
       this.inputEl = document.getElementById("input");
       this.inputEl.focus();
       this.switch_mode('waiting_for_server');
@@ -1589,8 +1590,6 @@ tui.inputEl.addEventListener('keydown', (event) => {
               server.send(["TASK:INTOXICATE"]);
           } else if (event.key === tui.keys.door && tui.task_action_on('door')) {
               server.send(["TASK:DOOR"]);
-          } else if (event.key === tui.keys.install && tui.task_action_on('install')) {
-              server.send(["TASK:INSTALL"]);
           } else if (event.key === tui.keys.wear && tui.task_action_on('wear')) {
               server.send(["TASK:WEAR"]);
           } else if (event.key === tui.keys.spin && tui.task_action_on('spin')) {
@@ -1629,6 +1628,8 @@ tui.inputEl.addEventListener('keydown', (event) => {
             server.send(['TASK:MOVE', tui.movement_keys[event.key]]);
         } else if (event.key === tui.keys.flatten && tui.task_action_on('flatten')) {
             server.send(["TASK:FLATTEN_SURROUNDINGS", tui.password]);
+          } else if (event.key === tui.keys.install && tui.task_action_on('install')) {
+              server.send(["TASK:INSTALL", tui.password]);
         } else if (event.key == tui.keys.toggle_map_mode) {
             tui.toggle_map_mode();
         }