mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Expand and name vfxWeaponHook to deal with more files.
This commit is contained in:
parent
5d96f789fe
commit
c86d2eded5
4 changed files with 32 additions and 21 deletions
|
|
@ -205,7 +205,7 @@ public class CollectionEditor
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
private void InvokeChange(ModCollection changedCollection, ModSettingChange type, Mod? mod, int oldValue, int groupIdx)
|
||||
{
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, changedCollection));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, changedCollection));
|
||||
_communicator.ModSettingChanged.Invoke(changedCollection, type, mod, oldValue, groupIdx, false);
|
||||
RecurseInheritors(changedCollection, type, mod, oldValue, groupIdx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,14 +194,14 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
var any = collection.UnusedSettings.Count > 0;
|
||||
((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings).Clear();
|
||||
if (any)
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, collection));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
|
||||
/// <summary> Remove a specific setting for not currently-installed mods from the given collection. </summary>
|
||||
public void CleanUnavailableSetting(ModCollection collection, string? setting)
|
||||
{
|
||||
if (setting != null && ((Dictionary<string, ModSettings.SavedSettings>)collection.UnusedSettings).Remove(setting))
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, collection));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -304,7 +304,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
break;
|
||||
case ModPathChangeType.Moved:
|
||||
foreach (var collection in this.Where(collection => collection.Settings[mod.Index] != null))
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, collection));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
foreach (var collection in this)
|
||||
{
|
||||
if (collection.Settings[mod.Index]?.HandleChanges(type, mod, groupIdx, optionIdx, movedToIdx) ?? false)
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, collection));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, collection));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class InheritanceManager : IDisposable
|
|||
var parent = inheritor.DirectlyInheritsFrom[idx];
|
||||
((List<ModCollection>)inheritor.DirectlyInheritsFrom).RemoveAt(idx);
|
||||
((List<ModCollection>)parent.DirectParentOf).Remove(inheritor);
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_communicator.CollectionInheritanceChanged.Invoke(inheritor, false);
|
||||
RecurseInheritanceChanges(inheritor);
|
||||
Penumbra.Log.Debug($"Removed {parent.AnonymizedName} from {inheritor.AnonymizedName} inheritances.");
|
||||
|
|
@ -100,7 +100,7 @@ public class InheritanceManager : IDisposable
|
|||
if (!((List<ModCollection>)inheritor.DirectlyInheritsFrom).Move(from, to))
|
||||
return;
|
||||
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_communicator.CollectionInheritanceChanged.Invoke(inheritor, false);
|
||||
RecurseInheritanceChanges(inheritor);
|
||||
Penumbra.Log.Debug($"Moved {inheritor.AnonymizedName}s inheritance {from} to {to}.");
|
||||
|
|
@ -116,7 +116,7 @@ public class InheritanceManager : IDisposable
|
|||
((List<ModCollection>)parent.DirectParentOf).Add(inheritor);
|
||||
if (invokeEvent)
|
||||
{
|
||||
_saveService.DelaySave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_saveService.QueueSave(new ModCollectionSave(_modStorage, inheritor));
|
||||
_communicator.CollectionInheritanceChanged.Invoke(inheritor, false);
|
||||
RecurseInheritanceChanges(inheritor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue