aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/modmanager.h
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-02 03:20:10 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-02 03:20:10 +0100
commiteb56fcbe02f35ed4f418a7dc53cd9eb0ad95a504 (patch)
tree352923d1b6735502a71f4202e542af7ab84b3946 /NorthstarDedicatedTest/modmanager.h
parent30e67549449a0ffbb58f7fc736bdd9e4ce7ec9d5 (diff)
downloadNorthstarLauncher-eb56fcbe02f35ed4f418a7dc53cd9eb0ad95a504.tar.gz
NorthstarLauncher-eb56fcbe02f35ed4f418a7dc53cd9eb0ad95a504.zip
add dynamic keyvalue building, client serverbrowser stuff
Diffstat (limited to 'NorthstarDedicatedTest/modmanager.h')
-rw-r--r--NorthstarDedicatedTest/modmanager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/modmanager.h b/NorthstarDedicatedTest/modmanager.h
index 6146de0a..ad5e74ff 100644
--- a/NorthstarDedicatedTest/modmanager.h
+++ b/NorthstarDedicatedTest/modmanager.h
@@ -1,4 +1,5 @@
#pragma once
+#include "convar.h"
#include <string>
#include <vector>
#include <filesystem>
@@ -45,7 +46,9 @@ public:
class Mod
{
public:
+ // runtime stuff
fs::path ModDirectory;
+ bool Enabled = true;
// mod.json stuff:
@@ -71,7 +74,8 @@ public:
// other files:
std::vector<std::string> Vpks;
- //std::vector<ModKeyValues*> KeyValues;
+ std::vector<std::string> KeyValues;
+ std::vector<size_t> KeyValuesHash; // size_t because we hash these filesnames: faster than string comp
// other stuff
@@ -92,16 +96,17 @@ class ModManager
{
public:
std::vector<Mod*> m_loadedMods;
- //std::vector<ModOverrideFile*> m_modFiles;
std::unordered_map<std::string, ModOverrideFile*> m_modFiles;
public:
ModManager();
void LoadMods();
+ void UnloadMods();
void CompileAssetsForFile(const char* filename);
// compile asset type stuff, these are done in files under Mods/Compiled/
void BuildScriptsRson();
+ void TryBuildKeyValues(const char* filename);
};
void InitialiseModManager(HMODULE baseAddress);