X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2;a=blobdiff_plain;f=plomrogue%2Fgame.py;fp=plomrogue%2Fgame.py;h=8784007d8ddeed69e8611a7510e24266c7954dd9;hp=793c322deb6c4f296348d7c19ac4b562b7ef794f;hb=699621898072da0b0b93748e2b6a49badfdec391;hpb=d77d65edc40bb0ac17e46eb166413edb5f8e0106 diff --git a/plomrogue/game.py b/plomrogue/game.py index 793c322..8784007 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -132,6 +132,7 @@ class Game(GameBase): self.annotations = {} self.spawn_points = [] self.portals = {} + self.intro_messages = [] self.player_chars = string.digits + string.ascii_letters self.players_hat_chars = {} self.player_char_i = -1 @@ -355,6 +356,8 @@ class Game(GameBase): print('DEBUG LOGIN', t.name, len(self.sessions)) self.io.send('PLAYER_ID %s' % t.id_, connection_id) self.io.send('LOGIN_OK', connection_id) + for msg in self.intro_messages: + self.io.send('CHAT ' + quote(msg)) self.io.send('CHAT ' + quote(t.name + ' entered the map.')) for s in [s for s in self.things if s.type_ == 'SpawnPoint' and s.name == t.name]: @@ -601,6 +604,8 @@ class Game(GameBase): next_thing_id += 1 for s in self.spawn_points: write(f, 'SPAWN_POINT %s %s' % (s[0], s[1])) + for msg in self.intro_messages: + write(f, 'INTRO_MSG %s' % quote(msg))