Decompiled source of CorrectRematchLights v1.2.0

Mods/CorrectRematchLights.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using CorrectRematchLights;
using MelonLoader;
using RumbleModdingAPI.RMAPI;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(main), "CorrectRematchLights", "1.2.0", "UlvakSkillz", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: MelonColor(255, 195, 0, 255)]
[assembly: MelonAuthorColor(255, 195, 0, 255)]
[assembly: VerifyLoaderVersion(0, 6, 2, true)]
[assembly: AssemblyTitle("CorrectRematchLights")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CorrectRematchLights")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("564397d6-e138-4f5f-9598-b102b818203a")]
[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 CorrectRematchLights;

public class main : MelonMod
{
	private GameObject[] matchSlabReplayButton = (GameObject[])(object)new GameObject[2];

	public override void OnLateInitializeMelon()
	{
		Actions.onMapInitialized += SceneInit;
	}

	private void SceneInit(string map)
	{
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Unknown result type (might be due to invalid IL or missing references)
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_0165: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Unknown result type (might be due to invalid IL or missing references)
		if ((!(map != "Map0") || !(map != "Map1")) && Players.IsHost())
		{
			if (map == "Map0")
			{
				matchSlabReplayButton[0] = Replaybutton.GetGameObject();
				matchSlabReplayButton[1] = Replaybutton.GetGameObject();
			}
			else if (map == "Map1")
			{
				matchSlabReplayButton[0] = Replaybutton.GetGameObject();
				matchSlabReplayButton[1] = Replaybutton.GetGameObject();
			}
			Vector3[] array = (Vector3[])(object)new Vector3[4]
			{
				matchSlabReplayButton[0].transform.GetChild(3).position,
				matchSlabReplayButton[0].transform.GetChild(4).position,
				matchSlabReplayButton[1].transform.GetChild(3).position,
				matchSlabReplayButton[1].transform.GetChild(4).position
			};
			matchSlabReplayButton[0].transform.GetChild(3).position = array[1];
			matchSlabReplayButton[0].transform.GetChild(4).position = array[0];
			matchSlabReplayButton[1].transform.GetChild(3).position = array[3];
			matchSlabReplayButton[1].transform.GetChild(4).position = array[2];
		}
	}
}