Working on quest system
This commit is contained in:
1 parent
aaae368a07
commit
e7ae148ead
22 files changed
+357
-103
No files matched your search
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "dialogue/DialogueDatabase.h"
|
||||
#include "quest/QuestJournal.h"
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
@@ -42,6 +43,8 @@ public:
|
||||
void setFlag(const std::string& name, int value);
|
||||
int getFlag(const std::string& name) const;
|
||||
|
||||
void setQuestJournal(Quest::QuestJournal* journal);
|
||||
|
||||
json buildSaveState() const;
|
||||
bool restoreSaveState(const json& state);
|
||||
|
||||
@@ -62,6 +65,7 @@ private:
|
||||
bool fadeInCallbackFired = false;
|
||||
|
||||
const DialogueDatabase* database = nullptr;
|
||||
Quest::QuestJournal* questJournal = nullptr;
|
||||
const DialogueDefinition* activeDialogue = nullptr;
|
||||
const StaticCutsceneDefinition* activeCutscene = nullptr;
|
||||
|
||||
@@ -89,6 +93,9 @@ private:
|
||||
|
||||
bool evaluateConditions(const std::vector<Condition>& conditions) const;
|
||||
void applyEffects(const std::vector<Effect>& effects);
|
||||
void applyQuestActions(const std::string& questUnlock, const std::string& questComplete,
|
||||
const std::string& questFail, const std::string& objectiveComplete,
|
||||
const std::string& objectiveVisible);
|
||||
|
||||
bool enterNode(const std::string& nodeId);
|
||||
void presentLine(const Node& node);
|
||||
|
||||
Reference in new issue
Block a user