示例#1
0
    def message(self):
        s = 'Which do you mean, '
        l = []
        for word in self.words:
            l.append(word.word.definite)
        s += utils.naturalJoin(l, ', ', ' or ')
        s += '?'

        return s
示例#2
0
    def inv(self, output):
        '''Write object inventory on output.

		output : output'''
        l = []
        for item in self.inventory:
            if props.Mobile in item.props:
                l.append(item.Normal.getDesc('inv'))

        if len(l) == 0:
            l.append('nothing')
        output.write(self.responses[self.INVENTORY] %
                     utils.naturalJoin(l, ', ', ' and '))

        output.close()
示例#3
0
 def exitString(self):
     s = self.responses[self.SEE_EXITS] % utils.naturalJoin(
         self.exits.keys(), ', ', ' and ')
     return s