X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=rogue_chat_curses.py;h=562c9c703b201162ae4687487f21890187c4b75b;hb=eb5f4bf45f5af3791a0280745038b625737b9f57;hp=a6e05ab1bf98eb0b02ab2bf12b60678bec576ddc;hpb=47dec82c0a0bc1949bc407c688569fc3fd5887f9;p=plomrogue2 diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index a6e05ab..562c9c7 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -533,6 +533,7 @@ class TUI: self.log_msg('@ enter tile control password for "%s":' % self.tile_control_char) elif self.mode.name == 'control_tile_draw': self.log_msg('@ can draw tile control character "%s", turn drawing on/off with [%s], finish with [%s].' % (self.tile_control_char, self.keys['toggle_tile_draw'], self.keys['switch_to_admin_enter'])) + self.input_ = "" self.restore_input_values() def loop(self, stdscr): @@ -855,35 +856,28 @@ class TUI: self.log_msg('@ aborted') else: self.send('SET_MAP_CONTROL_PASSWORD ' + quote(self.tile_control_char) + ' ' + quote(self.input_)) - self.input_ = "" self.switch_mode('admin') elif self.mode.name == 'password' and key == '\n': if self.input_ == '': self.input_ = ' ' self.password = self.input_ - self.input_ = "" self.switch_mode('edit') elif self.mode.name == 'admin_enter' and key == '\n': self.send('BECOME_ADMIN ' + quote(self.input_)) - self.input_ = "" self.switch_mode('play') elif self.mode.name == 'control_pw_type' and key == '\n': if len(self.input_) != 1: self.log_msg('@ entered non-single-char, therefore aborted') self.switch_mode('admin') - self.input_ = "" else: self.tile_control_char = self.input_ - self.input_ = "" self.switch_mode('control_pw_pw') elif self.mode.name == 'control_tile_type' and key == '\n': if len(self.input_) != 1: self.log_msg('@ entered non-single-char, therefore aborted') self.switch_mode('admin') - self.input_ = "" else: self.tile_control_char = self.input_ - self.input_ = "" self.switch_mode('control_tile_draw') elif self.mode.name == 'chat' and key == '\n': if self.input_ == '': @@ -913,14 +907,12 @@ class TUI: self.input_ = ' ' self.send('ANNOTATE %s %s %s' % (self.explorer, quote(self.input_), quote(self.password))) - self.input_ = "" self.switch_mode('edit') elif self.mode.name == 'portal' and key == '\n': if self.input_ == '': self.input_ = ' ' self.send('PORTAL %s %s %s' % (self.explorer, quote(self.input_), quote(self.password))) - self.input_ = "" self.switch_mode('edit') elif self.mode.name == 'study': if self.mode.mode_switch_on_key(self, key):