add LinkedModCollection to be able to retrospectively verify which gamepath was resolved for which game object

This commit is contained in:
Stanley Dimant 2022-09-03 16:09:31 +02:00 committed by Ottermandias
parent 07af64feed
commit dcdc6d1be1
16 changed files with 151 additions and 79 deletions

View file

@ -9,6 +9,7 @@ using Dalamud.Hooking;
using Dalamud.Logging;
using Dalamud.Utility.Signatures;
using FFXIVClientStructs.FFXIV.Client.System.Resource;
using Penumbra.Collections;
using Penumbra.GameData.ByteString;
using Penumbra.GameData.Enums;
using Penumbra.Interop.Structs;
@ -113,14 +114,14 @@ public unsafe partial class ResourceLoader
// Use the default method of path replacement.
public static (FullPath?, object?) DefaultResolver( Utf8GamePath path )
public static (FullPath?, LinkedModCollection?) DefaultResolver( Utf8GamePath path )
{
var resolved = Penumbra.CollectionManager.Default.ResolvePath( path );
return ( resolved, null );
return ( resolved, new LinkedModCollection( Penumbra.CollectionManager.Default ) );
}
// Try all resolve path subscribers or use the default replacer.
private (FullPath?, object?) ResolvePath( Utf8GamePath path, ResourceCategory category, ResourceType resourceType, int resourceHash )
private (FullPath?, LinkedModCollection?) ResolvePath( Utf8GamePath path, ResourceCategory category, ResourceType resourceType, int resourceHash )
{
if( !DoReplacements || _incMode.Value )
{