install keys

This commit is contained in:
Schedel Pascal
2024-06-21 08:55:46 +02:00
parent f1185c242c
commit 20c1e5dc8e
12 changed files with 216 additions and 75 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 || updateConfig.AllowExtras));
var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || options.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 || updateConfig.AllowExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath))
if (action.Side.IsSide(options.Side) && (!action.IsExtra || options.IncludeExtras) && !result.Actions.Any(n => n.DestPath == action.DestPath))
actionsToAdd.Add(action);
}

View File

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