From 2a2437789db9953bef2902f0dfc715ef98ebcc2a Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sun, 29 Dec 2024 15:41:11 +0300 Subject: [PATCH] Merge only archives. --- UnleashedRecomp/mod/mod_loader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/mod/mod_loader.cpp b/UnleashedRecomp/mod/mod_loader.cpp index 08be468b..93a15531 100644 --- a/UnleashedRecomp/mod/mod_loader.cpp +++ b/UnleashedRecomp/mod/mod_loader.cpp @@ -43,9 +43,14 @@ std::filesystem::path ModLoader::RedirectPath(std::string_view path) std::replace(pathStr.begin(), pathStr.end(), '\\', '/'); std::filesystem::path fsPath(std::move(pathStr)); + bool canBeMerged = + path.find(".arl") == (path.size() - 4) || + path.find(".ar.") == (path.size() - 6) || + path.find(".ar") == (path.size() - 3); + for (auto& mod : g_mods) { - if (mod.type == ModType::UMM && mod.merge && !mod.readOnly.contains(fsPath)) + if (mod.type == ModType::UMM && mod.merge && canBeMerged && !mod.readOnly.contains(fsPath)) continue; for (auto& includeDir : mod.includeDirs)