Working on save-load system and UI

This commit is contained in:
Vladislav Khorev committed 2026-06-20 21:41:07 +03:00
1 parent 901142385d
commit d7db0faea3
29 files changed
+708 -180

No files matched your search

+6 -1
View File
@@ -1,6 +1,8 @@
#pragma once
#include "quest/QuestTypes.h"
#include "ISaveable.h"
#include "external/nlohmann/json.hpp"
#include <string>
#include <unordered_map>
#include <vector>
@@ -8,10 +10,13 @@
namespace ZL::Quest {
class QuestJournal {
class QuestJournal : public ZL::ISaveable {
public:
bool loadFromFile(const std::string& path, const std::string& zipFile = "");
void save(nlohmann::json& out) const override;
void load(const nlohmann::json& in) override;
// Event callbacks — set by the owner (MenuManager) to receive notifications.
std::function<void(const std::string& questId)> onQuestUnlocked;
std::function<void(const std::string& questId)> onQuestCompleted;