mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* modsystem v2 initial commit * call CModSystem::Init * clean up custom cvar value handling * add mod script compiling support * add error check to script rson loading yes this error is a duplicate but this one exits the game * fix typo * fix compile error
33 lines
780 B
C++
33 lines
780 B
C++
#include "core/stdafx.h"
|
|
#include "localize/localize.h"
|
|
#include "pluginsystem/modsystem.h"
|
|
|
|
bool Localize_LoadLocalizationFileLists(CLocalize* thisptr)
|
|
{
|
|
v_CLocalize__LoadLocalizationFileLists(thisptr);
|
|
|
|
for (auto& mod : g_pModSystem->GetModList())
|
|
{
|
|
if (mod.m_iState == CModSystem::eModState::ENABLED)
|
|
{
|
|
for (auto& it : mod.m_vszLocalizationFiles)
|
|
{
|
|
v_CLocalize__AddFile(thisptr, it.c_str(), NULL);
|
|
}
|
|
}
|
|
}
|
|
|
|
DevMsg(eDLL_T::ENGINE, "Loaded localization files.\n");
|
|
|
|
return true;
|
|
}
|
|
|
|
void VLocalize::Attach() const
|
|
{
|
|
DetourAttach((LPVOID*)&v_CLocalize__LoadLocalizationFileLists, &Localize_LoadLocalizationFileLists);
|
|
}
|
|
|
|
void VLocalize::Detach() const
|
|
{
|
|
DetourDetach((LPVOID*)&v_CLocalize__LoadLocalizationFileLists, &Localize_LoadLocalizationFileLists);
|
|
} |