Make CopySettings save even for unused settings.

This commit is contained in:
Ottermandias 2024-01-20 13:12:08 +01:00
parent 8c763d5379
commit c752835d2c
3 changed files with 9 additions and 5 deletions

View file

@ -156,9 +156,14 @@ public class CollectionEditor
// Either copy the unused source settings directly if they are not inheriting,
// or remove any unused settings for the target if they are inheriting.
if (savedSettings != null)
{
((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings)[targetName] = savedSettings.Value;
else
((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings).Remove(targetName);
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
}
else if (((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings).Remove(targetName))
{
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
}
}
return true;

View file

@ -10,10 +10,10 @@ public sealed unsafe class CharacterBaseDestructor : EventWrapperPtr<CharacterBa
{
public enum Priority
{
/// <seealso cref="PathResolving.DrawObjectState"/>
/// <seealso cref="PathResolving.DrawObjectState.OnCharacterBaseDestructor"/>
DrawObjectState = 0,
/// <seealso cref="ModEditWindow.MtrlTab"/>
/// <seealso cref="ModEditWindow.MtrlTab.UnbindFromDrawObjectMaterialInstances"/>
MtrlTab = -1000,
}

View file

@ -3,7 +3,6 @@ using FFXIVClientStructs.FFXIV.Client.Game.Character;
using FFXIVClientStructs.FFXIV.Client.Game.Object;
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
using OtterGui.Services;
using Penumbra.Interop.Hooks;
using Object = FFXIVClientStructs.FFXIV.Client.Graphics.Scene.Object;
using Penumbra.GameData.Structs;
using Penumbra.Interop.Hooks.Objects;