Decompiled source of Gym Cleaner v2.0.0

Mods/GymCleaner.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using GymCleaner;
using Il2CppRUMBLE.MoveSystem;
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(Class1), "GymCleaner", "1.0.0", "Revenoon", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("GymCleaner")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GymCleaner")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("2366f319-ee29-4d77-9960-dd20bd02f5b9")]
[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 GymCleaner;

public class Class1 : MelonMod
{
	private bool sceneChanged = false;

	private string currentScene = "";

	private int waitedTicks = 20;

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

	public override void OnFixedUpdate()
	{
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		if (!sceneChanged)
		{
			return;
		}
		try
		{
			if (currentScene == "Gym")
			{
				if (waitedTicks > 0)
				{
					waitedTicks--;
					return;
				}
				Tutorial.GetGameObject().SetActive(false);
				Bag.GetGameObject().SetActive(false);
				Tetherball0.GetGameObject().SetActive(false);
				Tetherball1.GetGameObject().SetActive(false);
				Targets.GetGameObject().SetActive(false);
				School.GetGameObject().SetActive(false);
				BeltRack.GetGameObject().SetActive(false);
				RankStatusSlab.GetGameObject().SetActive(false);
				CommunitySlab.GetGameObject().SetActive(false);
				RankBoard.GetGameObject().SetActive(false);
				RankSigns.GetGameObject().SetActive(false);
				Crate.GetGameObject().SetActive(false);
				ExtraArm.GetGameObject().SetActive(false);
				GameObject poolSmallRock = Structures.GetPoolSmallRock();
				for (int i = 0; i < poolSmallRock.transform.childCount; i++)
				{
					if (((Component)poolSmallRock.transform.GetChild(i)).gameObject.active)
					{
						((Component)poolSmallRock.transform.GetChild(i)).GetComponent<Structure>().Kill(Vector3.zero, false, false, true);
					}
				}
			}
		}
		catch
		{
			return;
		}
		sceneChanged = false;
	}
}