remove allow extras from option -> controlled by update config
This commit is contained in:
@@ -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 || options.IncludeExtraActions));
|
var actions = installInfos.Actions.Where(n => n.Side.IsSide(options.Side) && (!n.IsExtra || updateConfig.IncludeExtras));
|
||||||
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 || 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);
|
actionsToAdd.Add(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,4 @@ public class UpdateCheckOptions
|
|||||||
public bool IgnoreMaintenance { get; set; }
|
public bool IgnoreMaintenance { get; set; }
|
||||||
public bool AllowUpdaterAfterInstall { get; set; } = true;
|
public bool AllowUpdaterAfterInstall { get; set; } = true;
|
||||||
public Side Side { get; set; } = Side.Client;
|
public Side Side { get; set; } = Side.Client;
|
||||||
public bool IncludeExtraActions { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +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; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string ConfigUrl { get; set; }
|
public string ConfigUrl { get; set; }
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ internal class Options
|
|||||||
{ "uai", "Allow an update directly after install. This only has affect if there is no existing installation.", uai => UpdateOptions.AllowUpdaterAfterInstall = uai != null},
|
{ "uai", "Allow an update directly after install. This only has affect if there is no existing installation.", uai => UpdateOptions.AllowUpdaterAfterInstall = uai != null},
|
||||||
{ "noupdate", "Skip the update check.", noupdate => UpdateOptions.NoUpdate = noupdate != null},
|
{ "noupdate", "Skip the update check.", noupdate => UpdateOptions.NoUpdate = noupdate != null},
|
||||||
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = m != null},
|
{ "m|maintenance", "Ignores the maintenance mode.", m => UpdateOptions.IgnoreMaintenance = m != null},
|
||||||
{ "e|extraactions", "Include extra actions.", e => UpdateOptions.IncludeExtraActions = e != null},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
additionals.AddRange(options.Parse(args));
|
additionals.AddRange(options.Parse(args));
|
||||||
|
|||||||
Reference in New Issue
Block a user