projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f65f2f0
)
Orientate the doors
author
Neil
<neil@dip.sun.ac.za>
Sat, 5 Mar 2016 12:06:22 +0000
(14:06 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Sat, 5 Mar 2016 12:06:22 +0000
(14:06 +0200)
koperkapel/loaders/levelloader.py
patch
|
blob
|
history
diff --git
a/koperkapel/loaders/levelloader.py
b/koperkapel/loaders/levelloader.py
index 190319e451bbffd235678a2ddc3a6e21510f5b4c..9bb85e41ebf89fd57084d00cdd7f01522e318d23 100644
(file)
--- a/
koperkapel/loaders/levelloader.py
+++ b/
koperkapel/loaders/levelloader.py
@@
-46,8
+46,14
@@
class LevelLoader(ResourceLoader):
# 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']: