diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
commit | 9a3e1ec2daf753106ee95d53719d94921d3b051f (patch) | |
tree | 954d8b75530d66c15fcfcf153a3a4f351e49ef8e /NorthstarDedicatedTest/modmanager.cpp | |
parent | 4d0e4679d05b146e5e43a1a707708c6451099c54 (diff) | |
download | NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.tar.gz NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.zip |
add mod localisation, say command and more masterserver stuff
Diffstat (limited to 'NorthstarDedicatedTest/modmanager.cpp')
-rw-r--r-- | NorthstarDedicatedTest/modmanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/modmanager.cpp b/NorthstarDedicatedTest/modmanager.cpp index 342736e6..dedbbbc8 100644 --- a/NorthstarDedicatedTest/modmanager.cpp +++ b/NorthstarDedicatedTest/modmanager.cpp @@ -163,6 +163,17 @@ Mod::Mod(fs::path modDir, char* jsonBuf) } } + if (modJson.HasMember("Localisation") && modJson["Localisation"].IsArray()) + { + for (auto& localisationStr : modJson["Localisation"].GetArray()) + { + if (!localisationStr.IsString()) + continue; + + LocalisationFiles.push_back(localisationStr.GetString()); + } + } + wasReadSuccessfully = true; } @@ -237,6 +248,7 @@ void ModManager::LoadMods() if (fs::is_regular_file(file) && file.path().extension() == "vpk") mod->Vpks.push_back(file.path().string()); + // read keyvalues paths if (fs::exists(mod->ModDirectory / "keyvalues")) { for (fs::directory_entry file : fs::recursive_directory_iterator(mod->ModDirectory / "keyvalues")) |