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 LoaderHealthNerf v1.0.0
LoaderHealthNerf.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using RoR2; [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("LoaderHealthNerf")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LoaderHealthNerf")] [assembly: AssemblyTitle("LoaderHealthNerf")] [assembly: AssemblyVersion("1.0.0.0")] 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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace LoaderHealthNerf { [BepInPlugin("com.Moffein.LoaderHealthNerf", "LoaderHealthNerf", "1.0.0")] public class LoaderHealthNerfPlugin : BaseUnityPlugin { public static ConfigEntry<float> health; public static ConfigEntry<float> armor; public static ConfigEntry<float> regen; public void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0064: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0098: Expected O, but got Unknown health = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Health"), 110f, new ConfigDescription("Base max health, Vanilla is 160.", (AcceptableValueBase)null, Array.Empty<object>())); armor = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Armor"), 0f, new ConfigDescription("Base armor, Vanilla is 20.", (AcceptableValueBase)null, Array.Empty<object>())); regen = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Stats", "Regen"), 2.5f, new ConfigDescription("Base regen, Vanilla is 2.5.", (AcceptableValueBase)null, Array.Empty<object>())); RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(Nerf)); } private void Nerf() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) CharacterBody bodyPrefabBodyComponent = BodyCatalog.GetBodyPrefabBodyComponent(BodyCatalog.FindBodyIndex("LoaderBody")); bodyPrefabBodyComponent.baseMaxHealth = health.Value; bodyPrefabBodyComponent.levelMaxHealth = bodyPrefabBodyComponent.baseMaxHealth * 0.3f; bodyPrefabBodyComponent.baseArmor = armor.Value; bodyPrefabBodyComponent.baseRegen = regen.Value; bodyPrefabBodyComponent.levelRegen = regen.Value * 0.2f; } } } namespace R2API.Utils { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } }