Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of ConfigurableStats v1.0.1
ConfigurableStats.dll
Decompiled 11 months agousing System; 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 HG.Reflection; using R2API.Utils; using RoR2; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("ConfigurableStats")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ConfigurableStats")] [assembly: AssemblyTitle("ConfigurableStats")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace ConfigurableStats; [BepInPlugin("com.Dragonyck.ConfigurableStats", "ConfigurableStats", "1.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.ConfigurableStats"; public const string MODNAME = "ConfigurableStats"; public const string VERSION = "1.0.0"; [SystemInitializer(new Type[] { typeof(BodyCatalog) })] private static void Init() { //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown foreach (CharacterBody allBodyPrefabBodyBodyComponent in BodyCatalog.allBodyPrefabBodyBodyComponents) { string[] array = new string[32] { "-", "'", "\"", "/", "_", "{", "}", "(", ")", "\\", "[", "]", "=", "+", "|", ";", ":", ",", ".", "<", ">", "?", "!", "", "", "", "", "", "", "", "", "" }; string source = ((Object)allBodyPrefabBodyBodyComponent).name.Replace("Body", ""); source = new string(source.Where((char c) => char.IsLetterOrDigit(c)).ToArray()); string section = source + " Stats"; string text = source + ": "; ConfigFile config = new ConfigFile(Paths.ConfigPath + "\\ConfigurableStats\\" + source + ".cfg", true); allBodyPrefabBodyBodyComponent.mainRootSpeed = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.mainRootSpeed, section, text + "Main Root Speed"); allBodyPrefabBodyBodyComponent.baseAcceleration = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseAcceleration, section, text + "Base Acceleration"); allBodyPrefabBodyBodyComponent.baseMaxHealth = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseMaxHealth, section, text + "Base Max Health"); allBodyPrefabBodyBodyComponent.levelMaxHealth = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelMaxHealth, section, text + "Level Max Health"); allBodyPrefabBodyBodyComponent.baseRegen = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseRegen, section, text + "Base Regen"); allBodyPrefabBodyBodyComponent.levelRegen = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelRegen, section, text + "Level Regen"); allBodyPrefabBodyBodyComponent.baseMaxShield = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseMaxShield, section, text + "Base Max Shield"); allBodyPrefabBodyBodyComponent.levelMaxShield = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelMaxShield, section, text + "Level Max Shield"); allBodyPrefabBodyBodyComponent.baseMoveSpeed = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseMoveSpeed, section, text + "Base Movement Speed"); allBodyPrefabBodyBodyComponent.levelMoveSpeed = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelMoveSpeed, section, text + "Level Movement Speed"); allBodyPrefabBodyBodyComponent.sprintingSpeedMultiplier = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.sprintingSpeedMultiplier, section, text + "Sprinting Speed Multiplier"); allBodyPrefabBodyBodyComponent.baseJumpCount = (int)NewConfigEntry<int>(config, allBodyPrefabBodyBodyComponent.baseJumpCount, section, text + "Base Jump Count"); allBodyPrefabBodyBodyComponent.baseJumpPower = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseJumpPower, section, text + "Base Jump Power"); allBodyPrefabBodyBodyComponent.levelJumpPower = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelJumpPower, section, text + "Level Jump Power"); allBodyPrefabBodyBodyComponent.baseDamage = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseDamage, section, text + "Base Damage"); allBodyPrefabBodyBodyComponent.levelDamage = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelDamage, section, text + "Level Damage"); allBodyPrefabBodyBodyComponent.baseAttackSpeed = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseAttackSpeed, section, text + "Base Attack Speed"); allBodyPrefabBodyBodyComponent.levelAttackSpeed = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelAttackSpeed, section, text + "Level Attack Speed"); allBodyPrefabBodyBodyComponent.baseCrit = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseCrit, section, text + "Base Critical Chance"); allBodyPrefabBodyBodyComponent.levelCrit = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelCrit, section, text + "Level Critical Chance"); allBodyPrefabBodyBodyComponent.baseArmor = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.baseArmor, section, text + "Base Armor"); allBodyPrefabBodyBodyComponent.levelArmor = (float)NewConfigEntry<float>(config, allBodyPrefabBodyBodyComponent.levelArmor, section, text + "Level Armor"); } } public static object NewConfigEntry<T>(ConfigFile config, object arg, string section, string key) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0024: Expected O, but got Unknown ConfigEntry<T> val = config.Bind<T>(new ConfigDefinition(section, key), (T)arg, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); return val.Value; } }