Skip to content

Commit

Permalink
Fixed Settings Pack creation
Browse files Browse the repository at this point in the history
Deps update
  • Loading branch information
Aragas committed Dec 28, 2023
1 parent 94382b4 commit 45b1484
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<GameVersionWithPrefix>v$(GameVersion)</GameVersionWithPrefix>
<Version>5.9.2</Version>
<HarmonyVersion>2.2.2</HarmonyVersion>
<ButterLibVersion>2.8.11</ButterLibVersion>
<UIExtenderExVersion>2.8.0</UIExtenderExVersion>
<BuildResourcesVersion>1.1.0.102</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.137</BUTRSharedVersion>
<ButterLibVersion>2.8.15</ButterLibVersion>
<UIExtenderExVersion>2.8.1</UIExtenderExVersion>
<BuildResourcesVersion>1.1.0.104</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.138</BUTRSharedVersion>
<BUTRDependencyInjectionVersion>2.0.0.52</BUTRDependencyInjectionVersion>
<BUTRModuleManagerVersion>5.0.209</BUTRModuleManagerVersion>
<BUTRModuleManagerVersion>5.0.221</BUTRModuleManagerVersion>
<HarmonyExtensionsVersion>3.2.0.77</HarmonyExtensionsVersion>
<HarmonyAnalyzerVersion>1.0.1.50</HarmonyAnalyzerVersion>
<LightInjectVersion>6.6.4</LightInjectVersion>
Expand Down Expand Up @@ -59,7 +59,7 @@
</PropertyGroup>
<!--SorceLink-->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
<!--CI Builds-->
<ItemGroup Condition="$(TargetFramework) == 'net472' AND $(OS) != 'Windows_NT'">
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/MCM.Publish/MCM.Publish.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<PropertyGroup Condition="$(TargetFramework) == 'net472'">
<BuildForWindows>true</BuildForWindows>
</PropertyGroup>
<BuildForWindowsStore>true</BuildForWindowsStore>
<PropertyGroup Condition="$(TargetFramework) == 'net6'">
<BuildForWindowsStore>true</BuildForWindowsStore>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/MCM.UI/Utils/InquiryDataUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ internal static class InquiryDataUtils
private static readonly V2MultiDelegate? V2Multi =
AccessTools2.GetConstructorDelegate<V2MultiDelegate>(typeof(MultiSelectionInquiryData), typeof(V2MultiDelegate).GetMethod("Invoke").GetParameters().Select(x => x.ParameterType).ToArray());

private delegate MultiSelectionInquiryData V3MultiDelegate(string titleText, string descriptionText, List<InquiryElement> inquiryElements, bool isExitShown, int minSelectableOptionCount, int maxSelectableOptionCount,
string affirmativeText, string negativeText, Action<List<InquiryElement>> affirmativeAction, Action<List<InquiryElement>> negativeAction, string soundEventPath = "", bool isSeachAvailable = false);
private static readonly V3MultiDelegate? V3Multi =
AccessTools2.GetConstructorDelegate<V3MultiDelegate>(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)
{
Expand Down Expand Up @@ -77,6 +82,9 @@ internal static class InquiryDataUtils
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;
}

Expand Down

0 comments on commit 45b1484

Please sign in to comment.