X-Git-Url: https://plomlompom.com/repos/do_todos?a=blobdiff_plain;ds=sidebyside;f=rogue_chat.html;h=ffed950bfe65738cfe5d29468eb93de0fa244fec;hb=94f399dbee74479669095c3f79548ebae4a4cd80;hp=15b715a4f0e686108bfdf0923ee8b4b19b558162;hpb=e6a3ab3471ae5a2be10bd64d694eef462d7f7cf6;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 15b715a..ffed950 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -672,7 +672,7 @@ let tui = { el.disabled = true; } document.getElementById("help").disabled = false; - if (this.mode.name == 'play' || this.mode.name == 'study' || this.mode.name == 'control_tile_draw' || this.mode.name == 'edit') { + if (this.mode.name == 'play' || this.mode.name == 'study' || this.mode.name == 'control_tile_draw' || this.mode.name == 'edit' || this.mode.name == 'admin') { for (const move_key of document.querySelectorAll('[id^="move_"]')) { move_key.disabled = false; } @@ -1033,6 +1033,12 @@ let tui = { content += '/' + this.keys.switch_to_study + ' or /study – switch to study mode\n'; content += '/' + this.keys.switch_to_edit + ' or /edit – switch to map edit mode\n'; content += '/' + this.keys.switch_to_admin_enter + ' or /admin – switch to admin mode\n'; + } else if (this.mode.name == 'admin') { + content += "Available actions:\n"; + if (game.tasks.includes('MOVE')) { + content += "[" + movement_keys_desc + "] – move player\n"; + } + content += '\n'; } content += this.mode.list_available_modes(); let start_x = 0; @@ -1411,6 +1417,9 @@ tui.inputEl.addEventListener('keydown', (event) => { } else if (tui.mode.name == 'admin') { if (tui.mode.mode_switch_on_key(event)) { null; + } else if (event.key in tui.movement_keys + && game.tasks.includes('MOVE')) { + server.send(['TASK:MOVE', tui.movement_keys[event.key]]); }; } else if (tui.mode.name == 'edit') { if (tui.mode.mode_switch_on_key(event)) {