From bbbf65eb4c0c9d8dd77ac8f8101ad2ac86433c1c Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Thu, 9 May 2024 15:49:49 +0200 Subject: [PATCH] Fix bug preventing deduplication. --- Penumbra/Mods/Editor/DuplicateManager.cs | 3 +++ Penumbra/Mods/Groups/ModSaveGroup.cs | 2 +- Penumbra/UI/Classes/CollectionSelectHeader.cs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Penumbra/Mods/Editor/DuplicateManager.cs b/Penumbra/Mods/Editor/DuplicateManager.cs index 84a832a2..2e6dc1d6 100644 --- a/Penumbra/Mods/Editor/DuplicateManager.cs +++ b/Penumbra/Mods/Editor/DuplicateManager.cs @@ -84,7 +84,10 @@ public class DuplicateManager(ModManager modManager, SaveService saveService, Co if (useModManager) modManager.OptionEditor.SetFiles(subMod, dict, SaveType.ImmediateSync); else + { + subMod.Files = dict; saveService.ImmediateSaveSync(new ModSaveGroup(mod.ModPath, subMod, config.ReplaceNonAsciiOnImport)); + } } } diff --git a/Penumbra/Mods/Groups/ModSaveGroup.cs b/Penumbra/Mods/Groups/ModSaveGroup.cs index ed3c8857..7efc76a6 100644 --- a/Penumbra/Mods/Groups/ModSaveGroup.cs +++ b/Penumbra/Mods/Groups/ModSaveGroup.cs @@ -40,7 +40,7 @@ public readonly struct ModSaveGroup : ISavable _basePath = basePath; _defaultMod = container as DefaultSubMod; _onlyAscii = onlyAscii; - if (_defaultMod == null) + if (_defaultMod != null) { _groupIdx = -1; _group = null; diff --git a/Penumbra/UI/Classes/CollectionSelectHeader.cs b/Penumbra/UI/Classes/CollectionSelectHeader.cs index de2b6a34..bff0092a 100644 --- a/Penumbra/UI/Classes/CollectionSelectHeader.cs +++ b/Penumbra/UI/Classes/CollectionSelectHeader.cs @@ -89,7 +89,7 @@ public class CollectionSelectHeader var collection = _resolver.PlayerCollection(); return CheckCollection(collection) switch { - CollectionState.Empty => (collection, "None", "The base collection is configured to use no mods.", true), + CollectionState.Empty => (collection, "None", "The loaded player character is configured to use no mods.", true), CollectionState.Selected => (collection, collection.Name, "The collection configured to apply to the loaded player character is already selected as the current collection.", true), CollectionState.Available => (collection, collection.Name,