X-Git-Url: https://plomlompom.com/repos/?p=plomrogue2;a=blobdiff_plain;f=plomrogue%2Ftasks.py;fp=plomrogue%2Ftasks.py;h=b408ea49636b582a3dcbe8fd505faa196270fe99;hp=68ffb09d203055f4e2bd32126d1c609d103517be;hb=8e0d2b4b88650986740e7db561bfb92f24c7fe9d;hpb=5d3c2a69f040a8e4e0538a1fe7f64948aede0e0a diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 68ffb09..b408ea4 100644 --- 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