From 4c6a61c986e10761f9e99692cdb2dd2cd4474633 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 26 Nov 2020 22:14:22 +0100 Subject: [PATCH] Fix broken map geometry commandeering. --- plomrogue/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plomrogue/commands.py b/plomrogue/commands.py index 65b0540..a9bd793 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -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' -- 2.30.2