Decompiled source of BoblesIsStickers v1.0.0

BepInEx/plugins/BoblesIsStickers.dll

Decompiled 2 months 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 HarmonyLib;
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: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("BoblesIsStickers")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Bobles IS Stickers")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BoblesIsStickers")]
[assembly: AssemblyTitle("BoblesIsStickers")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.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 BoblesIsStickers
{
	[HarmonyPatch]
	public class SnowcatPatch : HarmonyPatch
	{
		private static string[] StickerLookup = new string[12]
		{
			"Quad (10)", "Quad (11)", "Quad (5)", "Quad (4)", "Quad (3)", "Quad (2)", "Quad (6)", "Quad (7)", "Quad (8)", "Quad (1)",
			"Quad", "Quad (9)"
		};

		private static MethodInfo TargetMethod()
		{
			return typeof(SnowcatManager).GetMethod("SetBobbles", BindingFlags.Instance | BindingFlags.NonPublic);
		}

		private static void Postfix(SnowcatManager __instance)
		{
			((Component)__instance.carDisplayBobble.transform.parent.Find("Stickers")).gameObject.SetActive(true);
			for (int i = 0; i < __instance.snowcatsActive.Length - 1; i++)
			{
				((Component)__instance.carDisplayBobble.transform.parent.Find("Stickers").Find(StickerLookup[i])).gameObject.SetActive(__instance.snowcatsActive[i]);
			}
		}
	}
	[BepInPlugin("BoblesIsStickers", "BoblesIsStickers", "1.0.0")]
	public class Bobles : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("GameRuleAPI");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin BoblesIsStickers is loaded!");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "BoblesIsStickers";

		public const string PLUGIN_NAME = "BoblesIsStickers";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}