mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 05:04:15 +01:00
Add preliminary pap handling to character collections.
This commit is contained in:
parent
c0102368c3
commit
f0131dd5ba
3 changed files with 83 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ 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 )
|
||||
|| HandleDecalFile( type, gamePath, out collection );
|
||||
if( !nonDefault )
|
||||
{
|
||||
|
|
@ -59,7 +60,7 @@ public partial class PathResolver : IDisposable
|
|||
|
||||
private bool HandleDecalFile( ResourceType type, Utf8GamePath gamePath, out ModCollection? collection )
|
||||
{
|
||||
if( type == ResourceType.Tex
|
||||
if( type == ResourceType.Tex
|
||||
&& _lastCreatedCollection != null
|
||||
&& gamePath.Path.Substring( "chara/common/texture/".Length ).StartsWith( 'd', 'e', 'c', 'a', 'l', '_', 'f', 'a', 'c', 'e' ) )
|
||||
{
|
||||
|
|
@ -71,6 +72,19 @@ public partial class PathResolver : IDisposable
|
|||
return false;
|
||||
}
|
||||
|
||||
private bool HandlePapFile( ResourceType type, Utf8GamePath gamePath, out ModCollection? collection )
|
||||
{
|
||||
if( type is ResourceType.Pap or ResourceType.Tmb
|
||||
&& _animationLoadCollection != null)
|
||||
{
|
||||
collection = _animationLoadCollection;
|
||||
return true;
|
||||
}
|
||||
|
||||
collection = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
if( Enabled )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue