A few comments, further cleanup. A few TODOs handled.

This commit is contained in:
Ottermandias 2022-04-27 17:19:33 +02:00
parent dbb9931189
commit c78725d7d5
47 changed files with 347 additions and 3664 deletions

View file

@ -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;
}
}
}