X-Git-Url: https://plomlompom.com/repos/processes?a=blobdiff_plain;f=plomrogue%2Fgame.py;h=7936842ae6ce892ae9a27e7a4aa28593de5196b8;hb=3efcac66212325fecbbf28e3c19762821fb65d76;hp=d7be311f3d54dc02535fa1471c510d2e8db03263;hpb=ee8eaa164b0ef612ababcea32e2a488ad86c1103;p=plomrogue2 diff --git a/plomrogue/game.py b/plomrogue/game.py index d7be311..7936842 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -1,5 +1,3 @@ -from plomrogue.tasks import (Task_WAIT, Task_MOVE, Task_WRITE, - Task_FLATTEN_SURROUNDINGS) from plomrogue.errors import GameError, PlayError from plomrogue.io import GameIO from plomrogue.misc import quote @@ -123,6 +121,7 @@ class Game(GameBase): self.map_controls = {} self.map_control_passwords = {} self.annotations = {} + self.spawn_point = YX(0,0), YX(0,0) self.portals = {} self.player_chars = string.digits + string.ascii_letters self.player_char_i = -1 @@ -218,7 +217,6 @@ class Game(GameBase): for little_yx in [little_yx for little_yx in self.annotations[big_yx] if player.fov_test(big_yx, little_yx)]: target_yx = player.fov_stencil.target_yx(big_yx, little_yx) - annotation = self.annotations[big_yx][little_yx] self.io.send('ANNOTATION_HINT %s' % (target_yx,), c_id) self.io.send('GAME_STATE_COMPLETE') @@ -334,6 +332,8 @@ class Game(GameBase): t.position[1], t.type_, t.id_)) if hasattr(t, 'name'): write(f, 'THING_NAME %s %s' % (t.id_, quote(t.name))) + write(f, 'SPAWN_POINT %s %s' % (self.spawn_point[0], + self.spawn_point[1])) def get_map(self, big_yx, type_='normal'): if type_ == 'normal': @@ -352,6 +352,7 @@ class Game(GameBase): self.annotations = {} self.portals = {} self.admin_passwords = [] + self.spawn_point = YX(0,0), YX(0,0) self.map_geometry = map_geometry self.map_control_passwords = {'X': 'secret'} self.get_map(YX(0,0))