mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 05:43:42 +01:00
Add support for the DalamudSubstitutionProvider for textures.
This commit is contained in:
parent
cf3810a1b8
commit
04b76ddee1
10 changed files with 285 additions and 66 deletions
|
|
@ -17,6 +17,9 @@ public sealed class CollectionChange : EventWrapper<Action<CollectionType, ModCo
|
|||
{
|
||||
public enum Priority
|
||||
{
|
||||
/// <seealso cref="Api.DalamudSubstitutionProvider.OnCollectionChange"/>
|
||||
DalamudSubstitutionProvider = -3,
|
||||
|
||||
/// <seealso cref="Collections.Cache.CollectionCacheManager.OnCollectionChange"/>
|
||||
CollectionCacheManager = -2,
|
||||
|
||||
|
|
@ -43,6 +46,7 @@ public sealed class CollectionChange : EventWrapper<Action<CollectionType, ModCo
|
|||
|
||||
/// <seealso cref="UI.ModsTab.ModFileSystemSelector.OnCollectionChange"/>
|
||||
ModFileSystemSelector = 0,
|
||||
|
||||
}
|
||||
|
||||
public CollectionChange()
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ public sealed class EnabledChanged : EventWrapper<Action<bool>, EnabledChanged.P
|
|||
{
|
||||
/// <seealso cref="Ipc.EnabledChange"/>
|
||||
Api = int.MinValue,
|
||||
|
||||
/// <seealso cref="Api.DalamudSubstitutionProvider.OnEnabledChange"/>
|
||||
DalamudSubstitutionProvider = 0,
|
||||
}
|
||||
|
||||
public EnabledChanged()
|
||||
|
|
|
|||
43
Penumbra/Communication/ResolvedFileChanged.cs
Normal file
43
Penumbra/Communication/ResolvedFileChanged.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using OtterGui.Classes;
|
||||
using Penumbra.Collections;
|
||||
using Penumbra.Mods;
|
||||
using Penumbra.String.Classes;
|
||||
|
||||
namespace Penumbra.Communication;
|
||||
|
||||
/// <summary>
|
||||
/// Triggered whenever a redirection in a mod collection cache is manipulated.
|
||||
/// <list type="number">
|
||||
/// <item>Parameter is collection with a changed cache. </item>
|
||||
/// <item>Parameter is the type of change. </item>
|
||||
/// <item>Parameter is the game path to be redirected or empty for FullRecompute. </item>
|
||||
/// <item>Parameter is the new redirection path or empty for Removed or FullRecompute </item>
|
||||
/// <item>Parameter is the old redirection path for Replaced, or empty. </item>
|
||||
/// <item>Parameter is the mod responsible for the new redirection if any. </item>
|
||||
/// </list> </summary>
|
||||
public sealed class ResolvedFileChanged : EventWrapper<Action<ModCollection, ResolvedFileChanged.Type, Utf8GamePath, FullPath, FullPath, IMod?>,
|
||||
ResolvedFileChanged.Priority>
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
Added,
|
||||
Removed,
|
||||
Replaced,
|
||||
FullRecomputeStart,
|
||||
FullRecomputeFinished,
|
||||
}
|
||||
|
||||
public enum Priority
|
||||
{
|
||||
/// <seealso cref="Api.DalamudSubstitutionProvider.OnResolvedFileChanged"/>
|
||||
DalamudSubstitutionProvider = 0,
|
||||
}
|
||||
|
||||
public ResolvedFileChanged()
|
||||
: base(nameof(ResolvedFileChanged))
|
||||
{ }
|
||||
|
||||
public void Invoke(ModCollection collection, Type type, Utf8GamePath key, FullPath value, FullPath old, IMod? mod)
|
||||
=> Invoke(this, collection, type, key, value, old, mod);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue