diff src/parpg/gui/dialoguegui.py @ 86:2e307c4f78e3

DialogueGUI now acceps met_fnc and meet_fnc in its constructor and stores them in its game_state as "met" and "meet" respectively.
author KarstenBock@gmx.net
date Fri, 09 Sep 2011 16:12:46 +0200
parents c25c734bd2a7
children 5feab6555bf9
line wrap: on
line diff
--- a/src/parpg/gui/dialoguegui.py	Fri Sep 09 15:47:43 2011 +0200
+++ b/src/parpg/gui/dialoguegui.py	Fri Sep 09 16:12:46 2011 +0200
@@ -27,7 +27,7 @@
     """Window that handles the dialogues."""
     _logger = logging.getLogger('dialoguegui.DialogueGUI')
     
-    def __init__(self, controller, npc, quest_engine, player_character):
+    def __init__(self, controller, npc, quest_engine, met_fnc, meet_fnc, player_character):
         self.active = False
         self.controller = controller
         xml_file = vfs.VFS.open('gui/dialogue.xml')
@@ -38,6 +38,8 @@
         #     handling.
         self.quest_engine = quest_engine
         self.player_character = player_character
+        self.met_fnc = met_fnc
+        self.meet_fnc = meet_fnc
     
     def initiateDialogue(self):
         """Callback for starting a quest"""
@@ -53,7 +55,7 @@
         self.setAvatarImage(self.npc.dialogue.dialogue.avatar_path)
         
         game_state = {'npc': self.npc, 'pc': self.player_character,
-                      'quest': self.quest_engine}
+                      'quest': self.quest_engine, 'met': self.met_fnc, 'meet': self.meet_fnc}
         try:
             self.dialogue_processor = DialogueProcessor(self.npc.dialogue.dialogue,
                                                         game_state)