From: Christian Heller Date: Thu, 26 Nov 2020 21:14:22 +0000 (+0100) Subject: Fix broken map geometry commandeering. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/static/index.html?a=commitdiff_plain;h=4c6a61c986e10761f9e99692cdb2dd2cd4474633;p=plomrogue2 Fix broken map geometry commandeering. --- 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'