Make settings change invoke on Temporary Mods.

This commit is contained in:
Ottermandias 2024-02-18 13:03:56 +01:00
parent 80ce6fe21f
commit 31bc5ec6f9
3 changed files with 7 additions and 1 deletions

@ -1 +1 @@
Subproject commit a28219ac57b53c3be6ca8c252ceb9f76ae0b6c21 Subproject commit 2b6bcf338794b34bcba2730c70dcbb73ce97311b

View file

@ -1,3 +1,4 @@
using Penumbra.Api.Enums;
using Penumbra.Collections; using Penumbra.Collections;
using Penumbra.Meta.Manipulations; using Penumbra.Meta.Manipulations;
using Penumbra.Mods; using Penumbra.Mods;
@ -84,11 +85,13 @@ public class TempModManager : IDisposable
{ {
Penumbra.Log.Verbose($"Removing temporary Mod {mod.Name} from {collection.AnonymizedName}."); Penumbra.Log.Verbose($"Removing temporary Mod {mod.Name} from {collection.AnonymizedName}.");
collection.Remove(mod); collection.Remove(mod);
_communicator.ModSettingChanged.Invoke(collection, ModSettingChange.TemporaryMod, null, 0, 0, false);
} }
else else
{ {
Penumbra.Log.Verbose($"Adding {(created ? "new " : string.Empty)}temporary Mod {mod.Name} to {collection.AnonymizedName}."); Penumbra.Log.Verbose($"Adding {(created ? "new " : string.Empty)}temporary Mod {mod.Name} to {collection.AnonymizedName}.");
collection.Apply(mod, created); collection.Apply(mod, created);
_communicator.ModSettingChanged.Invoke(collection, ModSettingChange.TemporaryMod, null, 1, 0, false);
} }
} }
else else

View file

@ -322,6 +322,9 @@ public class CollectionCacheManager : IDisposable
case ModSettingChange.MultiEnableState: case ModSettingChange.MultiEnableState:
FullRecalculation(collection); FullRecalculation(collection);
break; break;
case ModSettingChange.TemporaryMod:
// handled otherwise
break;
} }
} }