home · contact · privacy
Allow player movement beyond central map. Lots of mapping rewrite.
[plomrogue2-experiments] / new / plomrogue / commands.py
index c845ed1ce1dcc2135aad94b4696b768cb8ff86f4..bcab2d10702c13bda99a2fee684e210b5e7fa979 100644 (file)
@@ -15,12 +15,12 @@ def cmd_SEED(game, seed):
 cmd_SEED.argtypes = 'int:nonneg'
 
 def cmd_MAP_SIZE(game, size):
-    game.world.map_size = size
+    game.map_size = size
 cmd_MAP_SIZE.argtypes = 'yx_tuple:pos'
 
 def cmd_MAP(game, map_pos):
-    """Create new map at position map_pos and only of '?' cells."""
-    game.world.new_map(map_pos)
+    """Ensure (possibly empty/'?'-filled) map at position map_pos."""
+    game.world.get_map(map_pos)
 cmd_MAP.argtypes = 'yx_tuple'
 
 def cmd_THING_TYPE(game, i, type_):
@@ -104,7 +104,7 @@ def cmd_SAVE(game):
     with open(save_file_name, 'w') as f:
         write(f, 'TURN %s' % game.world.turn)
         write(f, 'SEED %s' % game.world.rand.prngod_seed)
-        write(f, 'MAP_SIZE %s' % (game.world.map_size,))
+        write(f, 'MAP_SIZE %s' % (game.map_size,))
         for map_pos in game.world.maps:
             write(f, 'MAP %s' % (map_pos,))
         for map_pos in game.world.maps: