-
Notifications
You must be signed in to change notification settings - Fork 118
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
ba496a9
commit e0c77c1
Showing
6 changed files
with
38 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using BTD_Mod_Helper.Api.Towers; | ||
using Il2CppAssets.Scripts.Unity.UI_New.Main.MonkeySelect; | ||
namespace BTD_Mod_Helper.Patches.UI; | ||
|
||
[HarmonyPatch(typeof(MonkeyButton), nameof(MonkeyButton.Init))] | ||
internal static class MonkeyButton_Init | ||
{ | ||
[HarmonyPostfix] | ||
private static void Postfix(MonkeyButton __instance) | ||
{ | ||
if (ModTowerHelper.ModTowerCache.TryGetValue(__instance.towerId, out var tower) && | ||
tower.ModTowerSet is { } towerSet) | ||
{ | ||
__instance.bgImage.SetSprite(towerSet.ContainerReference); | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
BloonsTD6 Mod Helper/Patches/UI/UpgradeScreen_UpdatePortraitBackground.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,17 @@ | ||
using BTD_Mod_Helper.Api.Towers; | ||
using Il2CppAssets.Scripts.Unity.UI_New.Upgrade; | ||
namespace BTD_Mod_Helper.Patches.UI; | ||
|
||
[HarmonyPatch(typeof(UpgradeScreen), nameof(UpgradeScreen.UpdatePortraitBackground))] | ||
internal static class UpgradeScreen_UpdatePortraitBackground | ||
{ | ||
[HarmonyPostfix] | ||
private static void Postfix(UpgradeScreen __instance) | ||
{ | ||
if (ModTowerHelper.ModTowerCache.TryGetValue(__instance.currTowerId, out var tower) && | ||
tower.ModTowerSet is { } towerSet) | ||
{ | ||
__instance.selectedUpgrade.portraitBackground.SetSprite(towerSet.ContainerReference); | ||
} | ||
} | ||
} |
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