mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Moved the IsEnabled check from computing effective file list to the hook.
This commit is contained in:
parent
7e51e663ec
commit
b987fe53cb
3 changed files with 21 additions and 22 deletions
|
|
@ -109,9 +109,6 @@ namespace Penumbra.Mods
|
||||||
ResolvedFiles.Clear();
|
ResolvedFiles.Clear();
|
||||||
SwappedFiles.Clear();
|
SwappedFiles.Clear();
|
||||||
|
|
||||||
if (!_plugin.Configuration.IsEnabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var registeredFiles = new Dictionary< string, string >();
|
var registeredFiles = new Dictionary< string, string >();
|
||||||
|
|
||||||
foreach( var (mod, settings) in Mods.GetOrderedAndEnabledModListWithSettings( _plugin.Configuration.InvertModListOrder ) )
|
foreach( var (mod, settings) in Mods.GetOrderedAndEnabledModListWithSettings( _plugin.Configuration.InvertModListOrder ) )
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@ namespace Penumbra
|
||||||
PluginLog.Log( "[GetResourceHandler] {0}", gameFsPath );
|
PluginLog.Log( "[GetResourceHandler] {0}", gameFsPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Plugin.Configuration.IsEnabled)
|
||||||
|
{
|
||||||
var replacementPath = Plugin.ModManager.ResolveSwappedOrReplacementFilePath( gameFsPath );
|
var replacementPath = Plugin.ModManager.ResolveSwappedOrReplacementFilePath( gameFsPath );
|
||||||
|
|
||||||
// path must be < 260 because statically defined array length :(
|
// path must be < 260 because statically defined array length :(
|
||||||
|
|
@ -151,6 +153,7 @@ namespace Penumbra
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
PluginLog.Log( "[GetResourceHandler] resolved {GamePath} to {NewPath}", gameFsPath, replacementPath );
|
PluginLog.Log( "[GetResourceHandler] resolved {GamePath} to {NewPath}", gameFsPath, replacementPath );
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
return CallOriginalHandler( isSync, pFileManager, pCategoryId, pResourceType, pResourceHash, pPath, pUnknown, isUnknown );
|
return CallOriginalHandler( isSync, pFileManager, pCategoryId, pResourceType, pResourceHash, pPath, pUnknown, isUnknown );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ namespace Penumbra.UI
|
||||||
if( ImGui.Checkbox( LabelEnabled, ref enabled ) )
|
if( ImGui.Checkbox( LabelEnabled, ref enabled ) )
|
||||||
{
|
{
|
||||||
_config.IsEnabled = enabled;
|
_config.IsEnabled = enabled;
|
||||||
_base.ReloadMods();
|
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue