mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 15:27:51 +01:00
Added a bunch of logging, small fix.
This commit is contained in:
parent
9af4406c8c
commit
e8ee729ec5
16 changed files with 86 additions and 38 deletions
|
|
@ -33,6 +33,7 @@ public partial class Mod
|
|||
try
|
||||
{
|
||||
Directory.Delete( mod.BasePath.FullName, true );
|
||||
PluginLog.Debug( "Deleted directory {Directory:l} for {Name:l}.", mod.BasePath.FullName, mod.Name );
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
|
|
@ -47,6 +48,7 @@ public partial class Mod
|
|||
}
|
||||
|
||||
ModPathChanged.Invoke( ModPathChangeType.Deleted, mod, mod.BasePath, null );
|
||||
PluginLog.Debug( "Deleted mod {Name:l}.", mod.Name );
|
||||
}
|
||||
|
||||
// Load a new mod and add it to the manager if successful.
|
||||
|
|
@ -66,6 +68,7 @@ public partial class Mod
|
|||
mod.Index = _mods.Count;
|
||||
_mods.Add( mod );
|
||||
ModPathChanged.Invoke( ModPathChangeType.Added, mod, null, mod.BasePath );
|
||||
PluginLog.Debug( "Added new mod {Name:l} from {Directory:l}.", mod.Name, modFolder.FullName );
|
||||
}
|
||||
|
||||
// Add new mods to NewMods and remove deleted mods from NewMods.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public sealed partial class Mod
|
|||
Valid = Directory.Exists( newDir.FullName );
|
||||
if( Penumbra.Config.ModDirectory != BasePath.FullName )
|
||||
{
|
||||
PluginLog.Information( "Set new mod base directory from {OldDirectory:l} to {NewDirectory:l}.", Penumbra.Config.ModDirectory, BasePath.FullName );
|
||||
Penumbra.Config.ModDirectory = BasePath.FullName;
|
||||
Penumbra.Config.Save();
|
||||
}
|
||||
|
|
@ -86,6 +87,7 @@ public sealed partial class Mod
|
|||
}
|
||||
|
||||
ModDiscoveryFinished?.Invoke();
|
||||
PluginLog.Information( "Rediscovered mods." );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue