diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-07-05 00:19:18 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2024-07-05 00:19:18 +0200 |
commit | 1f0e8aaa4805db0298e5b6047b3c6628932a82fc (patch) | |
tree | 445e536e708455271e78a3a9efd46439b9ed3554 | |
parent | 3edcc91c72c96c33f8eae76a7078f78126bbea28 (diff) | |
download | NorthstarLauncher-1f0e8aaa4805db0298e5b6047b3c6628932a82fc.tar.gz NorthstarLauncher-1f0e8aaa4805db0298e5b6047b3c6628932a82fc.zip |
wip: Change paths to load core and thunderstore mods from
-rw-r--r-- | primedev/mods/modmanager.cpp | 6 | ||||
-rw-r--r-- | primedev/mods/modmanager.h | 6 | ||||
-rw-r--r-- | primedev/plugins/pluginmanager.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/primedev/mods/modmanager.cpp b/primedev/mods/modmanager.cpp index edf69c9f..38bf1dc7 100644 --- a/primedev/mods/modmanager.cpp +++ b/primedev/mods/modmanager.cpp @@ -616,7 +616,7 @@ void ModManager::LoadMods() // ensure dirs exist fs::remove_all(GetCompiledAssetsPath()); fs::create_directories(GetModFolderPath()); - fs::create_directories(GetThunderstoreModFolderPath()); + fs::create_directories(GetThunderstoreLegacyModFolderPath()); fs::create_directories(GetRemoteModFolderPath()); m_DependencyConstants.clear(); @@ -640,7 +640,7 @@ void ModManager::LoadMods() // get mod directories std::filesystem::directory_iterator classicModsDir = fs::directory_iterator(GetModFolderPath()); std::filesystem::directory_iterator remoteModsDir = fs::directory_iterator(GetRemoteModFolderPath()); - std::filesystem::directory_iterator thunderstoreModsDir = fs::directory_iterator(GetThunderstoreModFolderPath()); + std::filesystem::directory_iterator thunderstoreModsDir = fs::directory_iterator(GetThunderstoreLegacyModFolderPath()); for (fs::directory_entry dir : classicModsDir) if (fs::exists(dir.path() / "mod.json")) @@ -1131,7 +1131,7 @@ fs::path GetModFolderPath() { return fs::path(GetNorthstarPrefix() + MOD_FOLDER_SUFFIX); } -fs::path GetThunderstoreModFolderPath() +fs::path GetThunderstoreLegacyModFolderPath() { return fs::path(GetNorthstarPrefix() + THUNDERSTORE_MOD_FOLDER_SUFFIX); } diff --git a/primedev/mods/modmanager.h b/primedev/mods/modmanager.h index 233f004d..7500a3d5 100644 --- a/primedev/mods/modmanager.h +++ b/primedev/mods/modmanager.h @@ -9,8 +9,8 @@ #include <filesystem> #include <unordered_set> -const std::string MOD_FOLDER_SUFFIX = "\\mods"; -const std::string THUNDERSTORE_MOD_FOLDER_SUFFIX = "\\packages"; +const std::string MOD_FOLDER_SUFFIX = "\\mods\\core"; +const std::string THUNDERSTORE_MOD_FOLDER_SUFFIX = "\\mods\\thunderstore-legacy"; 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"; @@ -181,7 +181,7 @@ public: fs::path GetModFolderPath(); fs::path GetRemoteModFolderPath(); -fs::path GetThunderstoreModFolderPath(); +fs::path GetThunderstoreLegacyModFolderPath(); fs::path GetCompiledAssetsPath(); extern ModManager* g_pModManager; diff --git a/primedev/plugins/pluginmanager.cpp b/primedev/plugins/pluginmanager.cpp index 718e6956..1abd0def 100644 --- a/primedev/plugins/pluginmanager.cpp +++ b/primedev/plugins/pluginmanager.cpp @@ -58,7 +58,7 @@ bool PluginManager::LoadPlugins(bool reloaded) return false; } - fs::create_directories(GetThunderstoreModFolderPath()); + fs::create_directories(GetThunderstoreLegacyModFolderPath()); std::vector<fs::path> paths; @@ -71,7 +71,7 @@ bool PluginManager::LoadPlugins(bool reloaded) FindPlugins(pluginPath, paths); // Special case for Thunderstore mods dir - std::filesystem::directory_iterator thunderstoreModsDir = fs::directory_iterator(GetThunderstoreModFolderPath()); + std::filesystem::directory_iterator thunderstoreModsDir = fs::directory_iterator(GetThunderstoreLegacyModFolderPath()); // Set up regex for `AUTHOR-MOD-VERSION` pattern std::regex pattern(R"(.*\\([a-zA-Z0-9_]+)-([a-zA-Z0-9_]+)-(\d+\.\d+\.\d+))"); for (fs::directory_entry dir : thunderstoreModsDir) |