home · contact · privacy
Add dancing task/action.
[plomrogue2] / plomrogue / tasks.py
index 95945055e0f7e15923bc34780a985c2b3a5ea556..cc375272c1edd941aeafbbb4117a3d30db142d8c 100644 (file)
@@ -68,7 +68,7 @@ class Task_MOVE(Task):
             if 'sittable' in terrain_type.tags:
                 self.thing.standing = False
                 self.thing.send_msg('CHAT "You sink into the %s. '
-                                    'Staying here will reduce your weariness."'
+                                    'Staying here will replenish your energy."'
                                     % terrain_type.description)
         self.thing.invalidate('fov')
         if self.thing.blocks_light:
@@ -179,6 +179,9 @@ class Task_DROP(Task):
         target_position = self._get_move_target()
         dropped = self.thing.uncarry()
         dropped.position = target_position
+        if dropped.type_ == 'Crate':
+            for item in dropped.content:
+                item.position = target_position
         targets = [t for t in self.thing.game.things
                    if t.position == dropped.position and not t == dropped]
         for target in targets:
@@ -371,3 +374,12 @@ class Task_SPIN(Task):
     def do(self):
         self.thing.carrying.spin()
         self.thing.send_msg('CHAT "You spin this object."')
+
+
+
+class Task_DANCE(Task):
+
+    def do(self):
+        self.thing.send_msg('CHAT "You dance."')
+        self.thing.dancing += 10
+        self.thing.game.changed = True