QuestWeaver
A procedural quest generator
weave::QuestTickResult Class Reference

Event generated by a quest when ticked by the game. More...

#include <Quest.h>

Public Member Functions

 QuestTickResult (ID questId) noexcept
 Creates a new empty tick result, meaning that nothing has changed. More...
 
 QuestTickResult (ID questId, std::vector< WorldModelAction > worldChanges) noexcept
 Creates a new tick result containing the given changes to the world model. More...
 
 QuestTickResult (QuestModelAction questChanges) noexcept
 Creates a new tick result containing the given change to the quest model. More...
 
 QuestTickResult (std::vector< WorldModelAction > worldChanges, QuestModelAction questChanges) noexcept
 Creates a new tick result containing the given changes to the world and quest models. More...
 
QuestModelAction GetQuestChange () const noexcept
 Returns the change the quest wants to execute in the quest model. More...
 
std::vector< WorldModelActionGetWorldChanges () const noexcept
 Returns the changes the quest wants to execute in the world model. More...
 

Detailed Description

Event generated by a quest when ticked by the game.

This allows the quest to submit changes to the quest model (e.g. change the quest state to FAILED) or to the world model (e.g. create a new world entity).

Definition at line 60 of file Quest.h.

Constructor & Destructor Documentation

weave::QuestTickResult::QuestTickResult ( ID  questId)
noexcept

Creates a new empty tick result, meaning that nothing has changed.

weave::QuestTickResult::QuestTickResult ( ID  questId,
std::vector< WorldModelAction worldChanges 
)
explicitnoexcept

Creates a new tick result containing the given changes to the world model.

weave::QuestTickResult::QuestTickResult ( QuestModelAction  questChanges)
explicitnoexcept

Creates a new tick result containing the given change to the quest model.

weave::QuestTickResult::QuestTickResult ( std::vector< WorldModelAction worldChanges,
QuestModelAction  questChanges 
)
noexcept

Creates a new tick result containing the given changes to the world and quest models.

Member Function Documentation

QuestModelAction weave::QuestTickResult::GetQuestChange ( ) const
noexcept

Returns the change the quest wants to execute in the quest model.

std::vector<WorldModelAction> weave::QuestTickResult::GetWorldChanges ( ) const
noexcept

Returns the changes the quest wants to execute in the world model.


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