-
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
a4c904e
commit 8eb4c56
Showing
3 changed files
with
5 additions
and
6 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
7 changes: 3 additions & 4 deletions
7
BloonsTD6 Mod Helper/Patches/UI/TowerSelectionMenu_UpgradeTower.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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
using Assets.Scripts.Models.Towers.Upgrades; | ||
using Assets.Scripts.Unity.UI_New.InGame.TowerSelectionMenu; | ||
using Assets.Scripts.Unity.UI_New.InGame.TowerSelectionMenu; | ||
using HarmonyLib; | ||
|
||
namespace BTD_Mod_Helper.Patches.UI | ||
{ | ||
/// <summary> | ||
/// This is a benign patch that helps fix unexpected issues with changing upgrade restrictions | ||
/// </summary> | ||
[HarmonyPatch(typeof(TowerSelectionMenu), nameof(TowerSelectionMenu.UpgradeTower), typeof(UpgradeModel), typeof(int), typeof(float))] | ||
[HarmonyPatch(typeof(TowerSelectionMenu), nameof(TowerSelectionMenu.TowerUpgraded))] | ||
internal class TowerSelectionMenu_UpgradeTower | ||
{ | ||
[HarmonyPostfix] | ||
internal static void Postfix(TowerSelectionMenu __instance) | ||
{ | ||
__instance.InitUpgradeButtons(); | ||
__instance.triggerUiUpdate = true; | ||
} | ||
} | ||
} |