X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=rogue_chat.html;h=82bfbed97fd8902e48aca9e86bb8ec3e15c109eb;hb=2dc444966037a42b51ed190ab0eab88a09c0282a;hp=a09892dbc86576e8db2d437a29e22212e09508c2;hpb=618cd58b293857779e6810ee9ca831a383822c66;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index a09892d..82bfbed 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -745,7 +745,7 @@ let tui = { this.mode_admin.available_modes = ["admin_thing_protect", "control_pw_type", "control_tile_type", "chat", "study", "play", "edit"] - this.mode_admin.available_actions = ["move"]; + this.mode_admin.available_actions = ["move", "toggle_map_mode"]; this.mode_control_tile_draw.available_modes = ["admin_enter"] this.mode_control_tile_draw.available_actions = ["toggle_tile_draw"]; this.mode_edit.available_modes = ["write", "annotate", "portal", "name_thing", @@ -1069,9 +1069,13 @@ let tui = { this.switch_mode('play'); }, enter_ascii_art: function(command) { - if (this.inputEl.value.length != 6) { - this.log_msg('? wrong input length, must be 6; try again'); + if (this.inputEl.value.length > 6) { + this.log_msg('? wrong input length, must be max 6; try again'); return; + } else if (this.inputEl.value.length < 6) { + while (this.inputEl.value.length < 6) { + this.inputEl.value += ' '; + } } this.log_msg(' ' + this.inputEl.value); this.full_ascii_draw += this.inputEl.value; @@ -1716,6 +1720,8 @@ tui.inputEl.addEventListener('keydown', (event) => { } else if (tui.mode.name == 'admin') { if (tui.mode.mode_switch_on_key(event)) { null; + } else if (event.key == tui.keys.toggle_map_mode) { + tui.toggle_map_mode(); } else if (event.key in tui.movement_keys && tui.task_action_on('move')) { server.send(['TASK:MOVE', tui.movement_keys[event.key]]); };