public static int GetPatchCount(this WingmanMod mod) { var allFilePatches = mod.FilePatches.SelectMany(fp => fp.Value).SelectMany(ps => ps.Patches).Count(); var allPatches = mod.AssetPatches.SelectMany(fp => fp.Value).SelectMany(ps => ps.Patches).Count(); return(allFilePatches + allPatches); }
public static List <string> GetFilesModified(this WingmanMod mod) { var fp = mod.FilePatches?.Keys.ToList(); var ap = mod.AssetPatches?.Keys.ToList(); return(ap.Concat(fp).Distinct().ToList()); }
public bool IsValid(WingmanMod mod) { return(mod is { FilePatches : { } } jsonMod&& (jsonMod.FilePatches.Any() || (jsonMod.AssetPatches != null && jsonMod.AssetPatches.Any()))); }