Decompiled source of LethalMinecraftVillage v1.1.1

lethalminecraftvillage_script.dll

Decompiled 7 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
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("lethalminecraftvillage_script")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("lethalminecraftvillage_script")]
[assembly: AssemblyTitle("lethalminecraftvillage_script")]
[assembly: AssemblyVersion("1.0.0.0")]
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;
		}
	}
}
namespace lethalminecraftvillage_script
{
	public static class PluginInformation
	{
		public const string PLUGIN_GUID = "minecraftVillage";

		public const string PLUGIN_NAME = "Minecraft Village";

		public const string PLUGIN_VERSION = "1.0.0";
	}
	[BepInPlugin("minecraftVillage", "Minecraft Village", "1.0.0")]
	public class SolidLib : BaseUnityPlugin
	{
	}
}
namespace MinecraftVillageMap.Components
{
	public class MinecraftVillageHandler : MonoBehaviour
	{
		public static MinecraftVillageHandler instance;

		private bool lampsStart;

		private bool lampsInitialized;

		private void Start()
		{
			Debug.Log((object)"Minecraft Map Initialized");
		}

		private void Update()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Invalid comparison between Unknown and I4
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Invalid comparison between Unknown and I4
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				GameObject[] array = GameObject.FindGameObjectsWithTag("Gravel");
				if (((int)RoundManager.Instance.timeScript.dayMode == 2 || (int)RoundManager.Instance.timeScript.dayMode == 3) && !lampsInitialized)
				{
					GameObject[] array2 = array;
					foreach (GameObject val in array2)
					{
						if (((Object)val).name.Contains("mclamp"))
						{
							Debug.Log((object)"Turn on lamps");
							((Renderer)val.GetComponent<MeshRenderer>()).enabled = true;
							((Component)val.transform.GetChild(0)).gameObject.SetActive(true);
							lampsInitialized = true;
						}
					}
				}
				else
				{
					if ((int)RoundManager.Instance.timeScript.dayMode != 0 || lampsStart)
					{
						return;
					}
					GameObject[] array2 = array;
					foreach (GameObject val2 in array2)
					{
						if (((Object)val2).name.Contains("mclamp"))
						{
							Debug.Log((object)"Turn off lamps");
							((Renderer)val2.GetComponent<MeshRenderer>()).enabled = false;
							((Component)val2.transform.GetChild(0)).gameObject.SetActive(false);
							lampsStart = true;
						}
					}
				}
			}
			catch (Exception ex)
			{
				Debug.Log((object)("Error in Update: " + ex.GetType().Name + " - " + ex.Message + "\nStack Trace: " + ex.StackTrace));
			}
		}
	}
}