Mercurial > parpg-source
comparison gui/hud.py @ 80:d0b600d7136c
Added pc_has and npc_has as functions to the dialogue engine. These replace calls to pc.has_item and ncp.has_item.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 23 Sep 2011 14:11:49 +0200 |
parents | 535801aec63e |
children | 100a39fa64a2 |
comparison
equal
deleted
inserted
replaced
79:e719bf53c25a | 80:d0b600d7136c |
---|---|
26 from parpg.gui.containergui import ContainerGUI | 26 from parpg.gui.containergui import ContainerGUI |
27 from parpg.gui.dialoguegui import DialogueGUI | 27 from parpg.gui.dialoguegui import DialogueGUI |
28 from parpg.gui import drag_drop_data as data_drag | 28 from parpg.gui import drag_drop_data as data_drag |
29 from parpg.gui.inventorygui import InventoryGUI | 29 from parpg.gui.inventorygui import InventoryGUI |
30 from actionsbox import ActionsBox | 30 from actionsbox import ActionsBox |
31 | 31 from parpg.components import container |
32 logger = logging.getLogger('hud') | 32 logger = logging.getLogger('hud') |
33 class Hud(object): | 33 class Hud(object): |
34 """Main Hud class""" | 34 """Main Hud class""" |
35 def __init__(self, controller, settings, callbacks): | 35 def __init__(self, controller, settings, callbacks): |
36 """Initialise the instance. | 36 """Initialise the instance. |
507 dialogue = DialogueGUI( | 507 dialogue = DialogueGUI( |
508 self.controller, | 508 self.controller, |
509 npc, | 509 npc, |
510 self.model.game_state.quest_engine, | 510 self.model.game_state.quest_engine, |
511 self.model.game_state.met, self.model.game_state.meet, | 511 self.model.game_state.met, self.model.game_state.meet, |
512 container.get_item, | |
512 self.model.game_state.getObjectById("PlayerCharacter")) | 513 self.model.game_state.getObjectById("PlayerCharacter")) |
513 return dialogue | 514 return dialogue |