home · contact · privacy
Simplify Thing type differentiation, Furniture becomes Item.
[plomrogue2] / plomrogue / commands.py
index 65b054019b0f38dbb6d492803ec72e821baff28f..a9bd7938facafcdff695608567b9bd28ac4cf3c8 100644 (file)
@@ -237,7 +237,10 @@ def cmd_MAP_LINE(game, big_yx, y, line):
 cmd_MAP_LINE.argtypes = 'yx_tuple int:nonneg string'
 
 def cmd_MAP(game, geometry, size):
-    map_geometry_class = globals()['MapGeometry' + geometry]
+    from plomrogue.mapping import MapGeometryHex, MapGeometrySquare
+    map_geometry_class = MapGeometrySquare
+    if geometry == 'Hex':
+        map_geometry_class = MapGeometryHex
     game.new_world(map_geometry_class(size))
 cmd_MAP.argtypes = 'string:map_geometry yx_tuple:pos'