X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomrogue%2Ftasks.py;h=a7bcf3772a4ab8f5e0351d63bb1da6f0e86c2f52;hb=8b9e2703ed579b52dd514656599b8530c9b275cb;hp=558b1782f3067b70ca033dd2e3426578a8425772;hpb=df9a8d0a788b29913dae3eec4ef8113e2d8e9a41;p=plomrogue2 diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 558b178..a7bcf37 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -87,7 +87,8 @@ class Task_PICK_UP(Task): raise PlayError('already carrying something') nothing_to_pick_up = True for t in [t for t in self.thing.game.things - if t != self.thing and t.position == self.thing.position and + if t.portable + and t != self.thing and t.position == self.thing.position and t.type_ != 'Player']: nothing_to_pick_up = False break @@ -96,7 +97,8 @@ class Task_PICK_UP(Task): def do(self): to_pick_up = [t for t in self.thing.game.things - if t != self.thing and t.position == self.thing.position][0] + if t.portable + and t != self.thing and t.position == self.thing.position][0] self.thing.carrying = to_pick_up