From dbb17811ffb485471c228544549e8c8ff940a946 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 9 Dec 2020 01:25:06 +0100 Subject: [PATCH] In clients, don't open item selection menu when no item in reach. --- rogue_chat.html | 5 ++++- rogue_chat_curses.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) 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] -- 2.30.2