# HG changeset patch # User KarstenBock@gmx.net # Date 1315487848 -7200 # Node ID 8a7bb62f9f5dfae31fbb9074dddc85e9097dc40d # Parent 4934b62e0e48c3478796ec52c7536f1b1e2d7017 Added talk method to the base behaviour. diff -r 4934b62e0e48 -r 8a7bb62f9f5d src/parpg/behaviours/base.py --- a/src/parpg/behaviours/base.py Thu Sep 08 14:30:01 2011 +0200 +++ b/src/parpg/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