Ignore:
Timestamp:
01/08/11 01:41:53 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Added support for dynamic/conditional dialogue roots;
  • Updated the Dialogue class to hold RootDialogueSections?, which are

DialogueSections? with a conditional statement used to select them as
the root section of dialogue;

as a "default_root_section" attribute, which is used as the default
root of the dialogue;

  • Moved the getRootSection method from the Dialogue class to the

DialogueParser? class as getRootDialogueSection and updated it to
evaluate the RootDialogueSection? conditionals;

syntax;

  • Updated the YAML dialogue files with the new syntax;
  • Updated the test_dialogueprocessor.py unittests;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/dialogue/leader.yaml

    r686 r698  
    1616NPC_NAME: Kimmo Niitty 
    1717AVATAR_PATH: gui/portraits/leader.png 
    18 START_SECTION: main_dialog 
    19 SECTIONS: 
    20 -   ID: main_dialog 
     18DEFAULT_ROOT_SECTION: 
     19    ID: main_dialog 
    2120    SAY: "What do you want?" 
    2221    ACTIONS: 
     
    6665        GOTO: end 
    6766         
     67SECTIONS: 
    6868-   ID: help_alcohol 
    6969    SAY: "Well, if you've got enough to pay him, Jacob can set you up, over at\ 
Note: See TracChangeset for help on using the changeset viewer.