Some further cleanup.

This commit is contained in:
Ottermandias 2024-01-14 19:28:42 +01:00
parent 70e72f5790
commit b53a2f1def
24 changed files with 90 additions and 112 deletions

View file

@ -6,20 +6,20 @@ namespace Penumbra.Mods.Editor;
public class ModFileCollection : IDisposable
{
private readonly List<FileRegistry> _available = new();
private readonly List<FileRegistry> _mtrl = new();
private readonly List<FileRegistry> _mdl = new();
private readonly List<FileRegistry> _tex = new();
private readonly List<FileRegistry> _shpk = new();
private readonly List<FileRegistry> _available = [];
private readonly List<FileRegistry> _mtrl = [];
private readonly List<FileRegistry> _mdl = [];
private readonly List<FileRegistry> _tex = [];
private readonly List<FileRegistry> _shpk = [];
private readonly SortedSet<FullPath> _missing = new();
private readonly HashSet<Utf8GamePath> _usedPaths = new();
private readonly SortedSet<FullPath> _missing = [];
private readonly HashSet<Utf8GamePath> _usedPaths = [];
public IReadOnlySet<FullPath> Missing
=> Ready ? _missing : new HashSet<FullPath>();
=> Ready ? _missing : [];
public IReadOnlySet<Utf8GamePath> UsedPaths
=> Ready ? _usedPaths : new HashSet<Utf8GamePath>();
=> Ready ? _usedPaths : [];
public IReadOnlyList<FileRegistry> Available
=> Ready ? _available : Array.Empty<FileRegistry>();
@ -38,9 +38,6 @@ public class ModFileCollection : IDisposable
public bool Ready { get; private set; } = true;
public ModFileCollection()
{ }
public void UpdateAll(Mod mod, ISubMod option)
{
UpdateFiles(mod, new CancellationToken());