X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=rogue_chat.html;h=42b0362a4504aaed05882693cdbd05ead1c51171;hb=b9c67f75ffe716032db11c7b598c786f0fb4d3ad;hp=3b9238f098e12eb1daa4a69b1f78065dfc8a862c;hpb=22d0a54ba1131600ad5cab77318cc51896c951f0;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 3b9238f..42b0362 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -1686,13 +1686,16 @@ document.getElementById("teleport").onclick = function() { game.teleport(); }; for (const move_button of document.querySelectorAll('[id*="_move_"]')) { + if (move_button.id.startsWith('key_')) { // not a move button + continue; + }; let direction = move_button.id.split('_')[2].toUpperCase(); move_button.onclick = function() { - if (tui.mode.available_actions.includes("move") - || tui.mode.available_actions.includes("move_explorer")) { + if (tui.mode.available_actions.includes("move")) { server.send(['TASK:MOVE', direction]); - } else { + } else if (tui.mode.available_actions.includes("move_explorer")) { explorer.move(direction); + tui.full_refresh(); }; }; };