home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In clients, don't open item selection menu when no item in reach.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 3b9238f098e12eb1daa4a69b1f78065dfc8a862c..1b501b5189354e70fcb5658c61db8a62e4acb862 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-853,7
+853,10
@@
let tui = {
}
};
if (this.selectables.length == 0) {
}
};
if (this.selectables.length == 0) {
- this.log_msg('none')
+ this.log_msg('none');
+ terminal.blink_screen();
+ this.switch_mode('play');
+ return;
} else {
for (let [i, t] of this.selectables.entries()) {
this.log_msg(i + ': ' + explorer.get_thing_info(t[1]));
} else {
for (let [i, t] of this.selectables.entries()) {
this.log_msg(i + ': ' + explorer.get_thing_info(t[1]));
@@
-1686,13
+1689,16
@@
document.getElementById("teleport").onclick = function() {
game.teleport();
};
for (const move_button of document.querySelectorAll('[id*="_move_"]')) {
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() {
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]);
server.send(['TASK:MOVE', direction]);
- } else {
+ } else
if (tui.mode.available_actions.includes("move_explorer"))
{
explorer.move(direction);
explorer.move(direction);
+ tui.full_refresh();
};
};
};
};
};
};