X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=plomrogue%2Ftasks.py;h=3dc09282449ac03088d88800c488004f8dfafaee;hb=fbce872bf4a04ac7be7d965061dabe441258999c;hp=6a886496658f4c228e33563fb6958a09c8efe4cc;hpb=eadcddf7699d5df683d544531b441332d79b6661;p=plomrogue2 diff --git a/plomrogue/tasks.py b/plomrogue/tasks.py index 6a88649..3dc0928 100644 --- a/plomrogue/tasks.py +++ b/plomrogue/tasks.py @@ -198,6 +198,7 @@ class Task_COMMAND(Task): class Task_INSTALL(Task): + argtypes = 'string' def _get_uninstallables(self): return [t for t in self.thing.game.things @@ -207,6 +208,9 @@ class Task_INSTALL(Task): and t.position == self.thing.position] def check(self): + if not self.thing.game.can_do_tile_with_pw(*self.thing.position, + self.args[0]): + raise GameError('wrong password for tile') if self.thing.carrying: if not hasattr(self.thing.carrying, 'installable')\ or not self.thing.carrying.installable: @@ -272,3 +276,4 @@ class Task_SPIN(Task): def do(self): self.thing.carrying.spin() + self.thing.send_msg('CHAT "You spin this object."')