X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance2?a=blobdiff_plain;f=plomrogue%2Fgame.py;h=47f09d161ceff332b2e8ad43f086161d9ad75854;hb=22d0a54ba1131600ad5cab77318cc51896c951f0;hp=3c927dbb7dc92e2718b08185f71e496f469694e1;hpb=0329d62bfc40ef8d54d9df8f5d9119515a871cf6;p=plomrogue2 diff --git a/plomrogue/game.py b/plomrogue/game.py index 3c927db..47f09d1 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -121,6 +121,8 @@ class Game(GameBase): self.tasks = {} self.thing_types = {} self.sessions = {} + self.faces = {} + self.hats = {} self.maps = {} self.map_controls = {} self.map_control_passwords = {} @@ -180,7 +182,7 @@ class Game(GameBase): def get_string_options(self, string_option_type): if string_option_type == 'direction': - return self.map_geometry.get_directions() + return self.map_geometry.directions elif string_option_type == 'char': return [c for c in string.digits + string.ascii_letters + string.punctuation + ' '] @@ -199,11 +201,36 @@ class Game(GameBase): player = self.get_thing(self.sessions[connection_id]['thing_id']) return player + def get_face(self, t): + if t.type_ == 'Player': + if t.name in self.faces: + return self.faces[t.name] + else: + return '/O O\\' + '| oo |' + '\\>--