Skip to content

Commit

Permalink
Fix Spawner patch
Browse files Browse the repository at this point in the history
  • Loading branch information
doombubbles committed Apr 8, 2024
1 parent 82e1d04 commit d00c096
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions BloonsTD6 Mod Helper/MelonMain.Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
using BTD_Mod_Helper.Api.Helpers;
using BTD_Mod_Helper.Api.Internal;
using BTD_Mod_Helper.Api.ModOptions;
using Il2CppAssets.Scripts.Unity.UI_New.InGame;
using Il2CppAssets.Scripts.Unity.UI_New.Popups;
using UnityEngine;
using static BTD_Mod_Helper.Api.Enums.VanillaSprites;

namespace BTD_Mod_Helper;
Expand Down
1 change: 1 addition & 0 deletions BloonsTD6 Mod Helper/MelonMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Il2CppAssets.Scripts.Data;
using Il2CppAssets.Scripts.Unity;
using Il2CppAssets.Scripts.Unity.UI_New.InGame;
using Il2CppAssets.Scripts.Unity.UI_New.InGame.TowerSelectionMenu;
using Newtonsoft.Json.Linq;
using TaskScheduler = BTD_Mod_Helper.Api.TaskScheduler;
[assembly: MelonInfo(typeof(MelonMain), ModHelper.Name, ModHelper.Version, ModHelper.Author)]
Expand Down
4 changes: 2 additions & 2 deletions BloonsTD6 Mod Helper/Patches/Spawners/Spawner_Emit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ namespace BTD_Mod_Helper.Patches.Spawners;
internal static class Spawner_Emit
{
[HarmonyPostfix]
private static void Postfix(Spawner __instance, BloonModel bloon, int roundNumber, int emissionIndex,
private static void Postfix(Spawner __instance, BloonModel bloonModel, int roundNumber, int emissionIndex,
float startingDist, ref Bloon __result)
{
var unref__result = __result;
ModHelper.PerformHook(mod =>
mod.OnBloonEmitted(__instance, bloon, roundNumber, emissionIndex, startingDist, ref unref__result));
mod.OnBloonEmitted(__instance, bloonModel, roundNumber, emissionIndex, startingDist, ref unref__result));
__result = unref__result;
}
}

0 comments on commit d00c096

Please sign in to comment.