mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 13:53: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
|
|
@ -14,7 +14,7 @@ namespace Penumbra.Mods;
|
|||
public partial class Mod
|
||||
{
|
||||
internal string DefaultFile
|
||||
=> Path.Combine( BasePath.FullName, "default_mod.json" );
|
||||
=> Path.Combine( ModPath.FullName, "default_mod.json" );
|
||||
|
||||
// The default mod contains setting-independent sets of file replacements, file swaps and meta changes.
|
||||
// Every mod has an default mod, though it may be empty.
|
||||
|
|
@ -33,7 +33,7 @@ public partial class Mod
|
|||
{
|
||||
Formatting = Formatting.Indented,
|
||||
};
|
||||
ISubMod.WriteSubMod( j, serializer, _default, BasePath, 0 );
|
||||
ISubMod.WriteSubMod( j, serializer, _default, ModPath, 0 );
|
||||
}
|
||||
|
||||
private void LoadDefaultOption()
|
||||
|
|
@ -43,11 +43,11 @@ public partial class Mod
|
|||
{
|
||||
if( !File.Exists( defaultFile ) )
|
||||
{
|
||||
_default.Load( BasePath, new JObject(), out _ );
|
||||
_default.Load( ModPath, new JObject(), out _ );
|
||||
}
|
||||
else
|
||||
{
|
||||
_default.Load( BasePath, JObject.Parse( File.ReadAllText( defaultFile ) ), out _ );
|
||||
_default.Load( ModPath, JObject.Parse( File.ReadAllText( defaultFile ) ), out _ );
|
||||
}
|
||||
}
|
||||
catch( Exception e )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue