From d6c708b4176bc66d2a3b6edabfc543461a8c0f14 Mon Sep 17 00:00:00 2001 From: Jonyboylovespie <90563990+Jonyboylovespie@users.noreply.github.com> Date: Sun, 6 Nov 2022 16:21:10 -0500 Subject: [PATCH] Add files via upload --- BananaFarmParagon.cs | 83 +++++--------------------------------------- ModHelperData.cs | 2 +- 2 files changed, 10 insertions(+), 75 deletions(-) diff --git a/BananaFarmParagon.cs b/BananaFarmParagon.cs index dc543a9..46ada7f 100644 --- a/BananaFarmParagon.cs +++ b/BananaFarmParagon.cs @@ -50,8 +50,11 @@ namespace BananaFarmParagon { public class Main : BloonsTD6Mod { - public override void OnNewGameModel(GameModel gameModel) + public override void OnNewGameModel(GameModel gameModel, Il2CppSystem.Collections.Generic.List mods) { + + gameModel.GetParagonUpgradeForTowerId("BananaFarm").cost = CostHelper.CostForDifficulty(Settings.ParagonCost, mods); + foreach (var towerModel in gameModel.towers) { if (towerModel.appliedUpgrades.Contains(ModContent.UpgradeID())) @@ -79,22 +82,10 @@ public override void OnNewGameModel(GameModel gameModel) } } } - public static bool Cheating; public override void OnMainMenu() { base.OnMainMenu(); - //cheats popup - - if (Cheating == true) - { - PopupScreen.instance.ShowEventPopup(PopupScreen.Placement.menuCenter, "Cheat Mods Detected", "Cheat mods have been detected. To remove this message hold down ALT + F4 to close your game, then remove your cheat mods. If not then you will not be able to continue to the game. Have fun staring at this popup! :) :) :) :) :) :) :) :) :) :) :) :)", "Neither Does This", (Action)null, "This Does Nothing", (Action)null, Popup.TransitionAnim.AnimIndex, 38); - } - else - { - - } - //Op melon msg @@ -115,70 +106,9 @@ public override void OnMainMenu() } } - } public override void OnApplicationStart() { - - //cheats check - - if (ModContent.HasMod("BTD6 All Trophy Store Items Unlocker")) - { - Cheating = true; - } - if (ModContent.HasMod("BTD6 Boss Bloons In Sandbox")) - { - Cheating = true; - } - if (ModContent.HasMod("BTD6 Golden Bloon In Sandbox")) - { - Cheating = true; - } - if (ModContent.HasMod("BTD6 Infinite Monkey Knowledge")) - { - Cheating = true; - } - if (ModContent.HasMod("BTD6 Infinite Monkey Money")) - { - Cheating = true; - } - if (ModContent.HasMod("BTD6 Infinite Tower XP")) - { - Cheating = true; - } - if (ModContent.HasMod("Gurren Core")) - { - Cheating = true; - } - if (ModContent.HasMod("infinite_xp")) - { - Cheating = true; - } - if (ModContent.HasMod("NKHook6")) - { - Cheating = true; - } - if (ModContent.HasMod("NoAbilityCoolDown")) - { - Cheating = true; - } - if (ModContent.HasMod("UnlockAllMaps")) - { - Cheating = true; - } - if (ModContent.HasMod("UnlockDoubleCash")) - { - Cheating = true; - } - if (ModContent.HasMod("xpfarming")) - { - Cheating = true; - } - else - { - - } - MelonLogger.Msg(ConsoleColor.Yellow, "The great one... Is ready..."); } } @@ -196,6 +126,11 @@ public class Settings : ModSettings description = "Toggles the popup on main menu that tells you what version of the banana farm paragon you are on", button = true, }; + public static readonly ModSettingInt ParagonCost = new(1000000) + { + displayName = "Paragon Totem Cost", + min = 0 + }; } public class Paragon { diff --git a/ModHelperData.cs b/ModHelperData.cs index e88eac0..53895d0 100644 --- a/ModHelperData.cs +++ b/ModHelperData.cs @@ -2,7 +2,7 @@ { public static class ModHelperData { - public const string Version = "1.0.1"; + public const string Version = "1.0.2"; public const string Name = "Banana Farm Paragon"; public const string Description = "This mod adds a paragon upgrade to the banana farm. You can toggle this mod from balanced to OP in mod settings.

" +