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 EarlyAccessBulletSponge v1.1.0
EarlyAccessBulletsponge.dll
Decompiled 6 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using RoR2; using RoR2.Projectile; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("EarlyAccessBulletsponge")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+1baafb32af669ea20d58584b1f273f8767dab3d3")] [assembly: AssemblyProduct("EarlyAccessBulletsponge")] [assembly: AssemblyTitle("EarlyAccessBulletsponge")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } } namespace EarlyAccessBulletsponge { [BepInPlugin("com.Moffein.EarlyAccessBulletsponge", "EarlyAccessBulletsponge", "1.1.0")] public class EarlyAccessBulletspongePlugin : BaseUnityPlugin { public static bool useCustomBlacklistConfig; public static string blacklistedBodyString = "DefectiveUnitBody, FriendUnitBody, ExhaustPortWeakpointBody, ExplosiveJunkBombDestructibleBody,SolusWingBody, SolusHeartBody, SolusHeartBody_Offering, VultureHunterBody, TankerBody, IronHaulerBody, MinePodBody, SolusMineBody,SolusAmalgamatorFlamethrowerCannonBody, SolusAmalgamatorMissilePodBody, SolusAmalgamatorThrusterBodyRoboBallMiniBody, RoboBallGreenBuddyBody, RoboBallRedBuddyBody, MimicBodyNew, AerosBigTurretBody, IfritPylonEnemyBody, IfritPylonPlayerBody,ArcherBugBody, GupBody, GeepBody, GipBody, GrandparentBody, MegaConstructBody, GreaterWispBody, BellBody, ClayBruiserBody,VoidBarnacleBody, HalcyoniteBody, ScorchlingBody, LunarGolemBody, LunarWispBody, LunarExploderBody, NullifierBody, VoidJailerBody,MoffeinArchWisp, RobYoungVagrantBody, BrotherBody, BrotherHurtBody, FalseSonBossBody, FalseSonBossBodyLunarShard, FalseSonBossBodyBrokenLunarShard,MiniVoidRaidCrabBodyBase, MiniVoidRaidCrabBodyPhase1, MiniVoidRaidCrabBodyPhase2, MiniVoidRaidCrabBodyPhase3, ArraignP1Body, ArraignP2Body, RegigigasBody,EngiTurretBody, EngiWalkerTurretBody, Drone1Body, Drone2Body, BackupDroneBody, EmergencyDroneBody, FlameDroneBody, MegaDroneBody, MissileDroneBody"; public static float trashTierMultiplier = 1f; public static float impTierMultiplier = 1.4285715f; public static float golemTierMultiplier = 1.25f; public static float championTierMultiplier = 1.5f; public void Awake() { ReadConfig(); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(RoR2Application_OnLoad)); } private void ReadConfig() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown useCustomBlacklistConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Use Custom Body Blacklist", false, new ConfigDescription("Use custom body blacklist. You will need to boot the game up to generate the config option after enabling this.", (AcceptableValueBase)null, Array.Empty<object>())).Value; if (useCustomBlacklistConfig) { blacklistedBodyString = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Body Blacklist", blacklistedBodyString, new ConfigDescription("List of bodies unaffected by this mod, separated by commas. Anything with Drone in the name is auto-blacklisted.", (AcceptableValueBase)null, Array.Empty<object>())).Value; } trashTierMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Trash Tier Multiplier", trashTierMultiplier, new ConfigDescription("HP multiplier for low-health enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value; impTierMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Imp Tier Multiplier", impTierMultiplier, new ConfigDescription("HP multiplier for Imp-tier enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value; golemTierMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Golem Tier Multiplier", golemTierMultiplier, new ConfigDescription("HP multiplier for Golem-tier enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value; championTierMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Champion Tier Multiplier", championTierMultiplier, new ConfigDescription("HP multiplier for Champion-tier enemies.", (AcceptableValueBase)null, Array.Empty<object>())).Value; } private void RoR2Application_OnLoad() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Invalid comparison between Unknown and I4 //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Invalid comparison between Unknown and I4 //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) List<string> list = (from str in blacklistedBodyString.Split(",") select str.Trim()).ToList(); HashSet<BodyIndex> hashSet = new HashSet<BodyIndex>(); foreach (string item in list) { BodyIndex val = BodyCatalog.FindBodyIndex(item); if ((int)val != -1) { hashSet.Add(val); } } List<GameObject> list2 = new List<GameObject>(); foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs) { BodyIndex val2 = BodyCatalog.FindBodyIndex(allSurvivorDef.bodyPrefab); if ((int)val2 != -1) { hashSet.Add(val2); } } List<GameObject> list3 = new List<GameObject>(); foreach (DroneDef allDroneDef in DroneCatalog.allDroneDefs) { BodyIndex val3 = BodyCatalog.FindBodyIndex(allDroneDef.bodyPrefab); if ((int)val3 != -1) { hashSet.Add(val3); } } foreach (GameObject allBodyPrefab in BodyCatalog.allBodyPrefabs) { if (Object.op_Implicit((Object)(object)allBodyPrefab.GetComponent<ProjectileController>())) { continue; } CharacterBody component = allBodyPrefab.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || hashSet.Contains(component.bodyIndex) || ((Enum)component.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4) || ((Object)((Component)component).gameObject).name.Contains("Drone")) { continue; } if (component.isChampion) { if (championTierMultiplier != 1f) { component.baseMaxHealth = Mathf.RoundToInt(component.baseMaxHealth * championTierMultiplier); component.levelMaxHealth = Mathf.RoundToInt(component.levelMaxHealth * championTierMultiplier); } continue; } if (component.baseMaxHealth < 140f && trashTierMultiplier != 1f) { component.baseMaxHealth = Mathf.RoundToInt(component.baseMaxHealth * trashTierMultiplier); component.levelMaxHealth = Mathf.RoundToInt(component.levelMaxHealth * trashTierMultiplier); } if (component.baseMaxHealth >= 140f && component.baseMaxHealth < 480f) { if (impTierMultiplier != 1f) { component.baseMaxHealth = Mathf.RoundToInt(component.baseMaxHealth * impTierMultiplier); component.levelMaxHealth = Mathf.RoundToInt(component.levelMaxHealth * impTierMultiplier); } } else if (component.baseMaxHealth >= 480f && golemTierMultiplier != 1f) { component.baseMaxHealth = Mathf.RoundToInt(component.baseMaxHealth * golemTierMultiplier); component.levelMaxHealth = Mathf.RoundToInt(component.levelMaxHealth * golemTierMultiplier); } } } } }