unleash api via modpack config

This commit is contained in:
2024-07-10 18:24:49 +02:00
parent 1bd0e87211
commit d1f35676ee
7 changed files with 83 additions and 84 deletions

View File

@@ -81,12 +81,13 @@ public static class Program
{
var info = ModpackInfo.TryLoad(updateOptions.ProfileFolder);
var config = ModpackConfig.LoadFromUrl(CheckModpackConfigUrl(updateOptions.ModpackConfig, info));
var features = new ModpackFeatures(config);
// Check features
if (!string.IsNullOrWhiteSpace(updateOptions.ExtrasKey))
info.ExtrasKey = updateOptions.ExtrasKey;
if (!string.IsNullOrWhiteSpace(info.ExtrasKey))
updateOptions.IncludeExtras = AppFeatures.AllowExtras.IsEnabled(new AllowExtrasFeatureContext(info, config));
updateOptions.IncludeExtras = features.IsEnabled(ModpackFeatures.FeatureAllowExtas, new AllowExtrasFeatureContext(info, config));
// Check for update
var installer = new ModpackInstaller(config, info);