Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SpeedyEnemies v1.1.2
SpeedyEnemies.dll
Decompiled 11 months agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using SpeedyEnemies.Patches; using UnityEngine; using UnityEngine.AI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("SpeedyEnemies")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SpeedyEnemies")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("afaf5352-a47d-4dbc-a78f-0b8683eb7098")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace SpeedyEnemies { [BepInPlugin("Poseidon.SpeedyEnemies", "Speedy Enemy Mod", "1.1.0.0")] public class SpeedBase : BaseUnityPlugin { private const string modGUID = "Poseidon.SpeedyEnemies"; private const string modName = "Speedy Enemy Mod"; private const string modVersion = "1.1.0.0"; private readonly Harmony harmony = new Harmony("Poseidon.SpeedyEnemies"); private static SpeedBase Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("Poseidon.SpeedyEnemies"); mls.LogInfo((object)"Speedy Enemies up and running!"); harmony.PatchAll(typeof(BaboonPatch)); harmony.PatchAll(typeof(BabyPatch)); harmony.PatchAll(typeof(BeePatch)); harmony.PatchAll(typeof(BlobPatch)); harmony.PatchAll(typeof(BrakenPatch)); harmony.PatchAll(typeof(ButlerBeePatch)); harmony.PatchAll(typeof(ButlerPatch)); harmony.PatchAll(typeof(CentipedePatch)); harmony.PatchAll(typeof(ClayPatch)); harmony.PatchAll(typeof(CoilPatch)); harmony.PatchAll(typeof(DoubleWingPatch)); harmony.PatchAll(typeof(GhostPatch)); harmony.PatchAll(typeof(GiantPatch)); harmony.PatchAll(typeof(JesterPatch)); harmony.PatchAll(typeof(KiwiPatch)); harmony.PatchAll(typeof(LootBugPatch)); harmony.PatchAll(typeof(MaskPatch)); harmony.PatchAll(typeof(MechPatch)); harmony.PatchAll(typeof(MouthDogPatch)); harmony.PatchAll(typeof(NutPatch)); harmony.PatchAll(typeof(PufferPatch)); harmony.PatchAll(typeof(SnakePatch)); harmony.PatchAll(typeof(SpiderPatch)); harmony.PatchAll(typeof(ThumberPatch)); harmony.PatchAll(typeof(WormPatch)); } } } namespace SpeedyEnemies.Patches { [HarmonyPatch(typeof(BaboonBirdAI))] internal class BaboonPatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void babPatch(ref BaboonBirdAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(BlobAI))] internal class BlobPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void blobPatch(ref BlobAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } } [HarmonyPatch(typeof(RedLocustBees))] internal class BeePatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void beePatch(ref RedLocustBees __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void beePatch2(ref RedLocustBees __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.acceleration *= 10f; } } [HarmonyPatch(typeof(FlowermanAI))] internal class BrakenPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void brakPatch(ref FlowermanAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(ButlerBeesEnemyAI))] internal class ButlerBeePatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void bulterPatch(ref ButlerBeesEnemyAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(ButlerEnemyAI))] internal class ButlerPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void bulterPatch(ref ButlerEnemyAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.acceleration *= 10f; } [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void bulterPatch2(ref ButlerEnemyAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(CentipedeAI))] internal class CentipedePatch { [HarmonyPatch("IncreaseSpeedSlowly")] [HarmonyPostfix] private static void CentiPatch(ref CentipedeAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(ClaySurgeonAI))] internal class ClayPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void clayPatch(ref ClaySurgeonAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(SpringManAI))] internal class CoilPatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void coilPatch(ref SpringManAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("Update")] [HarmonyPostfix] private static void coilPatch2(ref SpringManAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(DoublewingAI))] internal class DoubleWingPatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void wingbPatch(ref DoublewingAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(DressGirlAI))] internal class GhostPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void ghostPatch(ref DressGirlAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("BeginChasing")] [HarmonyPostfix] private static void ghostPatch2(ref DressGirlAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(ForestGiantAI))] internal class GiantPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void giantPatch(ref ForestGiantAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(JesterAI))] internal class JesterPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void jesterPatch2(ref JesterAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void jesterPatch(ref JesterAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("SetJesterInitialValues")] [HarmonyPostfix] private static void jesterPtach3(ref JesterAI __instance) { JesterAI obj = __instance; obj.popUpTimer /= 10f; JesterAI obj2 = __instance; obj2.beginCrankingTimer /= 10f; } } [HarmonyPatch(typeof(GiantKiwiAI))] internal class KiwiPatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void birbPatch(ref GiantKiwiAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } [HarmonyPatch("Update")] [HarmonyPostfix] private static void birbPatch2(ref GiantKiwiAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } } [HarmonyPatch(typeof(HoarderBugAI))] internal class LootBugPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void lootPatch(ref HoarderBugAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } } [HarmonyPatch(typeof(MaskedPlayerEnemy))] internal class MaskPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void maskPatch(ref MaskedPlayerEnemy __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(RadMechAI))] internal class MechPatch { [HarmonyPatch("DoFootstepCycle")] [HarmonyPostfix] private static void mechPatch(ref RadMechAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("SetChargingForwardOnLocalClient")] [HarmonyPostfix] private static void mechPatch2(ref RadMechAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.acceleration *= 10f; } } [HarmonyPatch(typeof(MouthDogAI))] internal class MouthDogPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void mouthDogPatch(ref MouthDogAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(CaveDwellerAI))] internal class BabyPatch { [HarmonyPatch("IncreaseBabyGrowthMeter")] [HarmonyPostfix] private static void babyPatch(ref CaveDwellerAI __instance) { CaveDwellerAI obj = __instance; obj.growthMeter *= 10f; } [HarmonyPatch("DoBabyAIInterval")] [HarmonyPostfix] private static void babyPatch2(ref CaveDwellerAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } [HarmonyPatch("BabyUpdate")] [HarmonyPostfix] private static void babyPatch3(ref CaveDwellerAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } [HarmonyPatch("becomeAdultAnimation")] [HarmonyPostfix] private static void babyPatch4(ref CaveDwellerAI __instance) { CaveDwellerAI obj = __instance; obj.leapSpeed *= 10f; } [HarmonyPatch("DoNonBabyUpdateLogic")] [HarmonyPostfix] private static void babyPatch5(ref CaveDwellerAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; NavMeshAgent agent2 = ((EnemyAI)__instance).agent; agent2.acceleration *= 10f; } } [HarmonyPatch(typeof(NutcrackerEnemyAI))] internal class NutPatch { [HarmonyPatch("TurnTorsoToTargetDegrees")] [HarmonyPostfix] private static void nutPatch(ref NutcrackerEnemyAI __instance) { NutcrackerEnemyAI obj = __instance; obj.torsoTurnSpeed *= 10f; } [HarmonyPatch("Update")] [HarmonyPostfix] private static void nutPatch2(ref NutcrackerEnemyAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(PufferAI))] internal class PufferPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void pufPatch(ref PufferAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(FlowerSnakeEnemy))] internal class SnakePatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void snakePatch2(ref FlowerSnakeEnemy __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } [HarmonyPatch(typeof(SandSpiderAI))] internal class SpiderPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void spiPatch(ref SandSpiderAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; SandSpiderAI obj = __instance; obj.spiderSpeed *= 10f; } } [HarmonyPatch(typeof(CrawlerAI))] internal class ThumberPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void ThumbPatch(ref CrawlerAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } [HarmonyPatch("CalculateAgentSpeed")] [HarmonyPostfix] private static void ThumbPatch2(ref CrawlerAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; CrawlerAI obj = __instance; obj.SpeedAccelerationEffect *= 10f; CrawlerAI obj2 = __instance; obj2.SpeedIncreaseRate *= 10f; } } [HarmonyPatch(typeof(SandWormAI))] internal class WormPatch { [HarmonyPatch("DoAIInterval")] [HarmonyPostfix] private static void wormPatch(ref SandWormAI __instance) { NavMeshAgent agent = ((EnemyAI)__instance).agent; agent.speed *= 10f; } } }