Move CollectionManager out of ModManager

This commit is contained in:
Ottermandias 2022-03-23 11:45:38 +01:00
parent 0eff4e2e67
commit 9c0fc8a8c7
19 changed files with 94 additions and 102 deletions

View file

@ -260,8 +260,8 @@ public class ModManager
public FullPath? ResolveSwappedOrReplacementPath( Utf8GamePath gameResourcePath )
{
var ret = Collections.DefaultCollection.ResolveSwappedOrReplacementPath( gameResourcePath );
ret ??= Collections.ForcedCollection.ResolveSwappedOrReplacementPath( gameResourcePath );
var ret = Penumbra.CollectionManager.DefaultCollection.ResolveSwappedOrReplacementPath( gameResourcePath );
ret ??= Penumbra.CollectionManager.ForcedCollection.ResolveSwappedOrReplacementPath( gameResourcePath );
return ret;
}
}

View file

@ -82,7 +82,7 @@ public static class ModManagerEditExtensions
manager.Config.Save();
}
foreach( var collection in manager.Collections.Collections.Values )
foreach( var collection in Penumbra.CollectionManager.Collections.Values )
{
if( collection.Settings.TryGetValue( oldBasePath.Name, out var settings ) )
{
@ -140,7 +140,7 @@ public static class ModManagerEditExtensions
mod.SaveMeta();
foreach( var collection in manager.Collections.Collections.Values )
foreach( var collection in Penumbra.CollectionManager.Collections.Values )
{
if( !collection.Settings.TryGetValue( mod.BasePath.Name, out var settings ) )
{
@ -176,7 +176,7 @@ public static class ModManagerEditExtensions
return ( oldSetting & bitmaskFront ) | ( ( oldSetting & bitmaskBack ) >> 1 );
}
foreach( var collection in manager.Collections.Collections.Values )
foreach( var collection in Penumbra.CollectionManager.Collections.Values )
{
if( !collection.Settings.TryGetValue( mod.BasePath.Name, out var settings ) )
{
@ -202,7 +202,7 @@ public static class ModManagerEditExtensions
if( collection.Cache != null && settings.Enabled )
{
collection.CalculateEffectiveFileList( mod.Resources.MetaManipulations.Count > 0,
manager.Collections.IsActive( collection ) );
Penumbra.CollectionManager.IsActive( collection ) );
}
}
}