From 7c8e4b41c019affacda141989fe532ec10af86e7 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 26 Nov 2020 22:51:47 +0100 Subject: [PATCH] Fix game state change overwriting input fields. --- rogue_chat.html | 1 - rogue_chat_curses.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) 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'}: -- 2.30.2