Another try at character collection animations.

This commit is contained in:
Ottermandias 2022-06-09 12:38:21 +02:00
parent d45e98a254
commit 34445eb949
3 changed files with 73 additions and 68 deletions

View file

@ -40,7 +40,8 @@ public partial class PathResolver : IDisposable
// A potential next request will add the path anew.
var nonDefault = HandleMaterialSubFiles( type, out var collection )
|| PathCollections.TryRemove( gamePath.Path, out collection )
//|| HandlePapFile( type, gamePath, out collection )
//|| HandlePapFile( type, gamePath, out collection )
|| HandleAnimationFile( type, gamePath, out collection )
|| HandleDecalFile( type, gamePath, out collection );
if( !nonDefault )
{
@ -72,18 +73,24 @@ public partial class PathResolver : IDisposable
return false;
}
//private bool HandlePapFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
//{
// if( type is ResourceType.Pap or ResourceType.Tmb
// && _animationLoadCollection != null )
// {
// collection = _animationLoadCollection;
// return true;
// }
//
// collection = null;
// return false;
//}
private bool HandleAnimationFile( ResourceType type, Utf8GamePath _, out ModCollection? collection )
{
if( _animationLoadCollection != null )
{
switch( type )
{
case ResourceType.Tmb:
case ResourceType.Pap:
case ResourceType.Avfx:
case ResourceType.Atex:
collection = _animationLoadCollection;
return true;
}
}
collection = null;
return false;
}
public void Enable()
{