From 125f53aaa690e4870af88aa3a8947ac5ac0b435d Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 18 Aug 2021 03:56:51 +0100 Subject: lots of launcher stuff --- NorthstarDedicatedTest/modlocalisation.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'NorthstarDedicatedTest/modlocalisation.cpp') 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; -- cgit v1.2.3