-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf2fb67
commit 5c139c4
Showing
3 changed files
with
32 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
- Preliminary fixes for v40.0 (thanks @KosmicShovel!) | ||
- Updates for v40.0 UpgradeTypes, VanillaSprites, etc | ||
- The `TopPathUpgrades`, `MiddlePathUpgrades` and `BottomPathUpgrades` properties no longer need to be manually specified for `ModTower`s, they will be inferred | ||
- Same goes for `MaxLevel` in `ModHero` | ||
- Added a `Model.RemoveBehaviors()` extension (no type argument) that simply clears all behaviors | ||
- Fixed a possible visual error with ModSettingFile and ModSettingFolder | ||
- Let a number of api methods use params arguments | ||
- Added GetBloonDisplay method to ModDisplay.cs (thanks @DarkTerraYT!) | ||
- Fixed hints for custom round sets |
24 changes: 24 additions & 0 deletions
24
BloonsTD6 Mod Helper/Patches/InGame/InGame_CheckAndShowHintMessage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using BTD_Mod_Helper.Api.Bloons; | ||
using Il2CppAssets.Scripts.Unity; | ||
using Il2CppAssets.Scripts.Unity.UI_New.InGame; | ||
namespace BTD_Mod_Helper.Patches; | ||
|
||
[HarmonyPatch(typeof(InGame), nameof(InGame.CheckAndShowHintMessage))] | ||
internal static class InGame_CheckAndShowHintMessage | ||
{ | ||
[HarmonyPrefix] | ||
private static bool Prefix(InGame __instance) | ||
{ | ||
if (!ModRoundSet.Cache.TryGetValue(__instance.GetGameModel().roundSet.name, out var modRoundSet)) return true; | ||
|
||
if ((modRoundSet.AlwaysShowHints || Game.Player.Data.inGameSettings.gameHints) && | ||
modRoundSet.GetHint(__instance.UnityToSimulation.GetCurrentRound() + 1) is string hint) | ||
{ | ||
__instance.roundHintTxt.SetText(hint); | ||
__instance.roundHintAnimator.SetIntegerString("AnimIndex", 1); | ||
__instance.roundHintTimer = __instance.roundHintAutoHideTime; | ||
} | ||
|
||
return false; | ||
} | ||
} |