Rework options, pre-submod types.

This commit is contained in:
Ottermandias 2024-04-23 17:41:55 +02:00
parent 792a04337f
commit 07afbfb229
25 changed files with 620 additions and 300 deletions

View file

@ -38,7 +38,7 @@ public sealed class Mod : IMod
internal Mod(DirectoryInfo modPath)
{
ModPath = modPath;
Default = new SubMod(this);
Default = SubMod.CreateDefault(this);
}
public override string ToString()
@ -82,7 +82,12 @@ public sealed class Mod : IMod
}
public IEnumerable<SubMod> AllSubMods
=> Groups.SelectMany(o => o).Prepend(Default);
=> Groups.SelectMany(o => o switch
{
SingleModGroup single => single.OptionData,
MultiModGroup multi => multi.PrioritizedOptions.Select(s => s.Mod),
_ => [],
}).Prepend(Default);
public List<FullPath> FindUnusedFiles()
{