Decompiled source of Temposet v1.3.0

Mods/Tempo Set.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppRUMBLE.Environment;
using MelonLoader;
using RumbleModUI;
using RumbleModdingAPI;
using Tempo_Set;
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), "TempoSet", "1.3.0", "sUwUicide", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("TempoSet")]
[assembly: AssemblyDescription("Slows Things")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("FartsMGee")]
[assembly: AssemblyProduct("TempoSet")]
[assembly: AssemblyCopyright("Copyright ©  1769")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("65ef4143-59b1-4bac-93be-ff5babf7524c")]
[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 Tempo_Set;

public static class BuildInfo
{
	public const string ModName = "TempoSet";

	public const string ModVersion = "1.3.0";

	public const string Description = "Slows Things";

	public const string Author = "sUwUicide";

	public const string Company = "FartsMGee";
}
public class Main : MelonMod
{
	private string currentScene = "Loader";

	private Mod Fartsmgee = new Mod();

	private ModSetting<float> GameSpeed;

	public override void OnSceneWasLoaded(int buildIndex, string sceneName)
	{
		currentScene = sceneName;
		Time.timeScale = 1f;
	}

	public void onnut()
	{
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Expected O, but got Unknown
		Fartsmgee.ModName = "TempoSet";
		Fartsmgee.ModVersion = "1.3.0";
		Fartsmgee.SetFolder("TempoSetUI");
		GameSpeed = Fartsmgee.AddToList("Game Speed", 1f, "Changes the game engine speed where 1 is 100% gamespeed and 0.5 is 50% game speed." + Environment.NewLine + "To apply values type the number in the box, press enter then save. WARNING DO NOT set your value as 0, you will have to restart your game if you do.", new Tags());
		Fartsmgee.ModSaved += hasnut;
		UI.instance.AddMod(Fartsmgee);
		MelonLogger.Msg("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
	}

	public void hasnut()
	{
		if ((!(currentScene != "Gym") || !(currentScene != "Park")) && (!(currentScene == "Park") || !(((Object)Parkboard.GetGameObject().GetComponent<ParkBoardParkVariant>().currentParkDoorPolicyImage.sprite).name != "Closed_Park_Icon")))
		{
			Time.timeScale = (float)((ModSetting)GameSpeed).SavedValue;
		}
	}

	public override void OnLateInitializeMelon()
	{
		((MelonBase)this).OnLateInitializeMelon();
		UI.instance.UI_Initialized += onnut;
	}
}