# HG changeset patch # User KarstenBock@gmx.net # Date 1315487848 -7200 # Node ID b4a525456c99186c6bec7eb7927ec08170a88468 # Parent 4f974711606160f3fa55243fd64c3816eeffea9a Added talk method to the base behaviour. diff -r 4f9747116061 -r b4a525456c99 behaviours/base.py --- a/behaviours/base.py Thu Sep 08 14:30:01 2011 +0200 +++ b/behaviours/base.py Thu Sep 08 15:17:28 2011 +0200 @@ -95,4 +95,18 @@ if(action.getId() != 'stand'): self.idle_counter = 1 else: - self.idle_counter += 1 \ No newline at end of file + self.idle_counter += 1 + + def getLocation(self): + """Get the agents position as a fife.Location object. + @rtype: fife.Location + @return: the location of the agent""" + return self.agent.getLocation() + + + def talk(self, pc): + """Makes the agent ready to talk to the PC + @return: None""" + self.state = _AGENT_STATE_TALK + self.pc = pc.behaviour.agent + self.idle() \ No newline at end of file