summaryrefslogtreecommitdiff
path: root/src/engine/mods/ModManager.cpp
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2025-12-22 22:48:07 +0100
committerGitHub <noreply@github.com>2025-12-22 14:48:07 -0700
commitce92773a602cca246c44dbec9fb87656fedfa323 (patch)
tree19bee63b1ae4ad566eaeb66d83f90257d6407fea /src/engine/mods/ModManager.cpp
parent31c2063a61feddb340a48beb7c0376b885c8ce00 (diff)
Clean ptr and fix (#610)
* use more unique ptr and fix a shell crash * remove useless mods folder * add even more unique_ptr * Update KoopaTroopaBeach.cpp * restore a throw * Update Game.cpp * automatically create mods folder * fix oob in external by assuming that all 8 player can make sound * better texture loading * add destructor for gameobject * avoid out of bound in audio sample * Update FrameInterpolation.cpp * Update torch
Diffstat (limited to 'src/engine/mods/ModManager.cpp')
-rw-r--r--src/engine/mods/ModManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/mods/ModManager.cpp b/src/engine/mods/ModManager.cpp
index 91fdbc0e9..a94d8f558 100644
--- a/src/engine/mods/ModManager.cpp
+++ b/src/engine/mods/ModManager.cpp
@@ -79,6 +79,12 @@ std::vector<std::string> ListMods() {
const std::string mods_path = Ship::Context::GetPathRelativeToAppDirectory("mods");
+ // Create mods folder if it doesn't exist
+ if (!std::filesystem::exists(mods_path)) {
+ std::filesystem::create_directories(mods_path);
+ SPDLOG_INFO("Created mods folder at: {}", mods_path);
+ }
+
if (std::filesystem::exists(mods_path) && std::filesystem::is_directory(mods_path)) {
for (const auto& p : std::filesystem::directory_iterator(mods_path)) {
auto ext = p.path().extension().string();