remove allow extras from option -> controlled by update config

This commit is contained in:
2024-06-20 22:40:19 +02:00
parent ee46f7272e
commit 87cfacfdbb
4 changed files with 3 additions and 4 deletions

View File

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

View File

@@ -7,5 +7,4 @@ public class UpdateCheckOptions
public bool IgnoreMaintenance { get; set; }
public bool AllowUpdaterAfterInstall { get; set; } = true;
public Side Side { get; set; } = Side.Client;
public bool IncludeExtraActions { get; set; }
}