home · contact · privacy
On name thing prohibition, switch back to edit mode; disappear help in curses client...
[plomrogue2] / rogue_chat_curses.py
index f75877aff1af88ca76cdf0e228c58cac01a69f1c..8eb70d65e7ced5f998e2f681c550e4e3ca07df41 100755 (executable)
@@ -629,10 +629,10 @@ class TUI:
 
     def switch_mode(self, mode_name):
 
-        def fail(msg):
+        def fail(msg, return_mode='play'):
             self.log_msg('? ' + msg)
             self.flash = True
-            self.switch_mode('play')
+            self.switch_mode(return_mode)
 
         if self.mode and self.mode.name == 'control_tile_draw':
             self.log_msg('@ finished tile protection drawing.')
@@ -655,7 +655,7 @@ class TUI:
                 thing = t
                 break
             if not thing:
-                return fail('not standing over thing')
+                return fail('not standing over thing', 'edit')
             else:
                 self.thing_selected = thing
         self.mode = getattr(self, 'mode_' + mode_name)
@@ -1087,6 +1087,7 @@ class TUI:
             keycode = None
             if len(key) == 1:
                 keycode = ord(key)
+            self.show_help = False
             if key == 'KEY_RESIZE':
                 reset_screen_size()
             elif self.mode.has_input_prompt and key == 'KEY_BACKSPACE':