Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | List of all members
core::ai::Conversation Class Reference

Wrapper around file::Conversation that tracks current node,. More...

#include <Conversation.hpp>

Public Member Functions

 Conversation (system::Systems &systems)
 Creates an empty conversation wrapper. More...
 
void setConversation (const file::Conversation &conversation, bl::ecs::Entity entity, bool talked)
 Sets the wrapper to point to the given underlying. The underlying must remain in scope during the lifetime of the wrapper. Sets current node to first waiting node. More...
 
const file::Conversation::NodecurrentNode () const
 Returns the current node. More...
 
bool finished () const
 Returns whether or not the conversation is finished. More...
 
void notifyNext ()
 Continues to the next node on player input. More...
 
void notifyCheckPassed ()
 Jumps to the node for a check pass (ie take item/money success etc) More...
 
void notifyCheckFailed ()
 Jumps to the node for a check pass (ie take item/money fail etc) More...
 
void notifyChoiceMade (const std::string &choice)
 Jumps to the node for the given choice if the current node is a Prompt. More...
 

Detailed Description

Wrapper around file::Conversation that tracks current node,.

Definition at line 28 of file Conversation.hpp.

Constructor & Destructor Documentation

◆ Conversation()

core::ai::Conversation::Conversation ( system::Systems systems)

Creates an empty conversation wrapper.

Parameters
systemsThe primary systems object

Definition at line 21 of file Conversation.cpp.

Member Function Documentation

◆ currentNode()

const file::Conversation::Node & core::ai::Conversation::currentNode ( ) const

Returns the current node.

Definition at line 36 of file Conversation.cpp.

◆ finished()

bool core::ai::Conversation::finished ( ) const

Returns whether or not the conversation is finished.

Definition at line 34 of file Conversation.cpp.

◆ notifyCheckFailed()

void core::ai::Conversation::notifyCheckFailed ( )

Jumps to the node for a check pass (ie take item/money fail etc)

Definition at line 56 of file Conversation.cpp.

◆ notifyCheckPassed()

void core::ai::Conversation::notifyCheckPassed ( )

Jumps to the node for a check pass (ie take item/money success etc)

Definition at line 49 of file Conversation.cpp.

◆ notifyChoiceMade()

void core::ai::Conversation::notifyChoiceMade ( const std::string &  choice)

Jumps to the node for the given choice if the current node is a Prompt.

Parameters
choiceThe choice that was made

Definition at line 63 of file Conversation.cpp.

◆ notifyNext()

void core::ai::Conversation::notifyNext ( )

Continues to the next node on player input.

Definition at line 42 of file Conversation.cpp.

◆ setConversation()

void core::ai::Conversation::setConversation ( const file::Conversation conversation,
bl::ecs::Entity  entity,
bool  talked 
)

Sets the wrapper to point to the given underlying. The underlying must remain in scope during the lifetime of the wrapper. Sets current node to first waiting node.

Parameters
conversationThe conversation to wrap
entityThe entity being conversed with
talkedWhether or not this entity has already been talked to

Definition at line 26 of file Conversation.cpp.


The documentation for this class was generated from the following files: