mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-01 05:13:43 +01:00
Almost there...
This commit is contained in:
parent
f3b906007d
commit
65bd1d1b52
59 changed files with 4733 additions and 6194 deletions
|
|
@ -65,24 +65,19 @@ public sealed partial class Mod2
|
|||
_mods.Clear();
|
||||
BasePath.Refresh();
|
||||
|
||||
// TODO
|
||||
//StructuredMods.SubFolders.Clear();
|
||||
//StructuredMods.Mods.Clear();
|
||||
if( Valid && BasePath.Exists )
|
||||
{
|
||||
foreach( var modFolder in BasePath.EnumerateDirectories() )
|
||||
{
|
||||
//var mod = LoadMod( StructuredMods, modFolder );
|
||||
//if( mod == null )
|
||||
//{
|
||||
// continue;
|
||||
//}
|
||||
//
|
||||
//mod.Index = _mods.Count;
|
||||
//_mods.Add( mod );
|
||||
var mod = LoadMod( modFolder );
|
||||
if( mod == null )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
mod.Index = _mods.Count;
|
||||
_mods.Add( mod );
|
||||
}
|
||||
|
||||
//SetModStructure();
|
||||
}
|
||||
|
||||
ModDiscoveryFinished?.Invoke();
|
||||
|
|
|
|||
|
|
@ -36,12 +36,10 @@ public sealed partial class Mod2
|
|||
|
||||
foreach( var unusedFile in mod.FindUnusedFiles() )
|
||||
{
|
||||
if( unusedFile.ToGamePath( mod.BasePath, out var gamePath ) )
|
||||
if( unusedFile.ToGamePath( mod.BasePath, out var gamePath )
|
||||
&& !mod._default.FileData.TryAdd( gamePath, unusedFile ) )
|
||||
{
|
||||
if( !mod._default.FileData.TryAdd( gamePath, unusedFile ) )
|
||||
{
|
||||
PluginLog.Error( $"Could not add {gamePath} because it already points to {mod._default.FileData[ gamePath ]}." );
|
||||
}
|
||||
PluginLog.Error( $"Could not add {gamePath} because it already points to {mod._default.FileData[ gamePath ]}." );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using OtterGui.Filesystem;
|
|||
|
||||
namespace Penumbra.Mods;
|
||||
|
||||
public sealed class ModFileSystemA : FileSystem< Mod2 >, IDisposable
|
||||
public sealed class ModFileSystem : FileSystem< Mod2 >, IDisposable
|
||||
{
|
||||
// Save the current sort order.
|
||||
// Does not save or copy the backup in the current mod directory,
|
||||
|
|
@ -13,9 +13,9 @@ public sealed class ModFileSystemA : FileSystem< Mod2 >, IDisposable
|
|||
=> SaveToFile( new FileInfo( Mod2.Manager.ModFileSystemFile ), SaveMod, true );
|
||||
|
||||
// Create a new ModFileSystem from the currently loaded mods and the current sort order file.
|
||||
public static ModFileSystemA Load()
|
||||
public static ModFileSystem Load()
|
||||
{
|
||||
var ret = new ModFileSystemA();
|
||||
var ret = new ModFileSystem();
|
||||
ret.Reload();
|
||||
|
||||
ret.Changed += ret.OnChange;
|
||||
Loading…
Add table
Add a link
Reference in a new issue