Changeset 673


Ignore:
Timestamp:
11/18/10 18:58:02 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Fixed a bug that caused NPCs to attempt to give the player an invalid list of items named with a single letter instead of the correctly named item (e.g. 'Y', 'e', 'a', 's', 't' instead of 'Yeast') in a dialogue.
  • Fixed a bug in the dialogue_demo.py script that caused it to crash with an AttributeError? when a dialogue was loaded.
Location:
trunk/game
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/dialogue_demo.py

    r672 r673  
    9999    quest = QuestEngine('quests') 
    100100    beer = Beer() 
    101  
     101     
     102    parser = YamlDialogueParser() 
    102103    with file(dialogue_filepath, 'r') as dialogue_file: 
    103         dialogue = YamlDialogueParser.parse(dialogue_file) 
     104        dialogue = parser.load(dialogue_file) 
    104105     
    105106    game_state = { 
     
    111112 
    112113    DialogueEngine.initiateDialogue(dialogue, game_state) 
    113     npc_name = dialogue.npc_id 
     114    npc_name = dialogue.npc_name 
    114115    while DialogueEngine.in_dialogue: 
    115116        responses = DialogueEngine.continueDialogue() 
  • trunk/game/scripts/dialogueactions.py

    r668 r673  
    100100           @param kwargs: dictionary of keyword arguments""" 
    101101        DialogueAction.__init__(self, *args, **kwargs) 
    102         self.item_types = args[0] 
     102        self.item_types = args 
    103103 
    104104 
  • trunk/game/scripts/dialogueparsers.py

    r669 r673  
    1414#   You should have received a copy of the GNU General Public License 
    1515#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>. 
    16 """Contains classes for parsing and validating @ref Dialogue "Dialogues" and 
     16"""Contains classes for parsing and validating L{Dialogue} "Dialogues" and 
    1717   other dialogue-related data. 
    1818 
Note: See TracChangeset for help on using the changeset viewer.