Skip to content

Commit

Permalink
Merge pull request #345 from BUTR/dev
Browse files Browse the repository at this point in the history
v2.8.8
  • Loading branch information
Aragas authored Jul 6, 2023
2 parents 0d840f6 + ed0e840 commit 41744b6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--Development Variables-->
<PropertyGroup>
<!--Module Version-->
<Version>2.8.7</Version>
<Version>2.8.8</Version>
<!--Harmony Version-->
<HarmonyVersion>2.2.2</HarmonyVersion>
<HarmonyExtensionsVersion>3.2.0.77</HarmonyExtensionsVersion>
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.8.8
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
* Support for v1.2.1
* Proper Watchdog disabling
---------------------------------------------------------------------------------------------------
Version: 2.8.7
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
* Small performance improvement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override IReadOnlyList<HotKeyBase> Build()

#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
TWHotKeyManager.RegisterInitialContexts(new[] { hotKeyCategoryContainer }, true);
#elif v120
#elif v120 || v121
TWHotKeyManager.RegisterInitialContexts(TWHotKeyManager.GetAllCategories().ToList().Concat(new[] { hotKeyCategoryContainer }), true);
#else
#error DEFINE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private sealed class DataKey : IEquatable<DataKey>

#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
private sealed class SavedTypeDefiner : SaveableCampaignBehaviorTypeDefiner
#elif v120
#elif v120 || v121
private sealed class SavedTypeDefiner : SaveableTypeDefiner
#else
#error DEFINE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Bannerlord.ButterLib.SubSystems.Settings;

using HarmonyLib;
using HarmonyLib.BUTR.Extensions;

using System;
using System.Collections.Generic;
Expand All @@ -15,6 +16,10 @@ namespace Bannerlord.ButterLib.ExceptionHandler
[BLSEInterceptor]
internal sealed class ExceptionHandlerSubSystem : ISubSystem, ISubSystemSettings<ExceptionHandlerSubSystem>
{
private delegate void DetachWatchdogDelegate();
private static readonly DetachWatchdogDelegate DetachWatchdog =
AccessTools2.GetDelegate<DetachWatchdogDelegate>("TaleWorlds.Engine.Utilities:DetachWatchdog");

public static ExceptionHandlerSubSystem? Instance { get; private set; }

internal readonly Harmony Harmony = new("Bannerlord.ButterLib.ExceptionHandler.BEW");
Expand Down Expand Up @@ -76,6 +81,7 @@ public void Enable()
if (!_wasButrLoaderInterceptorCalled)
{
BEWPatch.Enable(Harmony);
DetachWatchdog?.Invoke();
}
}

Expand Down
1 change: 1 addition & 0 deletions supported-game-versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
v1.2.1
v1.2.0
v1.1.5
v1.1.4
Expand Down

0 comments on commit 41744b6

Please sign in to comment.