aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/modlocalisation.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-18 03:56:51 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-18 03:56:51 +0100
commit125f53aaa690e4870af88aa3a8947ac5ac0b435d (patch)
tree2ee0c9ec4abd9ad49850a8807b7afd5cc16dcddb /NorthstarDedicatedTest/modlocalisation.cpp
parentf63b853468225e2bc675cde9484a27acfe8548b5 (diff)
downloadNorthstarLauncher-125f53aaa690e4870af88aa3a8947ac5ac0b435d.tar.gz
NorthstarLauncher-125f53aaa690e4870af88aa3a8947ac5ac0b435d.zip
lots of launcher stuff
Diffstat (limited to 'NorthstarDedicatedTest/modlocalisation.cpp')
-rw-r--r--NorthstarDedicatedTest/modlocalisation.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/NorthstarDedicatedTest/modlocalisation.cpp b/NorthstarDedicatedTest/modlocalisation.cpp
index ccc06722..25c9e19f 100644
--- a/NorthstarDedicatedTest/modlocalisation.cpp
+++ b/NorthstarDedicatedTest/modlocalisation.cpp
@@ -3,14 +3,17 @@
#include "hookutils.h"
#include "modmanager.h"
-typedef char(*AddLocalisationFileType)(void* g_pVguiLocalize, const char* path, const char* pathId);
+typedef bool(*AddLocalisationFileType)(void* g_pVguiLocalize, const char* path, const char* pathId, char unknown);
AddLocalisationFileType AddLocalisationFile;
bool loadModLocalisationFiles = true;
-char AddLocalisationFileHook(void* g_pVguiLocalize, const char* path, char* pathId)
+bool AddLocalisationFileHook(void* g_pVguiLocalize, const char* path, const char* pathId, char unknown)
{
- char ret = AddLocalisationFile(g_pVguiLocalize, path, pathId);
+ bool ret = AddLocalisationFile(g_pVguiLocalize, path, pathId, unknown);
+
+ if (ret)
+ spdlog::info("Loaded localisation file {} successfully", path);
if (!loadModLocalisationFiles)
return ret;
@@ -18,13 +21,8 @@ char AddLocalisationFileHook(void* g_pVguiLocalize, const char* path, char* path
loadModLocalisationFiles = false;
for (Mod* mod : g_ModManager->m_loadedMods)
- {
for (std::string& localisationFile : mod->LocalisationFiles)
- {
- spdlog::info("Adding mod localisation file {}", localisationFile);
- AddLocalisationFile(g_pVguiLocalize, localisationFile.c_str(), pathId);
- }
- }
+ AddLocalisationFile(g_pVguiLocalize, localisationFile.c_str(), pathId, unknown);
loadModLocalisationFiles = true;