From: Christian Heller Date: Mon, 14 Dec 2020 23:39:00 +0000 (+0100) Subject: Fix map geometry initialization bug. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=6861e33d8edc80a8d1cf0244b6938620cc9a2991;p=plomrogue2 Fix map geometry initialization bug. --- diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 65d5385..ff55924 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -256,14 +256,14 @@ def cmd_MAP(game, geometry, size, content): map_geometry_class = globals()['MapGeometry' + geometry] game.map_geometry_new = map_geometry_class(size) game.map_content_new = content - if type(game.map_geometry) == MapGeometrySquare: + if type(game.map_geometry_new) == MapGeometrySquare: game.tui.movement_keys = { game.tui.keys['square_move_up']: 'UP', game.tui.keys['square_move_left']: 'LEFT', game.tui.keys['square_move_down']: 'DOWN', game.tui.keys['square_move_right']: 'RIGHT', } - elif type(game.map_geometry) == MapGeometryHex: + elif type(game.map_geometry_new) == MapGeometryHex: game.tui.movement_keys = { game.tui.keys['hex_move_upleft']: 'UPLEFT', game.tui.keys['hex_move_upright']: 'UPRIGHT',