diff src/parpg/gui/dialoguegui.py @ 78:c25c734bd2a7

Modifications to make talking with npcs possible again. Special actions won't work yet though.
author KarstenBock@gmx.net
date Thu, 08 Sep 2011 15:18:39 +0200
parents d60f1dab8469
children 2e307c4f78e3
line wrap: on
line diff
--- a/src/parpg/gui/dialoguegui.py	Thu Sep 08 15:17:28 2011 +0200
+++ b/src/parpg/gui/dialoguegui.py	Thu Sep 08 15:18:39 2011 +0200
@@ -49,13 +49,13 @@
         }
         self.dialogue_gui.mapEvents(events)
         self.dialogue_gui.show()
-        self.setNpcName(self.npc.name)
-        self.setAvatarImage(self.npc.dialogue.avatar_path)
+        self.setNpcName(self.npc.description.view_name)
+        self.setAvatarImage(self.npc.dialogue.dialogue.avatar_path)
         
         game_state = {'npc': self.npc, 'pc': self.player_character,
                       'quest': self.quest_engine}
         try:
-            self.dialogue_processor = DialogueProcessor(self.npc.dialogue,
+            self.dialogue_processor = DialogueProcessor(self.npc.dialogue.dialogue,
                                                         game_state)
             self.dialogue_processor.initiateDialogue()
         except (TypeError) as error:
@@ -106,8 +106,8 @@
            GUI or from within the conversation itself."""
         self.dialogue_gui.hide()
         self.responses = []
-        self.npc.behaviour.state = 1
-        self.npc.behaviour.idle()
+        self.npc.fifeagent.behaviour.state = 1
+        self.npc.fifeagent.behaviour.idle()
         self.active = False
     
     def setNpcName(self, name):