QuestWeaver
A procedural quest generator
weave::TemplateQuestDescription Class Reference

Wraps the quest description texts for the QuestTemplate. More...

#include <QuestTemplate.h>

Public Member Functions

 TemplateQuestDescription (const std::vector< std::string > &conditions, const std::string &text) noexcept
 Creates a new description that is valid for the given conditions. More...
 
std::string GetText (FormatterType format) const noexcept
 Returns the description text containing placeholders for the corresponding QuestPropertyValue. More...
 
bool SupportsConditions (const std::vector< std::string > &conditions) const noexcept
 Returns true if this description text can be constructed under the given conditions. More...
 

Detailed Description

Wraps the quest description texts for the QuestTemplate.

Contains a text from the template files and the required conditions for the text to appear.

Definition at line 39 of file QuestTemplate.h.

Constructor & Destructor Documentation

weave::TemplateQuestDescription::TemplateQuestDescription ( const std::vector< std::string > &  conditions,
const std::string &  text 
)
noexcept

Creates a new description that is valid for the given conditions.

Parameters
conditionsThe names of the TemplateQuestProperty values required for the description to be used.
textthe description text containing placeholders for the conditions. A placeholder is a string with a leading %-sign. When the quest is created, each placeholder will be substituted with the corresponding QuestPropertyValue.

Member Function Documentation

std::string weave::TemplateQuestDescription::GetText ( FormatterType  format) const
noexcept

Returns the description text containing placeholders for the corresponding QuestPropertyValue.

bool weave::TemplateQuestDescription::SupportsConditions ( const std::vector< std::string > &  conditions) const
noexcept

Returns true if this description text can be constructed under the given conditions.

Parameters
conditionsthe sorted list of conditions.

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