Decompiled source of AgileLunarStakes v1.0.0

plugins/AgileLunarStakes.dll

Decompiled 2 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using R2API.Utils;
using RoR2;
using RoR2.Skills;
using UnityEngine;
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("AgileLunarStakes")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AgileLunarStakes")]
[assembly: AssemblyTitle("AgileLunarStakes")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace AgileLunarStakes;

[BepInDependency("com.bepis.r2api", "5.1.6")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.toarch7.AgileLunarStakes", "AgileLunarStakes", "1.0.0")]
public class AgileLunarStakes : BaseUnityPlugin
{
	public const string ModGUID = "com.toarch7.AgileLunarStakes";

	public const string ModName = "AgileLunarStakes";

	public const string ModVersion = "1.0.0";

	private const int LunarStakesSkillVariantIndex = 1;

	private static void EnableAgile()
	{
		//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)
		GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSon/FalseSonBody.prefab").WaitForCompletion();
		SkillLocator component = val.GetComponent<SkillLocator>();
		SkillFamily skillFamily = component.secondary.skillFamily;
		SkillDef skillDef = skillFamily.variants[1].skillDef;
		skillDef.cancelSprintingOnActivation = false;
		skillDef.mustKeyPress = false;
	}

	public void Awake()
	{
		EnableAgile();
	}
}