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 ArtiSkillSwap v3.2.1
ArtiSkillSwap.dll
Decompiled 15 hours agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.Mage.Weapon; using IL.EntityStates.Mage.Weapon; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using RoR2; using RoR2.Skills; using UnityEngine.AddressableAssets; [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("ArtiSkillSwap")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ArtiSkillSwap")] [assembly: AssemblyTitle("ArtiSkillSwap")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ArtiSkillSwap { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("gaforb.ArtiSkillSwap", "ArtiSkillSwap", "3.2.1")] public class ArtiSkillSwap : BaseUnityPlugin { public const string PluginGUID = "gaforb.ArtiSkillSwap"; public const string PluginAuthor = "gaforb"; public const string PluginName = "ArtiSkillSwap"; public const string PluginVersion = "3.2.1"; public static ConfigEntry<bool> IonUtil { get; set; } public static ConfigEntry<bool> SnapSpec { get; set; } public static ConfigEntry<bool> SnapHook { get; set; } public static ConfigEntry<bool> FlameSprint { get; set; } public void Awake() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown IonUtil = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Move Ion Surge", true, "Move Ion Surge to the Utility slot"); SnapSpec = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Move Snapfreeze", true, "Move Snapfreeze to the Special slot"); SnapHook = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Snapfreeze Input Hold", true, "Attempt to fix Snapfreeze held input being ignored when it is moved to special (disable if you have mod conflicts)"); FlameSprint = ((BaseUnityPlugin)this).Config.Bind<bool>("Skills", "Flamethrower While Sprinting", true, "Allows flamethrower to be used during Ion Surge, and while sprinting. if disabled, Flamethrower will be wasted if used during Ion Surge."); if (SnapSpec.Value && SnapHook.Value) { PrepWall.FixedUpdate += new Manipulator(Hookin); } } private ButtonState OverrideSkill(ref ButtonState button, PrepWall self) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return ((EntityState)self).inputBank.skill4; } private void Hookin(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (!val.TryGotoNext(new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<ButtonState>(x, "down") })) { ((BaseUnityPlugin)this).Logger.LogError((object)"ILHook failed"); return; } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<<>F{00000001}<ButtonState, PrepWall, ButtonState>>((<>F{00000001}<ButtonState, PrepWall, ButtonState>)OverrideSkill); } public void Start() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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) //IL_01ab: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) SkillFamily val = Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Mage/MageBodyUtilityFamily.asset").WaitForCompletion(); SkillFamily val2 = Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Mage/MageBodySpecialFamily.asset").WaitForCompletion(); SkillDef val3 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFlyUp.asset").WaitForCompletion(); UnlockableDef unlockableDef = Addressables.LoadAssetAsync<UnlockableDef>((object)"RoR2/Base/Mage/Skills.Mage.FlyUp.asset").WaitForCompletion(); SkillDef val4 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyWall.asset").WaitForCompletion(); SkillDef val5 = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFlamethrower.asset").WaitForCompletion(); Variant val6; if (IonUtil.Value) { Array.Resize(ref val.variants, val.variants.Length + 1); Variant[] variants = val.variants; int num = val.variants.Length - 1; val6 = new Variant { skillDef = val3, unlockableDef = unlockableDef }; ((Variant)(ref val6)).viewableNode = new Node(val3.skillNameToken, false, (Node)null); variants[num] = val6; for (int i = 1; i < val2.variants.Length - 1; i++) { val2.variants[i] = val2.variants[i + 1]; } Array.Resize(ref val2.variants, Math.Max(val2.variants.Length - 1, 1)); } if (SnapSpec.Value) { Array.Resize(ref val2.variants, val2.variants.Length + 1); Variant[] variants2 = val2.variants; int num2 = val2.variants.Length - 1; val6 = new Variant { skillDef = val4, unlockableDef = null }; ((Variant)(ref val6)).viewableNode = new Node(val4.skillNameToken, false, (Node)null); variants2[num2] = val6; for (int j = 0; j < val.variants.Length - 1; j++) { val.variants[j] = val.variants[j + 1]; } Array.Resize(ref val.variants, Math.Max(val.variants.Length - 1, 1)); } val5.canceledFromSprinting = !FlameSprint.Value; } } }