Module dialogue_demo
[hide private]
[frames] | no frames]

Module dialogue_demo

source code

A very simple demonstration of the dialogue engine used for testing dialogue files.

Classes [hide private]
  MockPlayerCharacter
Mock object representing the player character.
  MockBeer
Mock object representing a 'beer' item.
  MockBox
Mock box object than can be opened or closed.
Functions [hide private]
 
selectDialogueFile(settings)
List all YAML dialogue files in the dialogue directory and prompt the user to select one for testing.
source code
 
chooseReply(dialogue_responses)
Prompt the user to choose a DialogueResponse from a list of valid responses.
source code
 
processDialogue(dialogue, game_state)
Process a Dialogue until the user selects a response that ends it.
source code
 
main() source code
Function Details [hide private]

chooseReply(dialogue_responses)

source code 

Prompt the user to choose a DialogueResponse from a list of valid responses.

Parameters:
  • dialogue_responses (list of DialogueResponses) - valid responses to choose from

processDialogue(dialogue, game_state)

source code 

Process a Dialogue until the user selects a response that ends it.

Parameters:
  • dialogue (Dialogue) - dialogue data to process.
  • game_state (dict of objects) - objects that should be made available for response conditional testing.