Decompiled source of RarityBundle v0.1.0

Rarity Bundle.dll

Decompiled 4 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Bootstrap;
using RarityLib.Utils;
using UnityEngine;

[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("Rarity Bundle")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Rarity Bundle")]
[assembly: AssemblyTitle("Rarity Bundle")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RarityBundle;

[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.CrazyCoders.Rounds.RarityBundle", "RarityBundle", "0.1.0")]
[BepInProcess("Rounds.exe")]
internal class RarityBundle : BaseUnityPlugin
{
	private const string ModId = "com.CrazyCoders.Rounds.RarityBundle";

	private const string ModName = "RarityBundle";

	public const string Version = "0.1.0";

	public static RarityBundle instance { get; private set; }

	private void Awake()
	{
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: 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)
		//IL_00b9: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: 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_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0169: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: 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_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
		List<BaseUnityPlugin> list = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
		RarityUtils.AddRarity("Trinket", list.Exists((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "Root.Rarity.Dard.Draw") ? 1.75f : 3f, new Color(0.38f, 0.38f, 0.38f), new Color(0.0978f, 0.1088f, 0.1321f));
		RarityUtils.AddRarity("Scarce", 0.7f, Color32.op_Implicit(new Color32((byte)0, (byte)172, (byte)98, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)0, (byte)95, (byte)60, byte.MaxValue)));
		RarityUtils.AddRarity("Exotic", 0.25f, Color32.op_Implicit(new Color32((byte)10, (byte)50, byte.MaxValue, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)5, (byte)25, (byte)150, byte.MaxValue)));
		RarityUtils.AddRarity("Epic", 0.0625f, Color32.op_Implicit(new Color32((byte)225, (byte)0, (byte)50, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)125, (byte)0, (byte)20, byte.MaxValue)));
		RarityUtils.AddRarity("Mythical", 1f / 160f, Color32.op_Implicit(new Color32((byte)0, byte.MaxValue, (byte)70, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)0, (byte)125, (byte)35, byte.MaxValue)));
		RarityUtils.AddRarity("Divine", 0.0015625f, Color32.op_Implicit(new Color32(byte.MaxValue, byte.MaxValue, (byte)180, byte.MaxValue)), Color32.op_Implicit(new Color32((byte)125, (byte)125, (byte)100, byte.MaxValue)));
	}
}