From 45b1484c22b7e0dcde3f0fce752008b615203a15 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Thu, 28 Dec 2023 23:31:46 +0200 Subject: [PATCH] Fixed Settings Pack creation Deps update --- build/common.props | 12 ++++++------ changelog.txt | 1 + src/MCM.Publish/MCM.Publish.csproj | 2 +- src/MCM.UI/Utils/InquiryDataUtils.cs | 8 ++++++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/build/common.props b/build/common.props index ed339f91..fc8d89ca 100644 --- a/build/common.props +++ b/build/common.props @@ -6,12 +6,12 @@ v$(GameVersion) 5.9.2 2.2.2 - 2.8.11 - 2.8.0 - 1.1.0.102 - 3.0.0.137 + 2.8.15 + 2.8.1 + 1.1.0.104 + 3.0.0.138 2.0.0.52 - 5.0.209 + 5.0.221 3.2.0.77 1.0.1.50 6.6.4 @@ -59,7 +59,7 @@ - + diff --git a/changelog.txt b/changelog.txt index ba77f884..b239027f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 5.9.2 Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.7 * Switched to .NET 6 for Xbox * Updated Chinese Simplified localization +* Fixed Settings Pack creation --------------------------------------------------------------------------------------------------- Version: 5.9.1 Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.2.0,v1.2.1 diff --git a/src/MCM.Publish/MCM.Publish.csproj b/src/MCM.Publish/MCM.Publish.csproj index 7c51c67e..71809fd7 100644 --- a/src/MCM.Publish/MCM.Publish.csproj +++ b/src/MCM.Publish/MCM.Publish.csproj @@ -16,8 +16,8 @@ true - true + true true true diff --git a/src/MCM.UI/Utils/InquiryDataUtils.cs b/src/MCM.UI/Utils/InquiryDataUtils.cs index 5616bb2c..ee272f6b 100644 --- a/src/MCM.UI/Utils/InquiryDataUtils.cs +++ b/src/MCM.UI/Utils/InquiryDataUtils.cs @@ -41,6 +41,11 @@ private delegate MultiSelectionInquiryData V2MultiDelegate(string titleText, str private static readonly V2MultiDelegate? V2Multi = AccessTools2.GetConstructorDelegate(typeof(MultiSelectionInquiryData), typeof(V2MultiDelegate).GetMethod("Invoke").GetParameters().Select(x => x.ParameterType).ToArray()); + private delegate MultiSelectionInquiryData V3MultiDelegate(string titleText, string descriptionText, List inquiryElements, bool isExitShown, int minSelectableOptionCount, int maxSelectableOptionCount, + string affirmativeText, string negativeText, Action> affirmativeAction, Action> negativeAction, string soundEventPath = "", bool isSeachAvailable = false); + private static readonly V3MultiDelegate? V3Multi = + AccessTools2.GetConstructorDelegate(typeof(MultiSelectionInquiryData), typeof(V3MultiDelegate).GetMethod("Invoke").GetParameters().Select(x => x.ParameterType).ToArray()); + public static InquiryData? Create(string titleText, string text, bool isAffirmativeOptionShown, bool isNegativeOptionShown, string affirmativeText, string negativeText, Action affirmativeAction, Action negativeAction) { @@ -77,6 +82,9 @@ private delegate MultiSelectionInquiryData V2MultiDelegate(string titleText, str if (V2Multi is not null) return V2Multi(titleText, descriptionText, inquiryElements, isExitShown, minSelectableOptionCount, maxSelectableOptionCount, affirmativeText, negativeText, affirmativeAction, negativeAction); + if (V3Multi is not null) + return V3Multi(titleText, descriptionText, inquiryElements, isExitShown, minSelectableOptionCount, maxSelectableOptionCount, affirmativeText, negativeText, affirmativeAction, negativeAction); + return null; }