mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 13:14:17 +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
|
|
@ -137,6 +137,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
{
|
||||
var newDir = Mod.CreateModFolder( Penumbra.ModManager.BasePath, _newModName );
|
||||
Mod.CreateMeta( newDir, _newModName, Penumbra.Config.DefaultModAuthor, string.Empty, "1.0", string.Empty );
|
||||
Mod.CreateDefaultFiles( newDir );
|
||||
Penumbra.ModManager.AddMod( newDir );
|
||||
_newModName = string.Empty;
|
||||
}
|
||||
|
|
@ -341,7 +342,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
|
||||
private void StoreCurrentSelection()
|
||||
{
|
||||
_lastSelectedDirectory = Selected?.BasePath.FullName ?? string.Empty;
|
||||
_lastSelectedDirectory = Selected?.ModPath.FullName ?? string.Empty;
|
||||
ClearSelection();
|
||||
}
|
||||
|
||||
|
|
@ -350,7 +351,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
if( _lastSelectedDirectory.Length > 0 )
|
||||
{
|
||||
base.SelectedLeaf = ( ModFileSystem.Leaf? )FileSystem.Root.GetAllDescendants( SortMode.Lexicographical )
|
||||
.FirstOrDefault( l => l is ModFileSystem.Leaf m && m.Value.BasePath.FullName == _lastSelectedDirectory );
|
||||
.FirstOrDefault( l => l is ModFileSystem.Leaf m && m.Value.ModPath.FullName == _lastSelectedDirectory );
|
||||
OnSelectionChange( null, base.SelectedLeaf?.Value, default );
|
||||
_lastSelectedDirectory = string.Empty;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue