From: Christian Heller Date: Wed, 9 Dec 2020 00:25:06 +0000 (+0100) Subject: In clients, don't open item selection menu when no item in reach. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks?a=commitdiff_plain;h=dbb17811ffb485471c228544549e8c8ff940a946;p=plomrogue2 In clients, don't open item selection menu when no item in reach. --- diff --git a/rogue_chat.html b/rogue_chat.html index 42b0362..1b501b5 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -853,7 +853,10 @@ let tui = { } }; 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])); diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index efddaf6..aeb955e 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -672,6 +672,9 @@ class TUI: if t.portable and t.position in select_range] if len(self.selectables) == 0: self.log_msg('none') + self.flash = True + self.switch_mode('play') + return else: for i in range(len(self.selectables)): t = self.selectables[i]