home · contact · privacy
Add basic admin commands.
[plomrogue2] / plomrogue / game.py
index 23a0d7bbc21cd7763e9c58e7f2e7c49da584c3a9..8b3edb16127cf184886cca687412832326a2f15b 100755 (executable)
@@ -64,6 +64,7 @@ class Game(GameBase):
         self.portals = {}
         self.player_chars = string.digits + string.ascii_letters
         self.player_char_i = -1
+        self.admin_passwords = []
         self.terrains = {
             '.': 'floor',
             'X': 'wall',
@@ -265,6 +266,8 @@ class Game(GameBase):
           for tile_class in self.map_control_passwords:
               write(f, 'MAP_CONTROL_PW %s %s' % (tile_class,
                                                  self.map_control_passwords[tile_class]))
+          for pw in self.admin_passwords:
+                  write(f, 'ADMIN_PASSWORD %s' % pw)
           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_))