home
·
contact
·
privacy
projects
/
plomrogue2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df9a8d0
)
Fix broken map geometry commandeering.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 26 Nov 2020 21:14:22 +0000
(22:14 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 26 Nov 2020 21:14:22 +0000
(22:14 +0100)
plomrogue/commands.py
patch
|
blob
|
history
diff --git
a/plomrogue/commands.py
b/plomrogue/commands.py
index 65b054019b0f38dbb6d492803ec72e821baff28f..a9bd7938facafcdff695608567b9bd28ac4cf3c8 100644
(file)
--- 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'