Example #1
0
 def interlinguish_desire_verb3_operation(self, op, say):
     """Handle a sentence of the form 'I would like to ...'"""
     object=say[2:]
     verb=interlinguish.get_verb(object)
     operation_method=self.find_op_method(verb,"interlinguish_desire_verb3_",
                                          self.interlinguish_undefined_operation)
     res = Oplist()
     res = res + self.call_interlinguish_triggers(verb, "interlinguish_desire_verb3_", op, object)
     res = res + operation_method(op, object)
     return res
Example #2
0
 def interlinguish_desire_verb3_operation(self, op, say):
     """Handle a sentence of the form 'I would like to ...'"""
     object=say[2:]
     verb=interlinguish.get_verb(object)
     operation_method=self.find_op_method(verb,"interlinguish_desire_verb3_",
                                          self.interlinguish_undefined_operation)
     res = Oplist()
     res = res + self.call_interlinguish_triggers(verb, "interlinguish_desire_verb3_", op, object)
     res = res + operation_method(op, object)
     return res
Example #3
0
    def sound_talk_operation(self, op):
        """Handle the sound of a talk operation from another character.

        The spoken sentence comes in as a sentence string, which
        is converted into a structure representation by the interlinguish
        code. Embedded in the structure is the interlinguish string which
        is then used to call methods and activate triggers, such as
        dynamic goals."""

        talk_entity=op[0]
        if interlinguish.convert_english_to_interlinguish(self, talk_entity):
            say=talk_entity.interlinguish
            verb=interlinguish.get_verb(say)
            operation_method=self.find_op_method(verb,"interlinguish_",
                                  self.interlinguish_undefined_operation)
            res = self.call_interlinguish_triggers(verb, "interlinguish_", op, say)
            res2 = operation_method(op,say)
            if res:
                res += res2
            else:
                res = res2
            return res
Example #4
0
    def sound_talk_operation(self, op):
        """Handle the sound of a talk operation from another character.

        The spoken sentence comes in as a sentence string, which
        is converted into a structure representation by the interlinguish
        code. Embedded in the structure is the interlinguish string which
        is then used to call methods and activate triggers, such as
        dynamic goals."""

        talk_entity=op[0]
        if interlinguish.convert_english_to_interlinguish(self, talk_entity):
            say=talk_entity.interlinguish
            verb=interlinguish.get_verb(say)
            operation_method=self.find_op_method(verb,"interlinguish_",
                                  self.interlinguish_undefined_operation)
            res = self.call_interlinguish_triggers(verb, "interlinguish_", op, say)
            res2 = operation_method(op,say)
            if res:
                res += res2
            else:
                res = res2
            return res