Prohibit cache building from calculating effective files for every mod - and thus also not fixing settings before using them.

This commit is contained in:
Ottermandias 2021-08-29 01:32:12 +02:00
parent 3680d2b63f
commit a2947fdaaa
2 changed files with 4 additions and 4 deletions

View file

@ -73,14 +73,14 @@ namespace Penumbra.Mods
{ {
if( Settings.TryGetValue( mod.BasePath.Name, out var settings ) ) if( Settings.TryGetValue( mod.BasePath.Name, out var settings ) )
{ {
Cache.AddMod( settings, mod ); Cache.AddMod( settings, mod, false );
} }
else else
{ {
changedSettings = true; changedSettings = true;
var newSettings = ModSettings.DefaultSettings( mod.Meta ); var newSettings = ModSettings.DefaultSettings( mod.Meta );
Settings.Add( mod.BasePath.Name, newSettings ); Settings.Add( mod.BasePath.Name, newSettings );
Cache.AddMod( newSettings, mod ); Cache.AddMod( newSettings, mod, false );
} }
} }

View file

@ -126,14 +126,14 @@ namespace Penumbra.Mods
private static readonly PriorityComparer Comparer = new(); private static readonly PriorityComparer Comparer = new();
public void AddMod( ModSettings settings, ModData data ) public void AddMod( ModSettings settings, ModData data, bool updateFileList = true )
{ {
if( !AvailableMods.TryGetValue( data.BasePath.Name, out var existingMod ) ) if( !AvailableMods.TryGetValue( data.BasePath.Name, out var existingMod ) )
{ {
var newMod = new Mod.Mod( settings, data ); var newMod = new Mod.Mod( settings, data );
AvailableMods[ data.BasePath.Name ] = newMod; AvailableMods[ data.BasePath.Name ] = newMod;
if( settings.Enabled ) if( updateFileList && settings.Enabled )
{ {
CalculateEffectiveFileList(); CalculateEffectiveFileList();
if( data.Resources.MetaManipulations.Count > 0 ) if( data.Resources.MetaManipulations.Count > 0 )