mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 06:17:45 +01:00
Remove Mod.BasePath
This commit is contained in:
parent
49c8afb72a
commit
aa4bc45641
7 changed files with 78 additions and 80 deletions
|
|
@ -18,6 +18,16 @@ public enum NewDirectoryState
|
|||
Identical,
|
||||
Empty,
|
||||
}
|
||||
|
||||
/// <summary> Describes the state of a changed mod event. </summary>
|
||||
public enum ModPathChangeType
|
||||
{
|
||||
Added,
|
||||
Deleted,
|
||||
Moved,
|
||||
Reloaded,
|
||||
StartingReload,
|
||||
}
|
||||
|
||||
public sealed class ModManager : ModStorage
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Penumbra.Mods.Manager;
|
||||
|
||||
namespace Penumbra.Mods;
|
||||
|
||||
public enum ModPathChangeType
|
||||
{
|
||||
Added,
|
||||
Deleted,
|
||||
Moved,
|
||||
Reloaded,
|
||||
StartingReload,
|
||||
}
|
||||
|
||||
public partial class Mod
|
||||
{
|
||||
public DirectoryInfo ModPath { get; internal set; }
|
||||
public string Identifier
|
||||
=> Index >= 0 ? ModPath.Name : Name;
|
||||
public int Index { get; internal set; } = -1;
|
||||
|
||||
public bool IsTemporary
|
||||
=> Index < 0;
|
||||
|
||||
// Unused if Index < 0 but used for special temporary mods.
|
||||
public int Priority
|
||||
=> 0;
|
||||
|
||||
internal Mod( DirectoryInfo modPath )
|
||||
{
|
||||
ModPath = modPath;
|
||||
Default = new SubMod( this );
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
|
|
@ -18,6 +19,25 @@ public sealed partial class Mod : IMod
|
|||
Priority = int.MaxValue,
|
||||
};
|
||||
|
||||
// Main Data
|
||||
public DirectoryInfo ModPath { get; internal set; }
|
||||
public string Identifier
|
||||
=> Index >= 0 ? ModPath.Name : Name;
|
||||
public int Index { get; internal set; } = -1;
|
||||
|
||||
public bool IsTemporary
|
||||
=> Index < 0;
|
||||
|
||||
/// <summary>Unused if Index < 0 but used for special temporary mods.</summary>
|
||||
public int Priority
|
||||
=> 0;
|
||||
|
||||
public Mod(DirectoryInfo modPath)
|
||||
{
|
||||
ModPath = modPath;
|
||||
Default = new SubMod(this);
|
||||
}
|
||||
|
||||
// Meta Data
|
||||
public LowerString Name { get; internal set; } = "New Mod";
|
||||
public LowerString Author { get; internal set; } = LowerString.Empty;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ public class ModCache
|
|||
public string LowerChangedItemsString = string.Empty;
|
||||
public string AllTagsLower = string.Empty;
|
||||
|
||||
public ModCache()
|
||||
{}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
TotalFileCount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue