From 6861e33d8edc80a8d1cf0244b6938620cc9a2991 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Tue, 15 Dec 2020 00:39:00 +0100 Subject: [PATCH] Fix map geometry initialization bug. --- rogue_chat_curses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', -- 2.30.2