X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomrogue%2Fgame.py;h=0fc486796232a1e5c95f102847e5ea59147eb2ba;hb=ed297e4e19f8a83872d6345b86321e10aec019d4;hp=017580f24e4cb28ef98062f4d11026b2a02894ca;hpb=c7a3af00680ba0449310bbb7336a187dd4ed6bcf;p=plomrogue2 diff --git a/plomrogue/game.py b/plomrogue/game.py index 017580f..0fc4867 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -122,6 +122,7 @@ class Game(GameBase): self.thing_types = {} self.sessions = {} self.faces = {} + self.hats = {} self.maps = {} self.map_controls = {} self.map_control_passwords = {} @@ -246,6 +247,9 @@ class Game(GameBase): c_id) if hasattr(t, 'name'): self.io.send('THING_NAME %s %s' % (t.id_, quote(t.name)), c_id) + if t.type_ == 'Player' and t.name in self.hats: + hat = self.hats[t.name] + self.io.send('THING_HAT %s %s' % (t.id_, quote(hat)), c_id) face = self.get_face(t) if face: self.io.send('THING_FACE %s %s' % (t.id_, quote(face)), c_id) @@ -386,6 +390,9 @@ class Game(GameBase): for name in self.faces: write(f, 'GOD_PLAYER_FACE %s %s' % (quote(name), quote(self.faces[name]))) + for name in self.hats: + write(f, 'GOD_PLAYER_HAT %s %s' % (quote(name), + quote(self.hats[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_))