1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

add persistent storage & completed campaign support

This commit is contained in:
Laserlicht
2023-09-20 22:18:53 +02:00
committed by GitHub
parent 52b86eb9c1
commit dfb5ccbeaf
5 changed files with 29 additions and 8 deletions

View File

@ -35,6 +35,9 @@ class DLL_LINKAGE SettingsStorage
std::set<SettingsListener*> listeners;
JsonNode config;
bool persistentStorage;
std::string cfgName;
JsonNode & getNode(const std::vector<std::string> & path);
// Calls all required listeners
@ -45,7 +48,7 @@ class DLL_LINKAGE SettingsStorage
public:
// Initialize config structure
SettingsStorage();
void init();
void init(bool persistent = false);
// Get write access to config node at path
const NodeAccessor<Settings> write;
@ -113,5 +116,6 @@ public:
};
extern DLL_LINKAGE SettingsStorage settings;
extern DLL_LINKAGE SettingsStorage persistent;
VCMI_LIB_NAMESPACE_END