Decompiled source of CorrectRematchLights v1.0.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;
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.0.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 string currentScene = "Loader";

	private GameObject[] matchSlabReplayButton = (GameObject[])(object)new GameObject[2];

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

	public override void OnSceneWasLoaded(int buildIndex, string sceneName)
	{
		currentScene = sceneName;
	}

	public override void OnFixedUpdate()
	{
	}

	private void SceneInit()
	{
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Unknown result type (might be due to invalid IL or missing references)
		//IL_0159: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		if ((!(currentScene != "Map0") || !(currentScene != "Map1")) && Players.IsHost())
		{
			if (currentScene == "Map0")
			{
				matchSlabReplayButton[0] = RePlayButton.GetGameObject();
				matchSlabReplayButton[1] = RePlayButton.GetGameObject();
			}
			else if (currentScene == "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];
		}
	}
}