Skip to content

Commit f31691c

Browse files
committed
more changes
1 parent c9f7c01 commit f31691c

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎BuyableInstaMonkeys.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
global using BTD_Mod_Helper.Extensions;
22
using HarmonyLib;
3+
using BTD_Mod_Helper.Api;
34
using Il2CppAssets.Scripts.Models.Profile;
45
using Il2CppAssets.Scripts.Unity;
56
using Il2CppAssets.Scripts.Unity.UI_New.Main.PowersSelect;
@@ -86,6 +87,7 @@ internal static void BuyInsta(InstaTowerScreen screen, StoreOffer offer)
8687

8788
if (player.GetMonkeyMoney() < offer.Price)
8889
{
90+
Game.instance.audioFactory.PlaySoundFromUnity(screen.click1Sound, "BuyableInstaMonkeysNoMoney");
8991
ModHelper.Msg<BuyableInstaMonkeys>("Not enough Monkey Money to buy an Insta Monkey.");
9092
return;
9193
}
@@ -95,6 +97,7 @@ internal static void BuyInsta(InstaTowerScreen screen, StoreOffer offer)
9597
player.SpendMonkeyMoney(offer.Price, "Buyable Insta Monkey");
9698
player.AddInstaTower(towerId, new Il2CppStructArray<int>(tiers), 1);
9799
player.SaveNow();
100+
ModContent.GetAudioClip<BuyableInstaMonkeys>("UIGetGold").Play("BuyableInstaMonkeysPurchase");
98101

99102
screen.UpdateTypesCounts();
100103
ModHelper.Msg<BuyableInstaMonkeys>($"Bought a {towerId} {tiers[0]}-{tiers[1]}-{tiers[2]} Insta Monkey for {offer.Price} Monkey Money.");
@@ -166,6 +169,7 @@ private static int[] GetRandomUpgradeTiers(int? requiredMainTier = null)
166169
}
167170

168171
private static int GetMainTier(int[] tiers) => Mathf.Max(tiers[0], Mathf.Max(tiers[1], tiers[2]));
172+
169173
}
170174

171175
[HarmonyPatch(typeof(InstaTowerScreen), nameof(InstaTowerScreen.Awake))]

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
[unreleased]: https://github.com/modforgeyt/BuyableInstaMonkeys/compare/btd6-mod...HEAD
1313
[btd6-mod]: https://github.com/modforgeyt/BuyableInstaMonkeys/compare/v1.0.0...btd6-mod
1414
[v1.0.0]: https://github.com/modforgeyt/BuyableInstaMonkeys/compare/43ed6551fe71cfddc1cd5fa3dcb59d6b30fed846...v1.0.0
15-
>>>>>>> d1a3d5af93fe88d1e6ad9ae796cfe4a630262f83
15+
>>>>>>> d1a3d5af93fe88d1e6ad9ae796cfe4a630262f83

‎UIGetGold.ogg‎

8.95 KB
Binary file not shown.

‎something.png‎

144 KB
Loading

0 commit comments

Comments
 (0)