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:
5d3c2a6
)
Only allow opening/closing doors that are installed.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 27 Dec 2020 03:19:12 +0000
(
04:19
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 27 Dec 2020 03:19:12 +0000
(
04:19
+0100)
plomrogue/tasks.py
patch
|
blob
|
history
diff --git
a/plomrogue/tasks.py
b/plomrogue/tasks.py
index 68ffb09d203055f4e2bd32126d1c609d103517be..b408ea49636b582a3dcbe8fd505faa196270fe99 100644
(file)
--- a/
plomrogue/tasks.py
+++ b/
plomrogue/tasks.py
@@
-205,6
+205,8
@@
class Task_DOOR(Task):
t.type_ == 'Door' and t.position in action_radius]
if len(reachable_doors) == 0:
raise PlayError('not standing next to a door to open/close')
+ if len([d for d in reachable_doors if not d.portable]) == 0:
+ raise PlayError('can only open/close doors that are installed')
for door in reachable_doors:
if not door.blocks_movement:
return