diff options
Diffstat (limited to 'NorthstarDLL/mods')
-rw-r--r-- | NorthstarDLL/mods/modmanager.cpp | 7 | ||||
-rw-r--r-- | NorthstarDLL/mods/modmanager.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp index 8ac9ac54..cdfe5384 100644 --- a/NorthstarDLL/mods/modmanager.cpp +++ b/NorthstarDLL/mods/modmanager.cpp @@ -56,6 +56,13 @@ Mod::Mod(fs::path modDir, char* jsonBuf) Name = modJson["Name"].GetString(); + // Don't load blacklisted mods + if (!strstr(GetCommandLineA(), "-nomodblacklist") && MODS_BLACKLIST.find(Name) != std::end(MODS_BLACKLIST)) + { + spdlog::warn("Skipping blacklisted mod \"{}\"!", Name); + return; + } + if (modJson.HasMember("Description")) Description = modJson["Description"].GetString(); else diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h index a4c72f77..c25c95ba 100644 --- a/NorthstarDLL/mods/modmanager.h +++ b/NorthstarDLL/mods/modmanager.h @@ -13,6 +13,8 @@ const std::string REMOTE_MOD_FOLDER_SUFFIX = "/runtime/remote/mods"; const fs::path MOD_OVERRIDE_DIR = "mod"; const std::string COMPILED_ASSETS_SUFFIX = "/runtime/compiled"; +const std::set<std::string> MODS_BLACKLIST = {"Mod Settings"}; + struct ModConVar { public: |