From 6fbd6fbd390d6e707591f458d9f4a841dc2f6116 Mon Sep 17 00:00:00 2001 From: doombubbles Date: Tue, 8 Oct 2024 22:19:24 -0700 Subject: [PATCH] Further fixes for v45 --- .../Api/Helpers/TimeHelper.cs | 19 +++++++++ BloonsTD6 Mod Helper/Api/ModByteLoader.cs | 19 ++++----- .../Api/ModContent.Methods.cs | 9 +++++ .../Api/Towers/ModTowerHelper.cs | 5 ++- .../Il2CppGenericIEnumerableExt.cs | 2 +- .../LINQExtensions/Il2CppGenerics.cs | 10 ++--- .../UnityExtensions/AudioClipExt.cs | 4 +- BloonsTD6 Mod Helper/LATEST.md | 7 +++- BloonsTD6 Mod Helper/ModHelper.cs | 2 +- .../ResourceLoader_OnSpriteLoaded.cs | 35 +++++++++++++++++ .../Sim/TimeManager_FastForwardTimeScale.cs | 16 ++++++++ ...TimeManager_MaxSimulationStepsPerUpdate.cs | 15 +++++++ .../Patches/Sim/TimeManager_Update.cs | 32 +++++++++++++++ .../BTD_Mod_Helper.Api.Helpers.TimeHelper.md | 39 +++++++++++++++++++ .../BTD_Mod_Helper.Api.ModContent.md | 20 ++++++++++ ...d_Helper.Extensions.AudioClipExtensions.md | 2 +- ....Extensions.Il2CppGenericIEnumerableExt.md | 2 +- ...TD_Mod_Helper.Extensions.Il2CppGenerics.md | 10 ++--- Documentation/README.md | 1 + Website/src/css/bootstrap.scss | 1 + Website/src/lib/mod-helper-data.ts | 2 +- 21 files changed, 222 insertions(+), 30 deletions(-) create mode 100644 BloonsTD6 Mod Helper/Api/Helpers/TimeHelper.cs create mode 100644 BloonsTD6 Mod Helper/Patches/Resources/ResourceLoader_OnSpriteLoaded.cs create mode 100644 BloonsTD6 Mod Helper/Patches/Sim/TimeManager_FastForwardTimeScale.cs create mode 100644 BloonsTD6 Mod Helper/Patches/Sim/TimeManager_MaxSimulationStepsPerUpdate.cs create mode 100644 BloonsTD6 Mod Helper/Patches/Sim/TimeManager_Update.cs create mode 100644 Documentation/BTD_Mod_Helper.Api.Helpers.TimeHelper.md diff --git a/BloonsTD6 Mod Helper/Api/Helpers/TimeHelper.cs b/BloonsTD6 Mod Helper/Api/Helpers/TimeHelper.cs new file mode 100644 index 000000000..b81986022 --- /dev/null +++ b/BloonsTD6 Mod Helper/Api/Helpers/TimeHelper.cs @@ -0,0 +1,19 @@ +using Il2CppAssets.Scripts; +using Il2CppAssets.Scripts.Utils; +namespace BTD_Mod_Helper.Api.Helpers; + +/// +/// Properties and methods for helping change in game time / time related values +/// +public static class TimeHelper +{ + /// + /// Override for + /// + public static double OverrideFastForwardTimeScale { get; set; } = Constants.fastForwardTimeScaleMultiplier; + + /// + /// Override for + /// + public static double OverrideMaxSimulationStepsPerUpdate { get; set; } = Constants.maxSimulationStepsPerUpdate; +} \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/Api/ModByteLoader.cs b/BloonsTD6 Mod Helper/Api/ModByteLoader.cs index 8e07c4592..8965aaf3d 100644 --- a/BloonsTD6 Mod Helper/Api/ModByteLoader.cs +++ b/BloonsTD6 Mod Helper/Api/ModByteLoader.cs @@ -21,28 +21,29 @@ public abstract class ModByteLoader : ModContent internal static Task currentLoadTask; private static readonly string[] References = - { + [ "Il2CppAssets.Scripts.Models.Towers.TargetType" - }; + ]; private static readonly string[] Structs = - { + [ "Il2CppAssets.Scripts.Simulation.SMath.Vector3" - }; + ]; private static readonly string[] Enums = - { + [ "Il2CppAssets.Scripts.Models.Towers.TowerModel.TowerSize", "Il2CppAssets.Scripts.Models.Map.AreaType", "Il2CppAssets.Scripts.Models.TowerSets.TowerSet" - }; + ]; private static readonly string[] AssetRefTypes = - { + [ "SpriteReference", "PrefabReference", - "AudioSourceReference" - }; + "AudioSourceReference", + "AudioClipReference" + ]; /// /// The array of object that NinjaKiwi programmed the loader to utilize diff --git a/BloonsTD6 Mod Helper/Api/ModContent.Methods.cs b/BloonsTD6 Mod Helper/Api/ModContent.Methods.cs index 369a2424b..a04b28bba 100644 --- a/BloonsTD6 Mod Helper/Api/ModContent.Methods.cs +++ b/BloonsTD6 Mod Helper/Api/ModContent.Methods.cs @@ -138,6 +138,15 @@ public static SpriteReference GetSpriteReferenceOrDefault(string name) where { guidRef = guid }; + + /// + /// Returns a new AudioClipReference that uses the given guid + /// + /// The guid that you'd like to assign to the AudioClipReference + public static AudioClipReference CreateAudioClipReference(string guid) => new() + { + guidRef = guid + }; /// /// Creates a Prefab Reference for a ModDisplay diff --git a/BloonsTD6 Mod Helper/Api/Towers/ModTowerHelper.cs b/BloonsTD6 Mod Helper/Api/Towers/ModTowerHelper.cs index 8b11109a8..f5ecfc466 100644 --- a/BloonsTD6 Mod Helper/Api/Towers/ModTowerHelper.cs +++ b/BloonsTD6 Mod Helper/Api/Towers/ModTowerHelper.cs @@ -282,7 +282,7 @@ internal static void FinalizeHero(ModHero modHero) if (index >= 0) { var heroDetailsModel = - new HeroDetailsModel(modHero.Id, index, 20, 1, 0, 0,false); + new HeroDetailsModel(modHero.Id, index, 20, 1, 0, 0, false); Game.instance.model.AddHeroDetails(heroDetailsModel, index); var skinsData = GameData.Instance.skinsData; @@ -299,8 +299,9 @@ internal static void FinalizeHero(ModHero modHero) public static TowerModel CreateTowerModel(string name, string baseId = null, TowerSet towerSet = TowerSet.None) { var sprite = Il2CppSystem.Nullable.Unbox(ModContent.CreateSpriteReference("")); + var prefab = Il2CppSystem.Nullable.Unbox(ModContent.CreatePrefabReference("")); var display = ModContent.CreatePrefabReference(""); return new TowerModel(name, baseId ?? name, towerSet, display, icon: sprite, portrait: sprite, instaIcon: sprite, - emoteSpriteSmall: sprite, emoteSpriteLarge: sprite, secondarySelectionMenu: display); + emoteSpriteSmall: sprite, emoteSpriteLarge: sprite, secondarySelectionMenu: display, icon3D: prefab); } } \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/Extensions/CollectionExtensions/Il2CppGenericIEnumerableExt.cs b/BloonsTD6 Mod Helper/Extensions/CollectionExtensions/Il2CppGenericIEnumerableExt.cs index 7efe06326..b1b1b19df 100644 --- a/BloonsTD6 Mod Helper/Extensions/CollectionExtensions/Il2CppGenericIEnumerableExt.cs +++ b/BloonsTD6 Mod Helper/Extensions/CollectionExtensions/Il2CppGenericIEnumerableExt.cs @@ -63,7 +63,7 @@ public static Object GetItem(this IEnumerable enumerable, int index) /// /// /// - public static List ToIl2CppList(this IEnumerable enumerable) where T : Object + public static List ToIl2CppList(this IEnumerable enumerable) where T : Il2CppObjectBase { var il2CppList = new List(); diff --git a/BloonsTD6 Mod Helper/Extensions/LINQExtensions/Il2CppGenerics.cs b/BloonsTD6 Mod Helper/Extensions/LINQExtensions/Il2CppGenerics.cs index 197c44dd8..7f70b6f28 100644 --- a/BloonsTD6 Mod Helper/Extensions/LINQExtensions/Il2CppGenerics.cs +++ b/BloonsTD6 Mod Helper/Extensions/LINQExtensions/Il2CppGenerics.cs @@ -15,7 +15,7 @@ public static class Il2CppGenerics /// /// /// - public static T First(this List source, System.Func predicate) where T : Object => + public static T First(this List source, System.Func predicate) where T : Il2CppObjectBase => source.Cast>().First(predicate); /// @@ -25,7 +25,7 @@ public static T First(this List source, System.Func predicate) wh /// /// /// - public static T FirstOrDefault(this List source, System.Func predicate) where T : Object => + public static T FirstOrDefault(this List source, System.Func predicate) where T : Il2CppObjectBase => Enumerable.FirstOrDefault(source.Cast>(), predicate); /// @@ -35,7 +35,7 @@ public static T FirstOrDefault(this List source, System.Func pred /// /// /// - public static List Where(this List source, System.Func predicate) where T : Object => + public static List Where(this List source, System.Func predicate) where T : Il2CppObjectBase => source.Cast>().Where(predicate).ToIl2CppList(); /// @@ -45,7 +45,7 @@ public static List Where(this List source, System.Func predica /// /// /// - public static int FindIndex(this List source, System.Func predicate) where T : Object => + public static int FindIndex(this List source, System.Func predicate) where T : Il2CppObjectBase => source.FindIndex(predicate); /// @@ -63,7 +63,7 @@ public static int FindIndex(this List source, System.Func predica /// /// /// - public static bool Any(this List source, System.Func predicate) where T : Object + public static bool Any(this List source, System.Func predicate) where T : Il2CppObjectBase { foreach (var _ in source.Where(predicate)) { diff --git a/BloonsTD6 Mod Helper/Extensions/UnityExtensions/AudioClipExt.cs b/BloonsTD6 Mod Helper/Extensions/UnityExtensions/AudioClipExt.cs index be299c55f..d50d54937 100644 --- a/BloonsTD6 Mod Helper/Extensions/UnityExtensions/AudioClipExt.cs +++ b/BloonsTD6 Mod Helper/Extensions/UnityExtensions/AudioClipExt.cs @@ -10,11 +10,11 @@ public static class AudioClipExtensions /// /// Plays a sound through the default Game AudioFactory /// - /// The audio clip to play + /// The audio audioClip to play /// How loud it should be /// TODO group stuff public static void Play(this AudioClip audioClip, string groupId = "FX", float volume = 1f) { - Game.instance.audioFactory.PlaySoundFromUnity(audioClip, groupId, -1, 0, volume); + Game.instance.audioFactory.PlaySoundFromUnity(audioClip, groupId, -1, volume); } } \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/LATEST.md b/BloonsTD6 Mod Helper/LATEST.md index f82f36deb..b47699f41 100644 --- a/BloonsTD6 Mod Helper/LATEST.md +++ b/BloonsTD6 Mod Helper/LATEST.md @@ -1,10 +1,12 @@ +## NOTE: BTD6 v45 will require MelonLoader v0.6.5 to work +- Fixed for BTD6 v45.0 - Fixed a performance issue with the background Task Scheduler - Also added new `ScheduleType.WaitForSecondsScaled` that is affected by fast-forward mode - Added a `ModRoundSet.Rounds1Index` override that changes the behavior of the `ModifyRoundModels` methods to match the player facing 1, 2, 3 and not the internal 0, 1, 2. - This will become the default in a later Mod Helper update -- Updated the way VanillaSprites.cs is generated, so it no longer includes many "false positives" of Sprites that have - GUIDs but aren't properly able to be loaded on demand +- Updated the way VanillaSprites.cs is generated, so it no longer includes some duplicates and many "false positives" of + Sprites that have GUIDs but aren't properly able to be loaded on demand - Added a Renderer extension `.ReplaceColor(Color targetColor, Color replacementColor, float threshold)` that replaces all the colors in the main texture within a certain threshold of the target with a new color. - Added a Renderer extension `.AdjustHSV(float hueAdjust, float saturationAdjust, float valueAdjust)` that edits @@ -12,6 +14,7 @@ - Can also do `.AdjustHSV(float hueAdjust, float saturationAdjust, float valueAdjust, Color targetColor, float threshold)` to only apply the adjustment to certain colors in the texture +- Added `TimeHelper` class with properties `OverrideFastForwardTimeScale` and `OverrideMaxSimulationStepsPerUpdate` ### Custom Jukebox Tracks diff --git a/BloonsTD6 Mod Helper/ModHelper.cs b/BloonsTD6 Mod Helper/ModHelper.cs index 613ef553f..2788ef5ce 100644 --- a/BloonsTD6 Mod Helper/ModHelper.cs +++ b/BloonsTD6 Mod Helper/ModHelper.cs @@ -16,7 +16,7 @@ namespace BTD_Mod_Helper; public static class ModHelper { internal const string Name = "BloonsTD6 Mod Helper"; - internal const string Version = "3.2.1"; + internal const string Version = "3.3.0"; internal const string RepoOwner = "gurrenm3"; internal const string RepoName = "BTD-Mod-Helper"; internal const string Description = diff --git a/BloonsTD6 Mod Helper/Patches/Resources/ResourceLoader_OnSpriteLoaded.cs b/BloonsTD6 Mod Helper/Patches/Resources/ResourceLoader_OnSpriteLoaded.cs new file mode 100644 index 000000000..d768791d6 --- /dev/null +++ b/BloonsTD6 Mod Helper/Patches/Resources/ResourceLoader_OnSpriteLoaded.cs @@ -0,0 +1,35 @@ +using System; +using BTD_Mod_Helper.Api; +using BTD_Mod_Helper.Api.Internal; +using Il2CppNinjaKiwi.Common.ResourceUtils; +using UnityEngine; +using UnityEngine.AddressableAssets; +using UnityEngine.ResourceManagement.AsyncOperations; + +namespace BTD_Mod_Helper.Patches.Resources; + +/// +/// Fixes a weird bug that cropped up with v45 where custom sprites wouldn't always finish loading +///
+/// TODO investigate this further, fix initial flash of white square? +///
+[HarmonyPatch(typeof(ResourceLoader), nameof(ResourceLoader.OnSpriteLoaded))] +internal static class ResourceLoader_OnSpriteLoaded +{ + [HarmonyPrefix] + internal static void Prefix(ref AsyncOperationHandle handle) + { + if (handle.Succeeded() && + handle.Result == null && + handle.LocationName.Contains(ModContent.HijackSpriteAtlas + ".spriteatlasv2")) + { + var name = handle.LocationName + [(handle.LocationName.IndexOf("[", StringComparison.Ordinal) + 1)..^1]; + if (ResourceHandler.GetSprite(name) is Sprite spr) + { + handle = Addressables.Instance.ResourceManager.CreateCompletedOperation(spr, ""); + } + } + + } +} \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_FastForwardTimeScale.cs b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_FastForwardTimeScale.cs new file mode 100644 index 000000000..1d8e71dad --- /dev/null +++ b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_FastForwardTimeScale.cs @@ -0,0 +1,16 @@ +using System; +using BTD_Mod_Helper.Api.Helpers; +using Il2CppAssets.Scripts; +using Il2CppAssets.Scripts.Utils; +namespace BTD_Mod_Helper.Patches.Sim; + +[HarmonyPatch(typeof(TimeManager), nameof(TimeManager.FastForwardTimeScale), MethodType.Getter)] +internal static class TimeManager_FastForwardTimeScale +{ + [HarmonyPrefix] + internal static bool Prefix(ref double __result) + { + __result = TimeHelper.OverrideFastForwardTimeScale; + return false; + } +} \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_MaxSimulationStepsPerUpdate.cs b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_MaxSimulationStepsPerUpdate.cs new file mode 100644 index 000000000..800237c61 --- /dev/null +++ b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_MaxSimulationStepsPerUpdate.cs @@ -0,0 +1,15 @@ +using BTD_Mod_Helper.Api.Helpers; +using Il2CppAssets.Scripts.Utils; +namespace BTD_Mod_Helper.Patches.Sim; + +[HarmonyPatch(typeof(TimeManager), nameof(TimeManager.MaxSimulationStepsPerUpdate), MethodType.Getter)] +internal static class TimeManager_MaxSimulationStepsPerUpdate +{ + [HarmonyPrefix] + internal static bool Prefix(ref double __result) + { + __result = TimeHelper.OverrideMaxSimulationStepsPerUpdate; + return false; + + } +} \ No newline at end of file diff --git a/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_Update.cs b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_Update.cs new file mode 100644 index 000000000..96a53bb22 --- /dev/null +++ b/BloonsTD6 Mod Helper/Patches/Sim/TimeManager_Update.cs @@ -0,0 +1,32 @@ +using BTD_Mod_Helper.Api.Helpers; +using Il2CppAssets.Scripts.Unity.Menu; +using Il2CppAssets.Scripts.Unity.UI_New.InGame; +using Il2CppAssets.Scripts.Utils; +using UnityEngine; +namespace BTD_Mod_Helper.Patches.Sim; + +/// +/// Sadly the FastForwardTimeScale call seems to have been inlined for 45.0 +/// +[HarmonyPatch(typeof(TimeManager), nameof(TimeManager.Update))] +internal static class TimeManager_Update +{ + [HarmonyPostfix] + internal static void Postfix() + { + if (InGame.Bridge == null || InGame.instance == null) return; + + var paused = InGame.instance.IsCoop + ? TimeManager.coopPaused + : !InGame.instance._reviewMapMode && TimeManager.gamePaused; + + var baseTime = paused ? 0 : 1; + var fastForwardScale = TimeManager.FastForwardActive && !TimeManager.inBetweenRounds + ? TimeHelper.OverrideFastForwardTimeScale + : 1; + + var time = baseTime * fastForwardScale * TimeManager.replayTimeScaleMultiplier; + + Time.timeScale = Mathf.Clamp((float) time, 0, 100); + } +} \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Api.Helpers.TimeHelper.md b/Documentation/BTD_Mod_Helper.Api.Helpers.TimeHelper.md new file mode 100644 index 000000000..afcb2a1d0 --- /dev/null +++ b/Documentation/BTD_Mod_Helper.Api.Helpers.TimeHelper.md @@ -0,0 +1,39 @@ +#### [BloonsTD6 Mod Helper](README.md 'README') +### [BTD_Mod_Helper.Api.Helpers](README.md#BTD_Mod_Helper.Api.Helpers 'BTD_Mod_Helper.Api.Helpers') + +## TimeHelper Class + +Properties and methods for helping change in game time / time related values + +```csharp +public static class TimeHelper +``` + +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 TimeHelper +### Properties + + + +## TimeHelper.OverrideFastForwardTimeScale Property + +Override for [Il2CppAssets.Scripts.Utils.TimeManager.FastForwardTimeScale](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.TimeManager.FastForwardTimeScale 'Il2CppAssets.Scripts.Utils.TimeManager.FastForwardTimeScale') + +```csharp +public static double OverrideFastForwardTimeScale { get; set; } +``` + +#### Property Value +[System.Double](https://docs.microsoft.com/en-us/dotnet/api/System.Double 'System.Double') + + + +## TimeHelper.OverrideMaxSimulationStepsPerUpdate Property + +Override for [Il2CppAssets.Scripts.Utils.TimeManager.MaxSimulationStepsPerUpdate](https://docs.microsoft.com/en-us/dotnet/api/Il2CppAssets.Scripts.Utils.TimeManager.MaxSimulationStepsPerUpdate 'Il2CppAssets.Scripts.Utils.TimeManager.MaxSimulationStepsPerUpdate') + +```csharp +public static double OverrideMaxSimulationStepsPerUpdate { get; set; } +``` + +#### Property Value +[System.Double](https://docs.microsoft.com/en-us/dotnet/api/System.Double 'System.Double') \ No newline at end of file diff --git a/Documentation/BTD_Mod_Helper.Api.ModContent.md b/Documentation/BTD_Mod_Helper.Api.ModContent.md index fd2ca2f29..04e5f8783 100644 --- a/Documentation/BTD_Mod_Helper.Api.ModContent.md +++ b/Documentation/BTD_Mod_Helper.Api.ModContent.md @@ -107,6 +107,26 @@ public static string BloonID() #### Returns [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + + +## ModContent.CreateAudioClipReference(string) Method + +Returns a new AudioClipReference that uses the given guid + +```csharp +public static AudioClipReference CreateAudioClipReference(string guid); +``` +#### Parameters + + + +`guid` [System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String') + +The guid that you'd like to assign to the AudioClipReference + +#### Returns +[Il2CppNinjaKiwi.Common.ResourceUtils.AudioClipReference](https://docs.microsoft.com/en-us/dotnet/api/Il2CppNinjaKiwi.Common.ResourceUtils.AudioClipReference 'Il2CppNinjaKiwi.Common.ResourceUtils.AudioClipReference') + ## ModContent.CreateAudioSourceReference(string) Method diff --git a/Documentation/BTD_Mod_Helper.Extensions.AudioClipExtensions.md b/Documentation/BTD_Mod_Helper.Extensions.AudioClipExtensions.md index a7541035f..1f366f77f 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.AudioClipExtensions.md +++ b/Documentation/BTD_Mod_Helper.Extensions.AudioClipExtensions.md @@ -27,7 +27,7 @@ public static void Play(this AudioClip audioClip, string groupId="FX", float vol `audioClip` [UnityEngine.AudioClip](https://docs.microsoft.com/en-us/dotnet/api/UnityEngine.AudioClip 'UnityEngine.AudioClip') -The audio clip to play +The audio audioClip to play diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerableExt.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerableExt.md index 14de7e7f0..94834abf1 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerableExt.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenericIEnumerableExt.md @@ -94,7 +94,7 @@ Return as Il2CppSystem.List ```csharp public static List ToIl2CppList(this IEnumerable enumerable) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters diff --git a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md index 74a57f303..fe092bb52 100644 --- a/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md +++ b/Documentation/BTD_Mod_Helper.Extensions.Il2CppGenerics.md @@ -20,7 +20,7 @@ Return whether or not there are any elements in this that match the predicate ```csharp public static bool Any(this List source, System.Func predicate) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters @@ -72,7 +72,7 @@ Return the index of the element that matches the predicate ```csharp public static int FindIndex(this List source, System.Func predicate) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters @@ -100,7 +100,7 @@ Return the first element that matches the predicate ```csharp public static T First(this List source, System.Func predicate) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters @@ -151,7 +151,7 @@ Return the first element that matches the predicate, or return default ```csharp public static T FirstOrDefault(this List source, System.Func predicate) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters @@ -252,7 +252,7 @@ Return all elements that match the predicate ```csharp public static List Where(this List source, System.Func predicate) - where T : Object; + where T : Il2CppObjectBase; ``` #### Type parameters diff --git a/Documentation/README.md b/Documentation/README.md index 88912d435..749529214 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -180,6 +180,7 @@ | [ProcessHelper](BTD_Mod_Helper.Api.Helpers.ProcessHelper.md 'BTD_Mod_Helper.Api.Helpers.ProcessHelper') | Helper methods for processes | | [ProjectileHelper](BTD_Mod_Helper.Api.Helpers.ProjectileHelper.md 'BTD_Mod_Helper.Api.Helpers.ProjectileHelper') | A wrapper around ProjectileModels for making them easier to create | | [QuickEdit](BTD_Mod_Helper.Api.Helpers.QuickEdit.md 'BTD_Mod_Helper.Api.Helpers.QuickEdit') | Utility for allowing the user to quickly edit some input in an external program | +| [TimeHelper](BTD_Mod_Helper.Api.Helpers.TimeHelper.md 'BTD_Mod_Helper.Api.Helpers.TimeHelper') | Properties and methods for helping change in game time / time related values | | [WeaponHelper](BTD_Mod_Helper.Api.Helpers.WeaponHelper.md 'BTD_Mod_Helper.Api.Helpers.WeaponHelper') | A wrapper around WeaponModels for making them easier to create | diff --git a/Website/src/css/bootstrap.scss b/Website/src/css/bootstrap.scss index eacfe4ee5..6c775074e 100644 --- a/Website/src/css/bootstrap.scss +++ b/Website/src/css/bootstrap.scss @@ -33,6 +33,7 @@ $theme-colors: ( [data-theme="light"] { --bs-link-color: #0000A1; + --bs-link-color-rgb: 0, 0, 161 } .fs-5 { diff --git a/Website/src/lib/mod-helper-data.ts b/Website/src/lib/mod-helper-data.ts index 7e064c367..5fc7e7bba 100644 --- a/Website/src/lib/mod-helper-data.ts +++ b/Website/src/lib/mod-helper-data.ts @@ -41,7 +41,7 @@ export const ModHelperRepoName = "BTD-Mod-Helper"; export const ModHelperRepoBranch = "master"; export const StoppedWorkingVersion = 34; -export const LatestVersion = 40; +export const LatestVersion = 45; export type ModHelperData = { // Serialized