home · contact · privacy
Only allow cookable items to be cooked into cookies.
[plomrogue2] / plomrogue / tasks.py
index 94f79a3350e1335eede208608b15a8a3e7577190..9b53bbe86f98fdc0efe08cede71c0870fb3e3d17 100644 (file)
@@ -155,6 +155,12 @@ class Task_DROP(Task):
                       if t.type_ == 'BottleDeposit'
                       and t.position == target_position]:
                 raise PlayError('cannot drop full bottle into bottle deposit')
+        for t in [t for t in self.thing.game.things
+                  if t.type_ == 'CookieSpawner'
+                  and t.position == target_position]:
+            if not self.thing.carrying.cookable:
+                raise PlayError('cannot cook items of this type')
+            break
 
     def do(self):
         target_position = self._get_move_target()