using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FullestAuto")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FullestAuto")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1607ba35-c779-4291-83cd-0245451a152c")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace FullestAuto;
[BepInPlugin("com.banana.FullestAuto", "FullestAuto", "1.0.0")]
public class FullestAutoPlugin : BaseUnityPlugin
{
public static ConfigEntry<bool> FullAutoWeapons;
public static ConfigEntry<bool> FullAutoEnemies;
public static ConfigEntry<bool> FullAutoAnims;
public static ConfigEntry<bool> FullAutoParticles;
public static ConfigEntry<bool> FullAutoSounds;
public static ConfigEntry<bool> FullAutoTime;
private const string MyGUID = "com.banana.FullestAuto";
private const string PluginName = "FullestAuto";
private const string VersionString = "1.0.0";
private static readonly Harmony Harmony = new Harmony("com.banana.FullestAuto");
public static ManualLogSource Log = new ManualLogSource("FullestAuto");
private void Start()
{
Harmony.PatchAll();
FullAutoEnemies = ((BaseUnityPlugin)this).Config.Bind<bool>("Full auto enemies", "", true, (ConfigDescription)null);
FullAutoWeapons = ((BaseUnityPlugin)this).Config.Bind<bool>("Full auto Weapons", "", true, (ConfigDescription)null);
FullAutoAnims = ((BaseUnityPlugin)this).Config.Bind<bool>("Enviroment", "Animations", false, (ConfigDescription)null);
FullAutoParticles = ((BaseUnityPlugin)this).Config.Bind<bool>("Enviroment", "Particles", false, (ConfigDescription)null);
FullAutoSounds = ((BaseUnityPlugin)this).Config.Bind<bool>("Enviroment", "Sounds", false, (ConfigDescription)null);
FullAutoTime = ((BaseUnityPlugin)this).Config.Bind<bool>("Not recommended", "Time", false, (ConfigDescription)null);
((Object)((Component)this).gameObject).hideFlags = (HideFlags)4;
}
private void Update()
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
if (FullAutoAnims.Value)
{
Animator[] array = Object.FindObjectsByType<Animator>((FindObjectsInactive)1, (FindObjectsSortMode)0);
Animator[] array2 = array;
foreach (Animator val in array2)
{
val.speed = 999f;
}
}
if (FullAutoParticles.Value)
{
ParticleSystem[] array3 = Object.FindObjectsByType<ParticleSystem>((FindObjectsInactive)1, (FindObjectsSortMode)0);
ParticleSystem[] array4 = array3;
foreach (ParticleSystem val2 in array4)
{
MainModule main = val2.main;
((MainModule)(ref main)).simulationSpeed = 999f;
}
}
if (FullAutoSounds.Value)
{
AudioSource[] array5 = Object.FindObjectsByType<AudioSource>((FindObjectsInactive)1, (FindObjectsSortMode)0);
AudioSource[] array6 = array5;
foreach (AudioSource val3 in array6)
{
val3.pitch = 999f;
}
}
if (FullAutoTime.Value)
{
Time.timeScale = 100f;
MonoSingleton<AssistController>.Instance.gameSpeed = 999f;
}
}
}
[HarmonyPatch("Update")]
public class NoCooldownsWeapons
{
[HarmonyPatch(typeof(Revolver))]
[HarmonyPrefix]
public static bool RevolverPrefx(Revolver __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.gunReady = true;
__instance.shootReady = true;
__instance.pierceShotCharge = 100f;
__instance.coinCharge = 500f;
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(Shotgun))]
[HarmonyPrefix]
public static bool ShotgunPrefx(Shotgun __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.gunReady = true;
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(Nailgun))]
[HarmonyPrefix]
public static bool NailgunPrefx(Nailgun __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.fireCooldown = 0f;
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(Railcannon))]
[HarmonyPrefix]
public static bool RailcannonPrefx(Railcannon __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.wc.raicharge = 5f;
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(RocketLauncher))]
[HarmonyPrefix]
public static bool RocketLauncherPrefx(RocketLauncher __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.rateOfFire = 0f;
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
__instance.napalmProjectileCooldown = 0f;
MonoSingleton<WeaponCharges>.Instance.rocketCannonballCharge = 1f;
MonoSingleton<WeaponCharges>.Instance.rocketFreezeTime = 1f;
MonoSingleton<WeaponCharges>.Instance.rocketNapalmFuel = 1f;
return true;
}
[HarmonyPatch(typeof(ShotgunHammer))]
[HarmonyPrefix]
public static bool ShotgunHammerPrefx(ShotgunHammer __instance)
{
if (!FullestAutoPlugin.FullAutoWeapons.Value)
{
return true;
}
__instance.gunReady = true;
__instance.anim.speed = 999f;
return true;
}
}
[HarmonyPatch]
public static class SceneHelperPatches
{
private static MethodBase TargetMethod()
{
return typeof(SceneHelper).GetMethod("SetParticlesColors", BindingFlags.Instance | BindingFlags.Public, null, new Type[2]
{
typeof(EnviroGibModifier[]),
typeof(HitSurfaceData).MakeByRefType()
}, null);
}
[HarmonyPrefix]
public static bool FastEnviroPart(EnviroGibModifier[] modifiers, ref HitSurfaceData hitSurfaceData)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
if (!FullestAutoPlugin.FullAutoParticles.Value)
{
return true;
}
ParticleSystem val = default(ParticleSystem);
for (int i = 0; i < modifiers.Length; i++)
{
if ((Object)(object)modifiers[i] != (Object)null && ((Component)modifiers[i]).TryGetComponent<ParticleSystem>(ref val))
{
EmissionModule emission = val.emission;
if (((EmissionModule)(ref emission)).burstCount > 0)
{
MainModule main = val.main;
((MainModule)(ref main)).simulationSpeed = 999f;
}
}
}
return true;
}
}
[HarmonyPatch]
public class NoCooldownsEnemy
{
[HarmonyPatch(typeof(RandomizeWind), "Start")]
[HarmonyPrefix]
public static bool FastBenjamin(RandomizeWind __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
if (((Object)((Component)__instance).gameObject).name == "CentaurAnimated")
{
((Component)__instance).gameObject.GetComponent<Animator>().speed = 999f;
}
return true;
}
[HarmonyPatch(typeof(Door), "Update")]
[HarmonyPrefix]
public static bool FastDoor(Door __instance)
{
if (!FullestAutoPlugin.FullAutoAnims.Value)
{
return true;
}
__instance.speed = 999f;
return true;
}
[HarmonyPatch(typeof(BigDoor), "Update")]
[HarmonyPrefix]
public static bool FastBigDoor(BigDoor __instance)
{
if (!FullestAutoPlugin.FullAutoAnims.Value)
{
return true;
}
__instance.speed = 999f;
__instance.tempSpeed = 999f;
return true;
}
[HarmonyPatch(typeof(Gabriel), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsGabe1(ref Gabriel __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCooldown = 0f;
__instance.readyTaunt = false;
return true;
}
[HarmonyPatch(typeof(Puppet), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsPuppet(ref Puppet __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(Stalker), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsStalker(ref Stalker __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(GabrielSecond), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsGabe2(ref GabrielSecond __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCooldown = 0f;
__instance.readyTaunt = false;
return true;
}
[HarmonyPatch(typeof(SisyphusPrime), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsSisyphus(ref SisyphusPrime __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
__instance.tauntCheck = false;
return true;
}
[HarmonyPatch(typeof(MinosPrime), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMinos(ref MinosPrime __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Sisyphus), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsSisyphusNormal(ref Sisyphus __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(ZombieProjectiles), "Update")]
[HarmonyPrefix]
private static bool UpdatePatch(ZombieProjectiles __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.coolDown = 0f;
__instance.blocking = false;
__instance.anim.speed = 999f;
__instance.swinging = false;
__instance.seekingPlayer = false;
__instance.wanderer = false;
__instance.afraid = false;
__instance.lengthOfStop = 1f;
return true;
}
[HarmonyPatch(typeof(Turret), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsZombieProj(ref Turret __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
__instance.kickCooldown = 0f;
__instance.maxAimTime = 0f;
return true;
}
[HarmonyPatch(typeof(EnemyCooldowns), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsEnemyCooldowns(ref EnemyCooldowns __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.ferrymanCooldown = 0f;
__instance.virtueCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Drone), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsDrone(ref Drone __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
if ((Object)(object)__instance.anim != (Object)null)
{
__instance.anim.speed = 999f;
}
__instance.attackCooldown = 0f;
__instance.dodgeCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(DroneFlesh), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsDroneFlesh(ref DroneFlesh __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Streetcleaner), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsStreetcleanah(ref Streetcleaner __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
__instance.dodgeCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(V2), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsRECONSTRUCTWHAT(ref V2 __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.shootCooldown = 0f;
__instance.altShootCooldown = 0f;
__instance.dodgeCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Mindflayer), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsHearMeOut(ref Mindflayer __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 99f;
__instance.cooldown = 0f;
__instance.beamCooldown = false;
return true;
}
[HarmonyPatch(typeof(Gutterman), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsHeavy(ref Gutterman __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.bulletCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(ZombieMelee), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsFilth(ref ZombieMelee __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.coolDown = 0f;
return true;
}
[HarmonyPatch(typeof(SwordsMachine), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsSwordMachine(ref SwordsMachine __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
return true;
}
[HarmonyPatch(typeof(Ferryman), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsFerry(ref Ferryman __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.rollCooldown = 0f;
__instance.lightningBoltCooldown = 0f;
__instance.vaultCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Parasite), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsParasite(ref Parasite __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(MortarLauncher), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMortarLauncher(ref MortarLauncher __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Guttertank), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsGuttertank(ref Guttertank __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.mineCooldown = 0f;
__instance.punchCooldown = 0f;
__instance.shootCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(SpiderBody), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMaurice(ref SpiderBody __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.burstCharge = 0f;
return true;
}
[HarmonyPatch(typeof(StatueBoss), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsCerberus(ref StatueBoss __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCheckCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Mass), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMass(ref Mass __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCooldown = 0f;
__instance.swingCooldown = 0f;
__instance.spearCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Mannequin), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMannequin(ref Mannequin __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.jumpCooldown = 0f;
__instance.meleeCooldown = 0f;
__instance.projectileCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Minotaur), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMinotaur(ref Minotaur __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 99f;
__instance.cooldown = 0f;
__instance.ramCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(MinotaurChase), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMinotaurChase(ref MinotaurChase __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
return true;
}
[HarmonyPatch(typeof(CancerousRodent), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsHardestBoss(ref CancerousRodent __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.coolDown = 0f;
return true;
}
[HarmonyPatch(typeof(FleshPrison), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsPrison(ref FleshPrison __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
if ((Object)(object)__instance.anim != (Object)null)
{
__instance.anim.speed = 999f;
}
__instance.attackCooldown = 0f;
__instance.homingProjectileCooldown = 0f;
__instance.fleshDroneCooldown = 0f;
__instance.rotationSpeed = 999f;
return true;
}
[HarmonyPatch(typeof(MinosArm), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMinosArm(ref MinosArm __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(MinosBoss), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMinosBoss(ref MinosBoss __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.cooldown = 0f;
__instance.blackHoleCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(LeviathanHead), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsLeviathanHead(ref LeviathanHead __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.anim.speed = 999f;
__instance.attackCooldown = 0f;
__instance.projectileBurstCooldown = 0f;
return true;
}
[HarmonyPatch(typeof(Mandalore), "Update")]
[HarmonyPrefix]
public static bool NoCooldownsMandalore(ref Mandalore __instance)
{
if (!FullestAutoPlugin.FullAutoEnemies.Value)
{
return true;
}
__instance.cooldown = 0f;
return true;
}
}
[HarmonyPatch(typeof(GameStateManager))]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class dontsubmit
{
public static bool Prefix(ref bool __result)
{
__result = false;
return false;
}
}