home · contact · privacy
In clients, don't open dropping direction menu if not carrying droppable.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 9 Dec 2020 01:49:24 +0000 (02:49 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 9 Dec 2020 01:49:24 +0000 (02:49 +0100)
rogue_chat.html
rogue_chat_curses.py

index 9d5eddf47c8a44e3147185daefa322d582bd1435..1c1fd1a125ddce134471b3cfb8432726e6a6e2ca 100644 (file)
@@ -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)) {
index 657523fbcf3257aca52daaa749a8ad880ed8906f..2d51ce8a7b4b7d07fa7fed786975abead99af7c5 100755 (executable)
@@ -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'}: