From: Christian Heller Date: Thu, 26 Nov 2020 21:51:47 +0000 (+0100) Subject: Fix game state change overwriting input fields. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/edit?a=commitdiff_plain;h=7c8e4b41c019affacda141989fe532ec10af86e7;p=plomrogue2 Fix game state change overwriting input fields. --- diff --git a/rogue_chat.html b/rogue_chat.html index 701a6db..68646f9 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -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'); diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 466c9b7..2adbe3b 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -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'}: