mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Fix some enabling stuff. Always use PathResolver. Add counter to materials and imcs.
This commit is contained in:
parent
e8ee729ec5
commit
15602f5be5
6 changed files with 22 additions and 35 deletions
|
|
@ -26,7 +26,6 @@ public partial class PathResolver : IDisposable
|
|||
SetupHumanHooks();
|
||||
SetupWeaponHooks();
|
||||
SetupMetaHooks();
|
||||
Penumbra.CollectionManager.CollectionChanged += OnCollectionChange;
|
||||
}
|
||||
|
||||
// The modified resolver that handles game path resolving.
|
||||
|
|
@ -74,7 +73,7 @@ public partial class PathResolver : IDisposable
|
|||
PluginLog.Debug( "Character Path Resolver enabled." );
|
||||
}
|
||||
|
||||
private void Disable()
|
||||
public void Disable()
|
||||
{
|
||||
if( !Enabled )
|
||||
{
|
||||
|
|
@ -103,23 +102,5 @@ public partial class PathResolver : IDisposable
|
|||
DisposeMtrlHooks();
|
||||
DisposeDataHooks();
|
||||
DisposeMetaHooks();
|
||||
Penumbra.CollectionManager.CollectionChanged -= OnCollectionChange;
|
||||
}
|
||||
|
||||
private void OnCollectionChange( ModCollection.Type type, ModCollection? _1, ModCollection? _2, string? characterName )
|
||||
{
|
||||
if( type != ModCollection.Type.Character )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( Penumbra.CollectionManager.HasCharacterCollections )
|
||||
{
|
||||
Enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue