From f996f9fabfb17d3d6c50eeb48370b5c6929c978f Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Mon, 5 Feb 2024 21:53:05 +0200 Subject: [PATCH 1/2] Switched the order of IsPressed and IsDown hotkey checks (cherry picked from commit 1d2507ea9a6b0c361ed12f81579f80dbc174f89d) --- .../HotKeys/HotKeySubSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeySubSystem.cs b/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeySubSystem.cs index 2cd0cada..5db645c2 100644 --- a/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeySubSystem.cs +++ b/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeySubSystem.cs @@ -58,10 +58,10 @@ private static void OnApplicationTick(float dt) var hotKey = HotKeyManagerImplementation.GlobalHotKeyStorage[i]; if (!hotKey.ShouldExecute() || hotKey.GameKey is null) continue; - if (hotKey.GameKey.KeyboardKey?.InputKey.IsDown() == true || hotKey.GameKey.ControllerKey?.InputKey.IsDown() == true) - hotKey.IsDownInternal(); if (hotKey.GameKey.KeyboardKey?.InputKey.IsPressed() == true || hotKey.GameKey.ControllerKey?.InputKey.IsPressed() == true) hotKey.OnPressedInternal(); + if (hotKey.GameKey.KeyboardKey?.InputKey.IsDown() == true || hotKey.GameKey.ControllerKey?.InputKey.IsDown() == true) + hotKey.IsDownInternal(); if (hotKey.GameKey.KeyboardKey?.InputKey.IsReleased() == true || hotKey.GameKey.ControllerKey?.InputKey.IsReleased() == true) hotKey.OnReleasedInternal(); } From de9df74285075443ab9df9c8fab60b6b9e366094 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Thu, 15 Feb 2024 20:21:13 +0200 Subject: [PATCH 2/2] Switched the order of IsPressed and IsDown hotkey checks --- build/common.props | 2 +- changelog.txt | 4 ++++ .../HotKeys/HotKeyManagerImplementation.cs | 2 +- .../ObjectSystem/MBObjectExtensionDataStore.cs | 2 +- supported-game-versions.txt | 5 +++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build/common.props b/build/common.props index 60220daf..529fb13b 100644 --- a/build/common.props +++ b/build/common.props @@ -4,7 +4,7 @@ - 2.8.15 + 2.8.16 2.2.2 3.2.0.77 diff --git a/changelog.txt b/changelog.txt index e5ad2e81..491a0768 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ --------------------------------------------------------------------------------------------------- +Version: 2.8.16 +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.x +* Fixed an issue with the new JsonSerializer overload +--------------------------------------------------------------------------------------------------- Version: 2.8.15 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.4 * Fixed an issue with the new JsonSerializer overload diff --git a/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeyManagerImplementation.cs b/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeyManagerImplementation.cs index f11cf93a..fbfb9cd5 100644 --- a/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeyManagerImplementation.cs +++ b/src/Bannerlord.ButterLib.Implementation/HotKeys/HotKeyManagerImplementation.cs @@ -53,7 +53,7 @@ public override IReadOnlyList Build() #if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 TWHotKeyManager.RegisterInitialContexts(new[] { hotKeyCategoryContainer }, true); -#elif v120 || v121 || v122 || v123 || v124 +#elif v120 || v121 || v122 || v123 || v124 || v125 || v126 || v127 || v128 || v129 TWHotKeyManager.RegisterInitialContexts(TWHotKeyManager.GetAllCategories().ToList().Concat(new[] { hotKeyCategoryContainer }), true); #else #error DEFINE diff --git a/src/Bannerlord.ButterLib.Implementation/ObjectSystem/MBObjectExtensionDataStore.cs b/src/Bannerlord.ButterLib.Implementation/ObjectSystem/MBObjectExtensionDataStore.cs index 0ac6e0b2..ec0b7254 100755 --- a/src/Bannerlord.ButterLib.Implementation/ObjectSystem/MBObjectExtensionDataStore.cs +++ b/src/Bannerlord.ButterLib.Implementation/ObjectSystem/MBObjectExtensionDataStore.cs @@ -108,7 +108,7 @@ private sealed record DataKey([field: SaveableField(0)] MBGUID ObjectId, [field: #if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 private sealed class SavedTypeDefiner : SaveableCampaignBehaviorTypeDefiner -#elif v120 || v121 || v122 || v123 || v124 +#elif v120 || v121 || v122 || v123 || v124 || v125 || v126 || v127 || v128 || v129 private sealed class SavedTypeDefiner : SaveableTypeDefiner #else #error DEFINE diff --git a/supported-game-versions.txt b/supported-game-versions.txt index ca8d081b..512eaa46 100644 --- a/supported-game-versions.txt +++ b/supported-game-versions.txt @@ -1,3 +1,8 @@ +v1.2.9 +v1.2.8 +v1.2.7 +v1.2.6 +v1.2.5 v1.2.4 v1.1.6 v1.1.5