Exemplo n.º 1
0
    """
    yield
    try:
        targets = [ self.getFromSlots(attribute=target) ]
    except GameException, e:
        try:
            targets = self.get(attribute=target)
        except GameException, e:
            targets = self.location().get(attribute=target)
    for target in targets:
        if target:
            target.checkUse(self)
            call = target(self)
            if isinstance(call,GeneratorType):
                while step(call): yield

def inventory(self):
    """\
    See what you are carrying.

    inventory
    """
    self.sendMessage("inventory",inventory=self.contains)

def equipment(self,target=None,slot=None):
    """\
    See what you are wearing.

    equipment <slot>
Exemplo n.º 2
0
 def __call__(self,user):
     self.user = user
     call = self.rule(self)
     if isinstance(call,GeneratorType):
         while step(call): yield