home · contact · privacy
Also activate HatRemixer when dropping hat by unwearing it.
[plomrogue2] / plomrogue / tasks.py
index 9fccbc33450f2c50fe5caf6269d0ba171bc7e644..2312ab4f6e0b268fa32254c9b5815e713623887c 100644 (file)
@@ -122,6 +122,12 @@ class Task_DROP(Task):
                 t.accept()
                 self.thing.game.things.remove(self.thing.carrying)
                 break
+        elif self.thing.carrying.type_ == 'Hat':
+            for t in [t for t in self.thing.game.things
+                      if t.type_ == 'HatRemixer'
+                      and t.position == self.thing.position]:
+                t.accept(self.thing.carrying)
+                break
         self.thing.carrying = None
 
 
@@ -224,7 +230,14 @@ class Task_WEAR(Task):
             self.thing.game.things += [t]
             t.design = self.thing.game.hats[self.thing.name]
             del self.thing.game.hats[self.thing.name]
+            self.thing.send_msg('CHAT "You drop your hat."')
+            for t in [t for t in self.thing.game.things
+                      if t.type_ == 'HatRemixer'
+                      and t.position == self.thing.position]:
+                t.accept(t)
+                break
         else:
             self.thing.game.hats[self.thing.name] = self.thing.carrying.design
             self.thing.game.things.remove(self.thing.carrying)
             self.thing.carrying = None
+            self.thing.send_msg('CHAT "You put on a hat."')