# Create the doors first
doors = []
for door in door_info['doors']:
- # Sort out angle
- new_door = Door(door[0], door[1], 0)
+ x, y = door
+ # is this the right check
+ if self._level.can_walk(x + 1, y, 'floor') and self._level.can_walk(x - 1, y, 'floor'):
+ # vertical door
+ angle = 90
+ else:
+ angle = 0
+ new_door = Door(x, y, angle)
self._level.doors.append(new_door)
# Add the keypads
for keypad in door_info['keypads']: