Decompiled source of MMB CARDS v1.1.2

MMB.dll

Decompiled 2 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using UnboundLib.Cards;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class CardHolder : MonoBehaviour
{
	public List<GameObject> Cards;

	public List<GameObject> HiddenCards;

	internal void RegisterCards()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: 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_0060: Unknown result type (might be due to invalid IL or missing references)
		Enumerator<GameObject> enumerator = Cards.GetEnumerator();
		try
		{
			while (enumerator.MoveNext())
			{
				GameObject current = enumerator.Current;
				string text = current.GetComponent<CardInfo>().cardName.Trim();
				CustomCard.RegisterUnityCard(current, "MMB", text, true, (Action<CardInfo>)null);
			}
		}
		finally
		{
			((IDisposable)enumerator).Dispose();
		}
		Enumerator<GameObject> enumerator2 = HiddenCards.GetEnumerator();
		try
		{
			while (enumerator2.MoveNext())
			{
				GameObject current2 = enumerator2.Current;
				string text2 = current2.GetComponent<CardInfo>().cardName.Trim();
				CustomCard.RegisterUnityCard(current2, "MMB", text2, false, (Action<CardInfo>)null);
				Cards.instance.AddHiddenCard(current2.GetComponent<CardInfo>());
			}
		}
		finally
		{
			((IDisposable)enumerator2).Dispose();
		}
	}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("org.MMB.plugins.MMB", "MMB", "0.0.0")]
[BepInProcess("Rounds.exe")]
public class MMB : BaseUnityPlugin
{
	internal static string modInitials = "MMB";

	internal static AssetBundle assets;

	private void Awake()
	{
		assets = AssetUtils.LoadAssetBundleFromResources("assets", typeof(MMB).Assembly);
		assets.LoadAsset<GameObject>("ModCards").GetComponent<CardHolder>().RegisterCards();
	}

	private void Start()
	{
	}
}