AllowExtras

This commit is contained in:
2024-06-20 22:42:46 +02:00
parent 87cfacfdbb
commit 68b940fddd
2 changed files with 3 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
if (installInfos is not null && installInfos.Actions.Count != 0) if (installInfos is not null && installInfos.Actions.Count != 0)
{ {
var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || updateConfig.IncludeExtras)); var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || updateConfig.AllowExtras));
if (actions.Any()) if (actions.Any())
{ {
result.Actions.AddRange(installInfos.Actions); result.Actions.AddRange(installInfos.Actions);
@@ -88,7 +88,7 @@ public class ModpackInstaller(ModpackConfig updateConfig, ModpackInfo modpackInf
foreach (var action in checkingVersion.Actions) foreach (var action in checkingVersion.Actions)
{ {
if (action.Side.IsSide(options.Side) && (!action.IsExtra || updateConfig.IncludeExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath)) if (action.Side.IsSide(options.Side) && (!action.IsExtra || updateConfig.AllowExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath))
actionsToAdd.Add(action); actionsToAdd.Add(action);
} }

View File

@@ -8,7 +8,7 @@ public class ModpackConfig
public string Name { get; set; } public string Name { get; set; }
public string UpdateUrl { get; set; } public string UpdateUrl { get; set; }
public string InstallUrl { get; set; } public string InstallUrl { get; set; }
public bool IncludeExtras { get; set; } public bool AllowExtras { get; set; }
[JsonIgnore] [JsonIgnore]
public string ConfigUrl { get; set; } public string ConfigUrl { get; set; }