X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=new2%2Frogue_chat_curses.py;h=7030c296353332d30cc4cb4e032a6d38d9026687;hb=55e616c9a3a957298f19f0594ee2a828fdfd8ad0;hp=ad9dba169620299ecfd78e598664ce520f556894;hpb=ebce2a63305565ce32f336881b49a428fc5d91d3;p=plomrogue2-experiments diff --git a/new2/rogue_chat_curses.py b/new2/rogue_chat_curses.py index ad9dba1..7030c29 100755 --- a/new2/rogue_chat_curses.py +++ b/new2/rogue_chat_curses.py @@ -208,19 +208,19 @@ class TUI: self.login_name = None self.switch_mode('waiting_for_server') self.keys = { - 'switch_to_chat': 'C', - 'switch_to_play': 'P', - 'switch_to_annotate': 'E', - 'switch_to_portal': 'p', + 'switch_to_chat': 't', + 'switch_to_play': 'p', + 'switch_to_annotate': 'm', + 'switch_to_portal': 'P', 'switch_to_study': '?', - 'switch_to_edit': 'E', - 'flatten': 'f', + 'switch_to_edit': 'm', + 'flatten': 'F', 'hex_move_upleft': 'w', 'hex_move_upright': 'e', 'hex_move_right': 'd', - 'hex_move_downright': 'c', - 'hex_move_downleft': 'x', - 'hex_move_left': 's', + 'hex_move_downright': 'x', + 'hex_move_downleft': 'y', + 'hex_move_left': 'a', 'square_move_up': 'w', 'square_move_left': 'a', 'square_move_down': 's', @@ -480,6 +480,7 @@ class TUI: draw_map() curses.curs_set(False) # hide cursor + curses.use_default_colors(); stdscr.timeout(10) reset_screen_size() self.explorer = YX(0, 0) @@ -516,9 +517,9 @@ class TUI: self.input_ = "" elif self.mode == self.mode_chat and key == '\n': if self.input_[0] == '/': - if self.input_ in {'/P', '/play'}: + if self.input_ in {'/' + self.keys['switch_to_play'], '/play'}: self.switch_mode('play') - elif self.input_ in {'/?', '/study'}: + elif self.input_ in {'/' + self.keys['switch_to_study'], '/study'}: self.switch_mode('study') elif self.input_ == '/help': self.help() @@ -584,9 +585,6 @@ class TUI: self.send('TASK:FLATTEN_SURROUNDINGS') elif key in self.movement_keys: self.send('TASK:MOVE ' + self.movement_keys[key]) - elif key == 'q': - self.log_msg('quitting') - self.send('QUIT') elif self.mode == self.mode_edit: self.send('TASK:WRITE ' + key) self.switch_mode('play')