mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-28 11:29:24 +01:00
Add backup mechanism and some collection cleanup.
This commit is contained in:
parent
d906e5aedf
commit
c210a4f10a
5 changed files with 202 additions and 29 deletions
|
|
@ -1,4 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Plugin;
|
||||
|
|
@ -54,6 +57,7 @@ public class Penumbra : IDalamudPlugin
|
|||
{
|
||||
Dalamud.Initialize( pluginInterface );
|
||||
GameData.GameData.GetIdentifier( Dalamud.GameData, Dalamud.ClientState.ClientLanguage );
|
||||
Backup.CreateBackup( PenumbraBackupFiles() );
|
||||
Config = Configuration.Load();
|
||||
|
||||
MusicManager = new MusicManager();
|
||||
|
|
@ -64,7 +68,7 @@ public class Penumbra : IDalamudPlugin
|
|||
|
||||
ResidentResources = new ResidentResourceManager();
|
||||
CharacterUtility = new CharacterUtility();
|
||||
MetaFileManager = new MetaFileManager();
|
||||
MetaFileManager = new MetaFileManager();
|
||||
ResourceLoader = new ResourceLoader( this );
|
||||
ResourceLogger = new ResourceLogger( ResourceLoader );
|
||||
ModManager = new Mod.Manager();
|
||||
|
|
@ -337,4 +341,14 @@ public class Penumbra : IDalamudPlugin
|
|||
|
||||
SettingsInterface.FlipVisibility();
|
||||
}
|
||||
|
||||
// Collect all relevant files for penumbra configuration.
|
||||
private static IReadOnlyList< FileInfo > PenumbraBackupFiles()
|
||||
{
|
||||
var list = new DirectoryInfo( ModCollection.CollectionDirectory ).EnumerateFiles( "*.json" ).ToList();
|
||||
list.Add( Dalamud.PluginInterface.ConfigFile );
|
||||
list.Add( new FileInfo( Mod.Manager.SortOrderFile ) );
|
||||
list.Add( new FileInfo( ModCollection.Manager.ActiveCollectionFile ) );
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue