Rework ResolveData.

This commit is contained in:
Ottermandias 2022-09-05 13:30:07 +02:00
parent 75182d094b
commit d12a3dd152
14 changed files with 199 additions and 170 deletions

View file

@ -117,9 +117,9 @@ public unsafe partial class ResourceLoader : IDisposable
// Event fired whenever a resource is returned.
// If the path was manipulated by penumbra, manipulatedPath will be the file path of the loaded resource.
// resolveData is additional data returned by the current ResolvePath function and is user-defined.
// resolveData is additional data returned by the current ResolvePath function which can contain the collection and associated game object.
public delegate void ResourceLoadedDelegate( ResourceHandle* handle, Utf8GamePath originalPath, FullPath? manipulatedPath,
LinkedModCollection? resolveData );
ResolveData resolveData );
public event ResourceLoadedDelegate? ResourceLoaded;
@ -134,7 +134,7 @@ public unsafe partial class ResourceLoader : IDisposable
// Resolving goes through all subscribed functions in arbitrary order until one returns true,
// or uses default resolving if none return true.
public delegate bool ResolvePathDelegate( Utf8GamePath path, ResourceCategory category, ResourceType type, int hash,
out (FullPath?, LinkedModCollection?) ret );
out (FullPath?, ResolveData) ret );
public event ResolvePathDelegate? ResolvePathCustomization;