From a2947fdaaae95600c12e856160ac7043412fb215 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sun, 29 Aug 2021 01:32:12 +0200 Subject: [PATCH] Prohibit cache building from calculating effective files for every mod - and thus also not fixing settings before using them. --- Penumbra/Mods/ModCollection.cs | 4 ++-- Penumbra/Mods/ModCollectionCache.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Penumbra/Mods/ModCollection.cs b/Penumbra/Mods/ModCollection.cs index adf07a5a..2d61f0fd 100644 --- a/Penumbra/Mods/ModCollection.cs +++ b/Penumbra/Mods/ModCollection.cs @@ -73,14 +73,14 @@ namespace Penumbra.Mods { if( Settings.TryGetValue( mod.BasePath.Name, out var settings ) ) { - Cache.AddMod( settings, mod ); + Cache.AddMod( settings, mod, false ); } else { changedSettings = true; var newSettings = ModSettings.DefaultSettings( mod.Meta ); Settings.Add( mod.BasePath.Name, newSettings ); - Cache.AddMod( newSettings, mod ); + Cache.AddMod( newSettings, mod, false ); } } diff --git a/Penumbra/Mods/ModCollectionCache.cs b/Penumbra/Mods/ModCollectionCache.cs index c50e4dd3..3307d29c 100644 --- a/Penumbra/Mods/ModCollectionCache.cs +++ b/Penumbra/Mods/ModCollectionCache.cs @@ -126,14 +126,14 @@ namespace Penumbra.Mods 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 ) ) { var newMod = new Mod.Mod( settings, data ); AvailableMods[ data.BasePath.Name ] = newMod; - if( settings.Enabled ) + if( updateFileList && settings.Enabled ) { CalculateEffectiveFileList(); if( data.Resources.MetaManipulations.Count > 0 )