Decompiled source of ClassicElevator v1.0.0

ClassicElevator.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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ClassicElevator")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Restores the original aesthetics for the mineshaft elevator")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ClassicElevator")]
[assembly: AssemblyTitle("ClassicElevator")]
[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 ClassicElevator
{
	[BepInPlugin("butterystancakes.lethalcompany.classicelevator", "Classic Elevator", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string PLUGIN_GUID = "butterystancakes.lethalcompany.classicelevator";

		private const string PLUGIN_NAME = "Classic Elevator";

		private const string PLUGIN_VERSION = "1.0.0";

		internal static ManualLogSource Logger;

		private void Awake()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			Logger = ((BaseUnityPlugin)this).Logger;
			new Harmony("butterystancakes.lethalcompany.classicelevator").PatchAll();
			Logger.LogInfo((object)"Classic Elevator v1.0.0 loaded");
		}
	}
	[HarmonyPatch]
	internal class ClassicElevatorPatches
	{
		[HarmonyPatch(typeof(MineshaftElevatorController), "OnEnable")]
		[HarmonyPostfix]
		private static void MineshaftElevatorControllerPostOnEnable(MineshaftElevatorController __instance)
		{
			if (DateTime.Now.Month != 10 || DateTime.Now.Day != 31)
			{
				__instance.elevatorHalloweenClips = (AudioClip[])(object)new AudioClip[1] { __instance.elevatorJingleMusic.clip };
				__instance.elevatorHalloweenClipsLoop = __instance.elevatorHalloweenClips;
				Transform obj = ((Component)__instance).transform.Find("AnimContainer/NeonLights/Point Light");
				Light val = ((obj != null) ? ((Component)obj).GetComponent<Light>() : null);
				if ((Object)(object)val != (Object)null)
				{
					val.colorTemperature = 6217f;
				}
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "ClassicElevator";

		public const string PLUGIN_NAME = "ClassicElevator";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}