Decompiled source of CraftableBRAINTurret v1.1.2

CraftableBRAINTurret.dll

Decompiled 2 weeks ago
using 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 CG.Client.UserData;
using Microsoft.CodeAnalysis;
using ResourceAssets;
using VoidManager;
using VoidManager.Content;
using VoidManager.MPModChecks;
using VoidManager.Utilities;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("Dragon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Makes B.R.A.I.N. Benediction Auto-Turrets Mk1-Mk3 craftable. Requires All clients to install.")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2+3aae5e1ea11c4915d6fb3dd4b2825298b395a1b4")]
[assembly: AssemblyProduct("CraftableBRAINTurret")]
[assembly: AssemblyTitle("Makes B.R.A.I.N. Auto-Turrets craftable.")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.2.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.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 CraftableBRAINTurret
{
	[BepInPlugin("Dragon.CraftableBRAINTurret", "CraftableBRAINTurret", "1.1.2")]
	[BepInProcess("Void Crew.exe")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class BepinPlugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: 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_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			GUIDUnion val = default(GUIDUnion);
			((GUIDUnion)(ref val))..ctor("6b2c6be56b6678643bd0039305890622");
			GUIDUnion val2 = default(GUIDUnion);
			((GUIDUnion)(ref val2))..ctor("57a0ed79bfb068647a8fbef4bd619e1e");
			GUIDUnion val3 = default(GUIDUnion);
			((GUIDUnion)(ref val3))..ctor("5527af35a54518042b4c3712846f4bb2");
			GUIDUnion val4 = default(GUIDUnion);
			((GUIDUnion)(ref val4))..ctor("bc2dcf53afe3a90478b5d9fcffb1f523");
			GUIDUnion val5 = default(GUIDUnion);
			((GUIDUnion)(ref val5))..ctor("2f592cf15994875469eda092a4b159f0");
			GUIDUnion val6 = default(GUIDUnion);
			((GUIDUnion)(ref val6))..ctor("86d4f5371b6f29446a5795ac8eb41c70");
			CraftingRules recipe = Craftables.Instance.GetRecipe(val);
			recipe.CraftingMethod = (CraftMethod)4;
			recipe.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 1);
			CraftingRules recipe2 = Craftables.Instance.GetRecipe(val2);
			recipe2.CraftingMethod = (CraftMethod)4;
			recipe2.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 2);
			CraftingRules recipe3 = Craftables.Instance.GetRecipe(val3);
			recipe3.CraftingMethod = (CraftMethod)4;
			recipe3.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 3);
			CraftingRules recipe4 = Craftables.Instance.GetRecipe(val4);
			recipe.CraftingMethod = (CraftMethod)4;
			recipe.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 1);
			CraftingRules recipe5 = Craftables.Instance.GetRecipe(val5);
			recipe2.CraftingMethod = (CraftMethod)4;
			recipe2.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 2);
			CraftingRules recipe6 = Craftables.Instance.GetRecipe(val6);
			recipe3.CraftingMethod = (CraftMethod)4;
			recipe3.ItemExchangeInfo = new CraftableWithItemExchange((ItemExchangeType)1, 3);
			Unlocks.Instance.SetUnlockOptions(val, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Unlocks.Instance.SetUnlockOptions(val2, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Unlocks.Instance.SetUnlockOptions(val3, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Unlocks.Instance.SetUnlockOptions(val4, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Unlocks.Instance.SetUnlockOptions(val5, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Unlocks.Instance.SetUnlockOptions(val6, "Dragon.CraftableBRAINTurret", new UnlockOptions
			{
				UnlockCriteria = (UnlockCriteriaType)1
			});
			Craftables.Instance.SetRecipe(val, recipe);
			Craftables.Instance.SetRecipe(val2, recipe2);
			Craftables.Instance.SetRecipe(val3, recipe3);
			Craftables.Instance.SetRecipe(val4, recipe4);
			Craftables.Instance.SetRecipe(val5, recipe5);
			Craftables.Instance.SetRecipe(val6, recipe6);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val2);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val3);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val4);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val5);
			Craftables.Instance.AddQuestRecipeUsingDefaultRecipe(Game.EndlessQuestAsset, val6);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Dragon.CraftableBRAINTurret is loaded!");
		}
	}
	public class MyPluginInfo
	{
		public const string PLUGIN_GUID = "Dragon.CraftableBRAINTurret";

		public const string PLUGIN_NAME = "CraftableBRAINTurret";

		public const string USERS_PLUGIN_NAME = "Craftable B.R.A.I.N Turrets";

		public const string PLUGIN_VERSION = "1.1.2";

		public const string PLUGIN_DESCRIPTION = "Makes B.R.A.I.N. Auto-Turrets craftable.";

		public const string PLUGIN_ORIGINAL_AUTHOR = "Dragon";

		public const string PLUGIN_AUTHORS = "Dragon";

		public const string PLUGIN_THUNDERSTORE_ID = "VoidCrewModdingTeam/CraftableBRAINTurret";
	}
	public class VoidManagerPlugin : VoidPlugin
	{
		public override MultiplayerType MPType => (MultiplayerType)30;

		public override string Author => "Dragon";

		public override string Description => "Makes B.R.A.I.N. Auto-Turrets craftable.";

		public override string ThunderstoreID => "VoidCrewModdingTeam/CraftableBRAINTurret";
	}
}