From ce92773a602cca246c44dbec9fb87656fedfa323 Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Mon, 22 Dec 2025 22:48:07 +0100 Subject: 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 --- src/engine/mods/ModManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/engine/mods/ModManager.cpp') 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 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(); -- cgit v1.2.3