X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Fgame.py;h=a3a636def40ba816c7dd658465f47bb2a59d4a54;hb=aab94ffb12aa0dedc240d7b29001699b95c49249;hp=aa5c0db902ed9beda89ffe9f2dba8d9840170d73;hpb=1ae4633dc3322876c494f710de67dfdbb0a2a5ba;p=plomrogue2 diff --git a/plomrogue/game.py b/plomrogue/game.py index aa5c0db..a3a636d 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -132,6 +132,7 @@ class Game(GameBase): self.spawn_point = YX(0, 0), YX(0, 0) self.portals = {} self.player_chars = string.digits + string.ascii_letters + self.players_hat_chars = {} self.player_char_i = -1 self.admin_passwords = [] self.send_gamestate_interval = datetime.timedelta(seconds=0.04) @@ -277,6 +278,8 @@ class Game(GameBase): # collected here as a shortcut, but a cleaner way would be to # differentiate the changes somehow. self.io.send('PSEUDO_FOV_WIPE', c_id) + self.io.send('PLAYERS_HAT_CHARS ' + quote(player.get_cookie_chars()), + c_id) for t in player.seen_things: target_yx = player.fov_stencil.target_yx(*t.position) self.io.send('THING %s %s %s %s %s %s' @@ -491,6 +494,9 @@ class Game(GameBase): for name in self.hats: write(f, 'GOD_PLAYER_HAT %s %s' % (quote(name), quote(self.hats[name]))) + for name in self.players_hat_chars: + write(f, 'GOD_PLAYERS_HAT_CHARS %s %s' % + (quote(name), quote(self.players_hat_chars[name]))) for t in [t for t in self.things if not t.type_ == 'Player']: write(f, 'THING %s %s %s %s' % (t.position[0], t.position[1], t.type_, t.id_))