@tornado.gen.coroutine
    def setprop(self, ctx, loctx, key, val):
        if ctx.level != LEVEL_EXECUTE:
            raise Exception('Properties may only be set in action code (player prop "%s")' % (key,))
        iid = loctx.iid
        uid = self.uid
        app = ctx.app

        tup = ('iplayerprop', iid, uid, key)
        yield app.propcache.set(tup, val)
        ctx.task.changeset.add(tup)
Set a player instance property.
dataset/ETHPy150Open erkyrath/tworld/lib/two/execute.py/PlayerProxy.setprop