From: Christian Heller Date: Mon, 7 Dec 2020 05:39:12 +0000 (+0100) Subject: Also activate HatRemixer when dropping hat by unwearing it. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/test?a=commitdiff_plain;h=bf8653594beb9ee94b8e7c4139b2891425a6367b;p=plomrogue2 Also activate HatRemixer when dropping hat by unwearing it. --- diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 8337132..2312ab4 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -230,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."')