mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-22 16:39:27 +01:00
A few comments, further cleanup. A few TODOs handled.
This commit is contained in:
parent
dbb9931189
commit
c78725d7d5
47 changed files with 347 additions and 3664 deletions
|
|
@ -6,16 +6,22 @@ namespace Penumbra.Mods;
|
|||
|
||||
public sealed partial class Mod
|
||||
{
|
||||
public sealed partial class Manager : IEnumerable< Mod >
|
||||
public sealed partial class Manager : IReadOnlyList< Mod >
|
||||
{
|
||||
// An easily accessible set of new mods.
|
||||
// Mods are added when they are created or imported.
|
||||
// Mods are removed when they are deleted or when they are toggled in any collection.
|
||||
// Also gets cleared on mod rediscovery.
|
||||
public readonly HashSet< Mod > NewMods = new();
|
||||
|
||||
private readonly List< Mod > _mods = new();
|
||||
|
||||
public Mod this[ int idx ]
|
||||
=> _mods[ idx ];
|
||||
|
||||
public Mod this[ Index idx ]
|
||||
=> _mods[ idx ];
|
||||
|
||||
public IReadOnlyList< Mod > Mods
|
||||
=> _mods;
|
||||
|
||||
public int Count
|
||||
=> _mods.Count;
|
||||
|
||||
|
|
@ -29,6 +35,7 @@ public sealed partial class Mod
|
|||
{
|
||||
SetBaseDirectory( modDirectory, true );
|
||||
ModOptionChanged += OnModOptionChange;
|
||||
ModPathChanged += OnModPathChange;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue