diff gui/dialoguegui.py @ 51:d3a9caba067b

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 06145a6ee387
children 535801aec63e
line wrap: on
line diff
--- a/gui/dialoguegui.py	Thu Sep 08 15:17:28 2011 +0200
+++ b/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):