Skip to content

Commit 5b54a5f

Browse files
3.2.2
added bomb paragon and new map yeah
1 parent 172875c commit 5b54a5f

6 files changed

Lines changed: 41 additions & 13 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using BTD_Mod_Helper.Api.Enums;
2+
using Il2CppAssets.Scripts.Data.MapSets;
3+
4+
namespace BTD6Rogue;
5+
6+
public class ThreeMinesAround : RogueMap {
7+
8+
public override string InternalName => "ThreeMinesAround";
9+
public override string MapName => "Three Mines 'Round";
10+
11+
public override string MapImage => VanillaSprites.MapSelectThreeMinesAroundMapButton;
12+
13+
public override MapDifficulty GameDifficulty => MapDifficulty.Beginner;
14+
public override int RogueDifficulty => 0;
15+
16+
public override bool Water => false;
17+
18+
public override float[] TrackLengths => [0f];
19+
public override int[] TrackTypes => [0];
20+
}

Patch/MenuManager/MenuManager_CloseMenuInternal.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
namespace BTD6Rogue;
1111

12-
[HarmonyPatch(typeof(BTDMenuManager._CloseCurrentMenuInternal_d__72), nameof(BTDMenuManager._CloseCurrentMenuInternal_d__72.MoveNext))]
12+
[HarmonyPatch(typeof(BTDMenuManager._CloseCurrentMenuInternal_d__68), nameof(BTDMenuManager._CloseCurrentMenuInternal_d__68.MoveNext))]
1313
static class MenuManager_CloseCurrentMenuInternal {
1414
[HarmonyPrefix]
15-
static void Prefix(BTDMenuManager._CloseCurrentMenuInternal_d__72 __instance, out string __state) {
15+
static void Prefix(BTDMenuManager._CloseCurrentMenuInternal_d__68 __instance, out string __state) {
1616
__state = __instance._menuName_5__2;
1717
Il2CppSystem.ValueTuple<string, Object> lastStackedMenu = __instance.__4__this.menuStack[__instance.__4__this.menuStack.Count - 1];
1818

1919
if (__instance.__1__state == 0 && lastStackedMenu.Item1.Contains("ModdedMenu")) {
20-
__instance.__8__1 = new BTDMenuManager.__c__DisplayClass72_0();
20+
__instance.__8__1 = new BTDMenuManager.__c__DisplayClass68_0();
2121
__instance.__8__1.__4__this = __instance.__4__this;
2222
__instance.__4__this.IsClosingOrOpeningMenu = true;
2323
__instance.__8__1.closingMenu = __instance.__4__this.currMenu;
@@ -48,7 +48,7 @@ static void Prefix(BTDMenuManager._CloseCurrentMenuInternal_d__72 __instance, ou
4848
}
4949
}
5050
[HarmonyPostfix]
51-
static void Postfix(BTDMenuManager._CloseCurrentMenuInternal_d__72 __instance, string __state) {
51+
static void Postfix(BTDMenuManager._CloseCurrentMenuInternal_d__68 __instance, string __state) {
5252
if (__state != null && __state.Contains("ModdedMenu") && __instance.__4__this.menuStack.Count > 1) {
5353
string oldName = __state.Split("-")[0];
5454

Patch/MenuManager/MenuManager_LoadSceneAsync.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
namespace BTD6Rogue;
1111

12-
[HarmonyPatch(typeof(BTDMenuManager._LoadSceneAsync_d__49), nameof(BTDMenuManager._LoadSceneAsync_d__49.MoveNext))]
12+
[HarmonyPatch(typeof(BTDMenuManager._LoadSceneAsync_d__45), nameof(BTDMenuManager._LoadSceneAsync_d__45.MoveNext))]
1313
static class MenuManager_LoadSceneAsync {
1414
[HarmonyPrefix]
15-
static void Prefix(BTDMenuManager._LoadSceneAsync_d__49 __instance, out string __state) {
15+
static void Prefix(BTDMenuManager._LoadSceneAsync_d__45 __instance, out string __state) {
1616
__state = __instance.sceneName;
1717
if (__instance.__1__state == 0 && __instance.sceneName.Contains("ModdedMenu")) {
1818
string oldName = __instance.sceneName.Split("-")[0];
@@ -23,7 +23,7 @@ static void Prefix(BTDMenuManager._LoadSceneAsync_d__49 __instance, out string _
2323
}
2424

2525
[HarmonyPostfix]
26-
static void PostFix(BTDMenuManager._LoadSceneAsync_d__49 __instance, string __state) {
26+
static void PostFix(BTDMenuManager._LoadSceneAsync_d__45 __instance, string __state) {
2727
if (__instance.__1__state == -1 && __state.Contains("ModdedMenu")) {
2828
Scene newScene = SceneManager.CreateScene(__state, new CreateSceneParameters());
2929
Scene sceneFromName = SceneManager.GetSceneByName(__instance.sceneName);

Patch/MenuManager/MenuManager_OpenMenuInternal.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ namespace BTD6Rogue;
1414
// Praise the patch for it allows menus OF THE SAME TYPE TO BE STACKED OVER EACHOTHER!!!
1515
// TODO: Menus of the same type overwrite eachother in the stack making it so if you press the back button, in this case, it sends the user back to the main menu rather than the previous menu
1616
// TODO: Delete Il2Cpp and obfuscation from existence
17-
[HarmonyPatch(typeof(BTDMenuManager._OpenMenuInternal_d__67), nameof(BTDMenuManager._OpenMenuInternal_d__67.MoveNext))]
17+
[HarmonyPatch(typeof(BTDMenuManager._OpenMenuInternal_d__63), nameof(BTDMenuManager._OpenMenuInternal_d__63.MoveNext))]
1818
static class MenuManager_OpenMenuInternal {
1919
[HarmonyPrefix]
20-
static void Prefix(BTDMenuManager._OpenMenuInternal_d__67 __instance) {
20+
static void Prefix(BTDMenuManager._OpenMenuInternal_d__63 __instance) {
2121
bool isModdedMenu = false;
2222
ModMenuData mmd = null!;
2323
if (__instance.menuData != null) {
@@ -28,7 +28,7 @@ static void Prefix(BTDMenuManager._OpenMenuInternal_d__67 __instance) {
2828
}
2929
if (__instance.__1__state == 0 && isModdedMenu) {
3030
__instance.__1__state = 1;
31-
__instance.__8__1 = new BTDMenuManager.__c__DisplayClass67_0();
31+
__instance.__8__1 = new BTDMenuManager.__c__DisplayClass63_0();
3232
__instance.__8__1.__4__this = __instance.__4__this;
3333
__instance.__8__1.previousMenu = __instance.__4__this.currMenu;
3434

@@ -44,7 +44,7 @@ static void Prefix(BTDMenuManager._OpenMenuInternal_d__67 __instance) {
4444
}
4545
}
4646
[HarmonyPostfix]
47-
static void Postfix(BTDMenuManager._OpenMenuInternal_d__67 __instance) {
47+
static void Postfix(BTDMenuManager._OpenMenuInternal_d__63 __instance) {
4848
bool isModdedMenu = false;
4949
ModMenuData mmd = null!;
5050
if (__instance.menuData != null) {

Patch/MenuManager/MenuManager_UnloadSceneAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace BTD6Rogue;
66

7-
[HarmonyPatch(typeof(BTDMenuManager._UnloadSceneAsync_d__50), nameof(BTDMenuManager._UnloadSceneAsync_d__50.MoveNext))]
7+
[HarmonyPatch(typeof(BTDMenuManager._UnloadSceneAsync_d__46), nameof(BTDMenuManager._UnloadSceneAsync_d__46.MoveNext))]
88
static class MenuManager_UnloadSceneAsync {
99
[HarmonyPrefix]
10-
static void Prefix(BTDMenuManager._UnloadSceneAsync_d__50 __instance) {
10+
static void Prefix(BTDMenuManager._UnloadSceneAsync_d__46 __instance) {
1111
if (__instance.sceneName.Contains("ModdedMenu") && __instance.__1__state == 0) {
1212
__instance.__4__this.sceneInstanceDict.Remove(__instance.sceneName);
1313
Scene scene = SceneManager.GetSceneByName(__instance.sceneName);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Il2CppAssets.Scripts.Models.Towers;
2+
3+
namespace BTD6Rogue;
4+
5+
public class BallisticObliterationMissileBunker : RogueParagon {
6+
public override string DisplayName => "Ballistic Obliteration Missile Bunker";
7+
public override string BaseTowerId => "BombShooter";
8+
}

0 commit comments

Comments
 (0)