aboutsummaryrefslogtreecommitdiff
path: root/primedev/mods/modmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'primedev/mods/modmanager.cpp')
-rw-r--r--primedev/mods/modmanager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/primedev/mods/modmanager.cpp b/primedev/mods/modmanager.cpp
index b2a7e713..90f54449 100644
--- a/primedev/mods/modmanager.cpp
+++ b/primedev/mods/modmanager.cpp
@@ -616,6 +616,7 @@ void ModManager::LoadMods()
// ensure dirs exist
fs::remove_all(GetCompiledAssetsPath());
fs::create_directories(GetCoreModFolderPath());
+ fs::create_directories(GetManualModFolderPath());
fs::create_directories(GetThunderstoreLegacyModFolderPath());
fs::create_directories(GetRemoteModFolderPath());
@@ -639,6 +640,7 @@ void ModManager::LoadMods()
// get mod directories
std::filesystem::directory_iterator coreModsDir = fs::directory_iterator(GetCoreModFolderPath());
+ std::filesystem::directory_iterator manualModsDir = fs::directory_iterator(GetManualModFolderPath());
std::filesystem::directory_iterator remoteModsDir = fs::directory_iterator(GetRemoteModFolderPath());
std::filesystem::directory_iterator thunderstoreModsDir = fs::directory_iterator(GetThunderstoreLegacyModFolderPath());
@@ -646,6 +648,10 @@ void ModManager::LoadMods()
if (fs::exists(dir.path() / "mod.json"))
modDirs.push_back(dir.path());
+ for (fs::directory_entry dir : manualModsDir)
+ if (fs::exists(dir.path() / "mod.json"))
+ modDirs.push_back(dir.path());
+
// Special case for Thunderstore and remote mods directories
// Set up regex for `AUTHOR-MOD-VERSION` pattern
std::regex pattern(R"(.*\\([a-zA-Z0-9_]+)-([a-zA-Z0-9_]+)-(\d+\.\d+\.\d+))");
@@ -1131,6 +1137,10 @@ fs::path GetCoreModFolderPath()
{
return fs::path(GetNorthstarPrefix() + CORE_MOD_FOLDER_SUFFIX);
}
+fs::path GetManualModFolderPath()
+{
+ return fs::path(GetNorthstarPrefix() + MANUAL_MOD_FOLDER_SUFFIX);
+}
fs::path GetThunderstoreLegacyModFolderPath()
{
return fs::path(GetNorthstarPrefix() + THUNDERSTORE_MOD_FOLDER_SUFFIX);