mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 05:43:42 +01:00
Rename Mod BasePath to ModPath, add simple Directory Renaming and Reloading, some fixes, Cleanup EditWindow.
This commit is contained in:
parent
c416d044a4
commit
65bbece9cf
17 changed files with 636 additions and 368 deletions
|
|
@ -239,6 +239,9 @@ public partial class ModCollection
|
|||
collection.Save();
|
||||
}
|
||||
|
||||
OnModChangedActive( mod.TotalManipulations > 0, mod.Index );
|
||||
break;
|
||||
case ModPathChangeType.Reloaded:
|
||||
OnModChangedActive( mod.TotalManipulations > 0, mod.Index );
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException( nameof( type ), type, null );
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public partial class ModCollection
|
|||
var settings = _settings[ i ];
|
||||
if( settings != null )
|
||||
{
|
||||
j.WritePropertyName( Penumbra.ModManager[ i ].BasePath.Name );
|
||||
j.WritePropertyName( Penumbra.ModManager[ i ].ModPath.Name );
|
||||
x.Serialize( j, new ModSettings.SavedSettings( settings, Penumbra.ModManager[ i ] ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,11 +92,11 @@ public partial class ModCollection
|
|||
// Add settings for a new appended mod, by checking if the mod had settings from a previous deletion.
|
||||
private bool AddMod( Mod mod )
|
||||
{
|
||||
if( _unusedSettings.TryGetValue( mod.BasePath.Name, out var save ) )
|
||||
if( _unusedSettings.TryGetValue( mod.ModPath.Name, out var save ) )
|
||||
{
|
||||
var ret = save.ToSettings( mod, out var settings );
|
||||
_settings.Add( settings );
|
||||
_unusedSettings.Remove( mod.BasePath.Name );
|
||||
_unusedSettings.Remove( mod.ModPath.Name );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ public partial class ModCollection
|
|||
var settings = _settings[ idx ];
|
||||
if( settings != null )
|
||||
{
|
||||
_unusedSettings.Add( mod.BasePath.Name, new ModSettings.SavedSettings( settings, mod ) );
|
||||
_unusedSettings.Add( mod.ModPath.Name, new ModSettings.SavedSettings( settings, mod ) );
|
||||
}
|
||||
|
||||
_settings.RemoveAt( idx );
|
||||
|
|
@ -131,7 +131,7 @@ public partial class ModCollection
|
|||
{
|
||||
foreach( var (mod, setting) in Penumbra.ModManager.Zip( _settings ).Where( s => s.Second != null ) )
|
||||
{
|
||||
_unusedSettings[ mod.BasePath.Name ] = new ModSettings.SavedSettings( setting!, mod );
|
||||
_unusedSettings[ mod.ModPath.Name ] = new ModSettings.SavedSettings( setting!, mod );
|
||||
}
|
||||
|
||||
_settings.Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue