using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using DunGen;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("V72LightFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("V72LightFix")]
[assembly: AssemblyTitle("V72LightFix")]
[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;
}
}
}
[BepInPlugin("watergun.v72lightfix", "V72LightFix", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
[HarmonyPatch(typeof(Tile))]
internal class room_patch
{
[HarmonyPatch("AddTriggerVolume")]
[HarmonyPostfix]
public static void TileInstance(Tile __instance)
{
if (((Object)((Component)__instance).gameObject).name.Contains("BathroomTileContainer"))
{
Transform val = ((Component)__instance).gameObject.transform.Find("MineshaftSpotlight");
((Component)val).tag = "PoweredLight";
Debug.Log((object)"Fixed Lights at BathRoom");
}
if (((Object)((Component)__instance).gameObject).name.Contains("BirthdayRoomTile"))
{
Transform val2 = ((Component)__instance).gameObject.transform.Find("Lights/MineshaftSpotlight");
((Component)val2).tag = "PoweredLight";
Debug.Log((object)"Fixed Lights at PartyRoom");
}
if (((Object)((Component)__instance).gameObject).name.Contains("BedroomTile"))
{
Transform val3 = ((Component)__instance).gameObject.transform.Find("MineshaftSpotlight (1)");
((Component)val3).tag = "PoweredLight";
Debug.Log((object)"Fixed Lights at Bedroom");
}
if (((Object)((Component)__instance).gameObject).name.Contains("BedroomTileB"))
{
Transform val4 = ((Component)__instance).gameObject.transform.Find("MineshaftSpotlight (1)");
((Component)val4).tag = "PoweredLight";
Debug.Log((object)"Fixed Lights at BedroomB");
}
if (((Object)((Component)__instance).gameObject).name.Contains("PoolTile"))
{
Transform val5 = ((Component)__instance).gameObject.transform.Find("PoolLights/HangingLEDBarLight");
Transform val6 = ((Component)__instance).gameObject.transform.Find("PoolLights/HangingLEDBarLight (4)");
Transform val7 = ((Component)__instance).gameObject.transform.Find("PoolLights/HangingLEDBarLight (5)");
((Component)val5).tag = "PoweredLight";
((Component)val6).tag = "PoweredLight";
((Component)val7).tag = "PoweredLight";
Debug.Log((object)"Fixed Lights at SwimingPool");
}
}
}
private const string GUID = "watergun.v72lightfix";
private const string NAME = "V72LightFix";
private const string VER = "1.0.0";
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("watergun.v72lightfix");
val.PatchAll();
}
}