mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Rework ResolveData.
This commit is contained in:
parent
75182d094b
commit
d12a3dd152
14 changed files with 199 additions and 170 deletions
|
|
@ -67,12 +67,12 @@ public class PenumbraApi : IDisposable, IPenumbraApi
|
|||
}
|
||||
|
||||
Penumbra.CollectionManager.CollectionChanged += SubscribeToNewCollections;
|
||||
Penumbra.ResourceLoader.ResourceLoaded += OnResourceLoaded;
|
||||
Penumbra.ResourceLoader.ResourceLoaded += OnResourceLoaded;
|
||||
}
|
||||
|
||||
public unsafe void Dispose()
|
||||
{
|
||||
Penumbra.ResourceLoader.ResourceLoaded -= OnResourceLoaded;
|
||||
Penumbra.ResourceLoader.ResourceLoaded -= OnResourceLoaded;
|
||||
Penumbra.CollectionManager.CollectionChanged -= SubscribeToNewCollections;
|
||||
_penumbra = null;
|
||||
_lumina = null;
|
||||
|
|
@ -93,10 +93,11 @@ public class PenumbraApi : IDisposable, IPenumbraApi
|
|||
return Penumbra.Config.ModDirectory;
|
||||
}
|
||||
|
||||
private unsafe void OnResourceLoaded( ResourceHandle* handle, Utf8GamePath originalPath, FullPath? manipulatedPath, LinkedModCollection? resolveData )
|
||||
private unsafe void OnResourceLoaded( ResourceHandle* _, Utf8GamePath originalPath, FullPath? manipulatedPath,
|
||||
ResolveData resolveData )
|
||||
{
|
||||
if( resolveData == null ) return;
|
||||
GameObjectResourceResolved?.Invoke( resolveData.AssociatedGameObject, originalPath.ToString(), manipulatedPath?.ToString() ?? originalPath.ToString() );
|
||||
GameObjectResourceResolved?.Invoke( resolveData.AssociatedGameObject, originalPath.ToString(),
|
||||
manipulatedPath?.ToString() ?? originalPath.ToString() );
|
||||
}
|
||||
|
||||
public event Action< string, bool >? ModDirectoryChanged
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue