Decompiled source of GrassEnabler v1.0.0

Mods/GrassEnabler.dll

Decompiled 4 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using GrassEnabler;
using MelonLoader;
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), "Grass Enabler", "1.0.0", "UlvakSkillz", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("GrassEnabler")]
[assembly: AssemblyDescription("Shows the Grass in the Gym")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GrassEnabler")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4f59cac8-7c2e-4613-b6c2-24e7da20d0ce")]
[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 GrassEnabler;

public class main : MelonMod
{
	private string currentScene = "";

	private bool sceneChanged = false;

	public override void OnFixedUpdate()
	{
		if (sceneChanged && currentScene == "Gym")
		{
			try
			{
				((Component)GameObject.Find("--------------SCENE--------------").transform.GetChild(2)).gameObject.SetActive(true);
				MelonLogger.Msg("Ping");
				sceneChanged = false;
			}
			catch (Exception ex)
			{
				MelonLogger.Error((object)ex);
			}
		}
	}

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