Decompiled source of Fortnite Card v1.0.0

FortniteCard.dll

Decompiled 8 months ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using LethalLib.Extras;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FortniteCard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FortniteCard")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1ab113d1-b60c-4aec-a3df-eab5e129c27c")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 ForniteCard
{
	[BepInPlugin("SpiralMods.FortniteCard", "FortniteCard", "1.0.0")]
	public class FortniteCardBase : BaseUnityPlugin
	{
		private const string modGUID = "SpiralMods.FortniteCard";

		private const string modName = "FortniteCard";

		private const string modVersion = "1.0.0";

		public static FortniteCardBase instance;

		public static ManualLogSource mls;

		private void Awake()
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Expected O, but got Unknown
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "fortnitecard");
			AssetBundle val = AssetBundle.LoadFromFile(text);
			Item val2 = val.LoadAsset<Item>("Assets/fortnitecard/assets/ForniteCard/FortniteCardItem.asset");
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Utilities.FixMixerGroups(val2.spawnPrefab);
			SpawnableMapObjectDef val3 = ScriptableObject.CreateInstance<SpawnableMapObjectDef>();
			val3.spawnableMapObject = new SpawnableMapObject();
			val3.spawnableMapObject.prefabToSpawn = val2.spawnPrefab;
			AnimationCurve curve = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
			{
				new Keyframe(0f, 1f),
				new Keyframe(0.5f, 2f),
				new Keyframe(1f, 10f)
			});
			MapObjects.RegisterMapObject(val3, (LevelTypes)8, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			MapObjects.RegisterMapObject(val3, (LevelTypes)4, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			MapObjects.RegisterMapObject(val3, (LevelTypes)64, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			MapObjects.RegisterMapObject(val3, (LevelTypes)1024, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			MapObjects.RegisterMapObject(val3, (LevelTypes)32, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			MapObjects.RegisterMapObject(val3, (LevelTypes)16, (Func<SelectableLevel, AnimationCurve>)((SelectableLevel level) => curve));
			mls.LogInfo((object)"SpiralMods.FortniteCard has loaded (ModVersion: 1.0.0)!");
		}
	}
}