From af99db0844e8b6891515ccb6fc37126ec44dca14 Mon Sep 17 00:00:00 2001 From: pointfeev Date: Mon, 16 May 2022 04:47:08 -0500 Subject: [PATCH] v3.5.0.1 - SmokeAPI's unlock_all option will now be ticked false if not every single DLC is selected --- CreamInstaller/CreamInstaller.csproj | 2 +- CreamInstaller/Forms/InstallForm.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CreamInstaller/CreamInstaller.csproj b/CreamInstaller/CreamInstaller.csproj index 55721e7..b07a074 100644 --- a/CreamInstaller/CreamInstaller.csproj +++ b/CreamInstaller/CreamInstaller.csproj @@ -5,7 +5,7 @@ True Resources\ini.ico true - 3.5.0.0 + 3.5.0.1 Resources\ini.ico LICENSE 2021, pointfeev (https://github.com/pointfeev) diff --git a/CreamInstaller/Forms/InstallForm.cs b/CreamInstaller/Forms/InstallForm.cs index 77eca09..dac23d5 100644 --- a/CreamInstaller/Forms/InstallForm.cs +++ b/CreamInstaller/Forms/InstallForm.cs @@ -56,14 +56,14 @@ internal partial class InstallForm : CustomForm } } - internal static void WriteSmokeConfiguration(StreamWriter writer, SortedList dlc, List<(string id, string name, SortedList dlc)> extraDlc, InstallForm installForm = null) + internal static void WriteSmokeConfiguration(StreamWriter writer, bool unlockAll, SortedList dlc, List<(string id, string name, SortedList dlc)> extraDlc, InstallForm installForm = null) { Thread.Sleep(0); writer.WriteLine("{"); writer.WriteLine(" \"$version\": 1,"); writer.WriteLine(" \"logging\": false,"); writer.WriteLine(" \"hook_steamclient\": true,"); - writer.WriteLine(" \"unlock_all\": true,"); + writer.WriteLine(" \"unlock_all\": " + (unlockAll ? "true" : "false") + ","); writer.WriteLine(" \"override\": [],"); writer.WriteLine(" \"dlc_ids\": ["); IEnumerable> dlcs = dlc.ToList(); @@ -151,7 +151,7 @@ internal partial class InstallForm : CustomForm installForm.UpdateUser("Generating SmokeAPI configuration for " + selection.Name + $" in directory \"{directory}\" . . . ", InstallationLog.Operation); File.Create(config).Close(); StreamWriter writer = new(config, true, Encoding.UTF8); - WriteSmokeConfiguration(writer, selection.SelectedDlc, selection.ExtraDlc, installForm); + WriteSmokeConfiguration(writer, selection.SelectedDlc.Count >= selection.AllDlc.Count, selection.SelectedDlc, selection.ExtraDlc, installForm); writer.Flush(); writer.Close(); });