X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=new2%2Frogue_chat_curses.py;h=5b3a7a81ae4f5c84b699d7b97b30538c502e3d9a;hb=95ea4ca4ac0d5bd1c18d60087619f4df898ed6a7;hp=4d994bef5ca0cc33e94de0355e2b69c9c843eea9;hpb=7d2d722ff0e2c8cfef0e7d5d62c760abc78749ce;p=plomrogue2-experiments diff --git a/new2/rogue_chat_curses.py b/new2/rogue_chat_curses.py index 4d994be..5b3a7a8 100755 --- a/new2/rogue_chat_curses.py +++ b/new2/rogue_chat_curses.py @@ -219,11 +219,11 @@ class TUI: def help(self): self.log_msg("HELP:"); self.log_msg("chat mode commands:"); - self.log_msg(" :nick NAME - re-name yourself to NAME"); - self.log_msg(" :msg USER TEXT - send TEXT to USER"); - self.log_msg(" :help - show this help"); - self.log_msg(" :P or :play - switch to play mode"); - self.log_msg(" :? or :study - switch to study mode"); + self.log_msg(" /nick NAME - re-name yourself to NAME"); + self.log_msg(" /msg USER TEXT - send TEXT to USER"); + self.log_msg(" /help - show this help"); + self.log_msg(" /P or /play - switch to play mode"); + self.log_msg(" /? or /study - switch to study mode"); self.log_msg("commands common to study and play mode:"); if type(self.game.map_geometry) == MapGeometrySquare: self.log_msg(" w,a,s,d - move"); @@ -300,7 +300,7 @@ class TUI: def reset_screen_size(): self.size = YX(*stdscr.getmaxyx()) - self.size = self.size - YX(self.size.y % 2, 0) + self.size = self.size - YX(self.size.y % 4, 0) self.size = self.size - YX(0, self.size.x % 4) self.window_width = int(self.size.x / 2) @@ -384,15 +384,14 @@ class TUI: indent = 0 if indent else 1 else: for line in map_lines_split: - map_lines += [''.join(line)] + map_lines += [' '.join(line)] window_center = YX(int(self.size.y / 2), int(self.window_width / 2)) player = self.game.get_thing(self.game.player_id, False) center = player.position if self.mode.shows_info: center = self.explorer - if type(self.game.map_geometry) == MapGeometryHex: - center = YX(center.y, center.x * 2) + center = YX(center.y, center.x * 2) offset = center - window_center if type(self.game.map_geometry) == MapGeometryHex and offset.y % 2: offset += YX(0, 1) @@ -456,22 +455,22 @@ class TUI: self.send('LOGIN ' + quote(self.input_)) self.input_ = "" elif self.mode == self.mode_chat and key == '\n': - if self.input_[0] == ':': - if self.input_ in {':P', ':play'}: + if self.input_[0] == '/': + if self.input_ in {'/P', '/play'}: self.switch_mode('play') - elif self.input_ in {':?', ':study'}: + elif self.input_ in {'/?', '/study'}: self.switch_mode('study') - if self.input_ == ':help': + elif self.input_ == '/help': self.help() - if self.input_ == ':reconnect': + elif self.input_ == '/reconnect': reconnect() - elif self.input_.startswith(':nick'): + elif self.input_.startswith('/nick'): tokens = self.input_.split(maxsplit=1) if len(tokens) == 2: self.send('LOGIN ' + quote(tokens[1])) else: self.log_msg('? need login name') - elif self.input_.startswith(':msg'): + elif self.input_.startswith('/msg'): tokens = self.input_.split(maxsplit=2) if len(tokens) == 3: self.send('QUERY %s %s' % (quote(tokens[1]),