home · contact · privacy
Fix web client moving player with explorer on move button press.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 8 Dec 2020 23:43:16 +0000 (00:43 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 8 Dec 2020 23:43:16 +0000 (00:43 +0100)
rogue_chat.html

index 3b9238f098e12eb1daa4a69b1f78065dfc8a862c..a28951a86711b79df84b8e8102d59c78c5ed96c0 100644 (file)
@@ -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();
         };
     };
 };