Potential fix for being unable to load into character select until reloading player resources.

This commit is contained in:
Ottermandias 2021-06-27 12:09:24 +02:00
parent 5952d5e312
commit e4f9bf72e2
2 changed files with 8 additions and 9 deletions

View file

@ -56,6 +56,7 @@ namespace Penumbra.Meta
private static void DisposeFile( FileInfo? file )
{
file?.Refresh();
if( !( file?.Exists ?? false ) )
{
return;
@ -94,11 +95,6 @@ namespace Penumbra.Meta
public void Dispose()
=> Reset();
~MetaManager()
{
Reset( false );
}
private void ClearDirectory()
{
_dir.Refresh();
@ -132,8 +128,6 @@ namespace Penumbra.Meta
kvp.Value.Write( _dir );
_resolvedFiles[ kvp.Key ] = kvp.Value.CurrentFile!;
}
_resourceManagement.ReloadPlayerResources();
}
public bool ApplyMod( MetaManipulation m, Mod.Mod mod )

View file

@ -74,6 +74,11 @@ namespace Penumbra.Mods
collection.Cache?.UpdateMetaManipulations();
}
}
if( recomputeMeta )
{
Service<GameResourceManagement>.Get().ReloadPlayerResources();
}
}
public bool AddCollection( string name, Dictionary< string, ModSettings > settings )
@ -168,11 +173,11 @@ namespace Penumbra.Mods
if( ActiveCollection == CurrentCollection )
{
ActiveCollection = c;
var resourceManager = Service<GameResourceManagement>.Get();
resourceManager.ReloadPlayerResources();
}
CurrentCollection = c;
var resourceManager = Service< GameResourceManagement >.Get();
resourceManager.ReloadPlayerResources();
}, s => _plugin.Configuration.CurrentCollection = s );
public void SetForcedCollection( ModCollection newCollection )