From: Christian Heller Date: Tue, 8 Dec 2020 23:43:16 +0000 (+0100) Subject: Fix web client moving player with explorer on move button press. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/todos?a=commitdiff_plain;h=77d92cc43df05bebecde95f39074024f359ad1be;p=plomrogue2 Fix web client moving player with explorer on move button press. --- diff --git a/rogue_chat.html b/rogue_chat.html index 3b9238f..a28951a 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -1688,11 +1688,11 @@ document.getElementById("teleport").onclick = function() { for (const move_button of document.querySelectorAll('[id*="_move_"]')) { 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(); }; }; };