home · contact · privacy
Add Thing spawner.
[plomrogue2] / plomrogue / tasks.py
index 558b1782f3067b70ca033dd2e3426578a8425772..a7bcf3772a4ab8f5e0351d63bb1da6f0e86c2f52 100644 (file)
@@ -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