+
+
+class Task_COMMAND(Task):
+ argtypes = 'string'
+
+ def check(self):
+ if self.thing.carrying is None:
+ raise PlayError('nothing to command')
+ if not self.thing.carrying.commandable:
+ raise PlayError('cannot command this item type')
+
+ def do(self):
+ from plomrogue.misc import quote
+ reply = self.thing.carrying.interpret(self.args[0])
+ for c_id in self.thing.game.sessions:
+ if self.thing.game.sessions[c_id]['thing_id'] == self.thing.id_:
+ self.thing.game.io.send('REPLY ' + quote(reply), c_id)