using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.Events;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ROR2ScrapCounterMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ROR2ScrapCounterMod")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("694c2c2d-060d-4ebc-9711-e35f9e3a5515")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace PlatesHighlighterMod;
[BepInPlugin("com.Mirakuru.PlatesHighlighterMod_QoL", "PlatesHighlighterMod_QoL", "1.0.0")]
public class PlatesHighlighterMod : BaseUnityPlugin
{
public class PlateLightComponent : MonoBehaviour
{
private Light _light;
private PressurePlateController _controller;
private void Start()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Expected O, but got Unknown
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: Expected O, but got Unknown
_controller = ((Component)this).GetComponent<PressurePlateController>();
GameObject val = new GameObject("PlateSpotlight");
val.transform.SetParent(((Component)this).transform, false);
val.transform.localPosition = new Vector3(0f, 7f, 0f);
val.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
_light = val.AddComponent<Light>();
_light.color = Color.yellow;
_light.type = (LightType)0;
_light.range = 50f;
_light.intensity = 20f;
_light.spotAngle = 30f;
if (Object.op_Implicit((Object)(object)_controller))
{
_controller.OnSwitchDown.AddListener(new UnityAction(LightOff));
_controller.OnSwitchUp.AddListener(new UnityAction(LightOn));
}
}
private void LightOff()
{
if (Object.op_Implicit((Object)(object)_light))
{
((Behaviour)_light).enabled = false;
}
}
private void LightOn()
{
if (Object.op_Implicit((Object)(object)_light))
{
((Behaviour)_light).enabled = true;
}
}
}
public const string PluginGuid = "com.Mirakuru.PlatesHighlighterMod_QoL";
public const string PluginName = "PlatesHighlighterMod_QoL";
public const string PluginVersion = "1.0.0";
public void Awake()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
PressurePlateController.Start += new hook_Start(PressurePlateController_Start);
}
private void PressurePlateController_Start(orig_Start orig, PressurePlateController self)
{
orig.Invoke(self);
SceneDef sceneDefForCurrentScene = SceneCatalog.GetSceneDefForCurrentScene();
if (((sceneDefForCurrentScene != null) ? sceneDefForCurrentScene.baseSceneName : null) == "goolake")
{
((Component)self).gameObject.AddComponent<PlateLightComponent>();
}
}
}