using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("DarkwaterRoomCodeDisplay")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+86e6ad70b20eab284ebbc0507500e14dfe8f4d69")]
[assembly: AssemblyProduct("DarkwaterRoomCodeDisplay")]
[assembly: AssemblyTitle("DarkwaterRoomCodeDisplay")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 DarkwaterRoomCodeDisplay
{
[BepInPlugin("eu.puszkapotato.darkwater.roomcodedisplay", "Darkwater Display Room Code", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Log;
private void Awake()
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
Log = ((BaseUnityPlugin)this).Logger;
new Harmony("eu.puszkapotato.darkwater.roomcodedisplay").PatchAll();
Log.LogInfo((object)"Darkwater Display Room Code mod has been loaded!");
}
}
[HarmonyPatch]
public class RoomCodeDisplayPatch
{
[HarmonyPatch(typeof(UI_SettingsMenu), "Update")]
[HarmonyPostfix]
public static void CheckPlayerListStatus(UI_SettingsMenu __instance)
{
CMD_UI instance = CMD_UI.Instance;
if (!((Object)(object)instance == (Object)null) && !((Object)(object)instance.roomCodeDisplay == (Object)null) && !((Object)(object)__instance.playerListPanel == (Object)null))
{
TextMeshProUGUI roomCodeDisplay = instance.roomCodeDisplay;
if (__instance.playerListPanel.activeInHierarchy)
{
((Behaviour)roomCodeDisplay).enabled = true;
}
else
{
((Behaviour)roomCodeDisplay).enabled = false;
}
}
}
}
}