home · contact · privacy
Fix game state change overwriting input fields.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 26 Nov 2020 21:51:47 +0000 (22:51 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 26 Nov 2020 21:51:47 +0000 (22:51 +0100)
rogue_chat.html
rogue_chat_curses.py

index 701a6db840dd4703b010584256b93f2df34ec638..68646f96a46f6b4f79df25f6acfd4197e6cf2d37 100644 (file)
@@ -437,7 +437,6 @@ let server = {
         } else if (tokens[0] === 'ANNOTATION') {
             let position = parser.parse_yx(tokens[1]);
             explorer.update_info_db(position, tokens[2]);
-            tui.restore_input_values();
             tui.full_refresh();
         } else if (tokens[0] === 'UNHANDLED_INPUT') {
             tui.log_msg('? unknown command');
index 466c9b7d72a69f25ed999cf18bf13b2bd1ab5da3..2adbe3bb8c3e60cd7b08da5bca2ebbe948f78c8f 100755 (executable)
@@ -238,7 +238,6 @@ cmd_ANNOTATION_HINT.argtypes = 'yx_tuple:nonneg'
 
 def cmd_ANNOTATION(game, position, msg):
     game.info_db[position] = msg
-    game.tui.restore_input_values()
     if game.tui.mode.shows_info:
         game.tui.do_refresh = True
 cmd_ANNOTATION.argtypes = 'yx_tuple:nonneg string'
@@ -520,7 +519,7 @@ class TUI:
         if mode_name == 'admin_enter' and self.is_admin:
             mode_name = 'admin'
         self.mode = getattr(self, 'mode_' + mode_name)
-        if self.mode and self.mode.name == 'control_tile_draw':
+        if self.mode.name == 'control_tile_draw':
             self.log_msg('@ finished tile protection drawing.')
         if self.mode.name in {'control_tile_draw', 'control_tile_type',
                               'control_pw_type'}: