Decompiled source of EliteWorms v1.0.3

EliteWorms.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using RoR2;
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: AssemblyTitle("EliteWorms")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EliteWorms")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("617004d9-90e5-4627-a721-56672cac7cd7")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace R2API.Utils
{
	[AttributeUsage(AttributeTargets.Assembly)]
	public class ManualNetworkRegistrationAttribute : Attribute
	{
	}
}
namespace EliteWorms
{
	[BepInPlugin("com.Moffein.EliteWorms", "EliteWorms", "1.0.1")]
	public class EliteWorms : BaseUnityPlugin
	{
		public void Awake()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_002c: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_005d: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			bool value = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Settings", "Allow Magma Worm"), true, new ConfigDescription("Allow Magma Worms to be elite.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			bool value2 = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Settings", "Allow Overloading Worm"), true, new ConfigDescription("Allow Overloading Worms to be elite.", (AcceptableValueBase)null, Array.Empty<object>())).Value;
			if (value)
			{
				CharacterSpawnCard val = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/MagmaWorm/cscMagmaWorm.asset").WaitForCompletion();
				val.noElites = false;
				((SpawnCard)val).eliteRules = (EliteRules)0;
			}
			if (value2)
			{
				CharacterSpawnCard val2 = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/ElectricWorm/cscElectricWorm.asset").WaitForCompletion();
				val2.noElites = false;
				((SpawnCard)val2).eliteRules = (EliteRules)0;
			}
		}
	}
}