From: Christian Heller Date: Wed, 9 Dec 2020 01:49:24 +0000 (+0100) Subject: In clients, don't open dropping direction menu if not carrying droppable. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=d524cfceadd9338a18759e8a7ea1db659cd6cbb5;p=plomrogue2 In clients, don't open dropping direction menu if not carrying droppable. --- diff --git a/rogue_chat.html b/rogue_chat.html index 9d5eddf..1c1fd1a 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -770,6 +770,12 @@ let tui = { this.switch_mode('play'); return; }; + if (mode_name == 'drop_thing' && (!player.carrying)) { + this.log_msg('? not carrying anything droppable'); + terminal.blink_screen(); + this.switch_mode('play'); + return; + } if (mode_name == 'admin_enter' && this.is_admin) { mode_name = 'admin'; } else if (['name_thing', 'admin_thing_protect'].includes(mode_name)) { diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 657523f..2d51ce8 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -635,6 +635,12 @@ class TUI: self.flash = True self.switch_mode('play') return + if mode_name == 'drop_thing' and\ + not (hasattr(player, 'carrying' or player.carrying)): + self.log_msg('? not carrying anything droppable') + self.flash = True + self.switch_mode('play') + return if mode_name == 'admin_enter' and self.is_admin: mode_name = 'admin' elif mode_name in {'name_thing', 'admin_thing_protect'}: