using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppRUMBLE.Networking.MatchFlow.Regions.Interactions;
using Il2CppRUMBLE.UI;
using MelonLoader;
using RumbleModdingAPI;
using SpeedDial;
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(ClassSD), "SpeedDial", "1.1.1", "Marcopolo1613", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("SpeedDial")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SpeedDial")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("138ef4a5-245f-4c7b-a130-69645d5b6e5b")]
[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 SpeedDial;
public class ClassSD : MelonMod
{
private string currentScene = "Loader";
private bool sceneChanged = false;
private bool loaded = false;
private int delayCycle = 0;
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
currentScene = sceneName;
sceneChanged = true;
delayCycle = 10;
loaded = false;
}
public override void OnFixedUpdate()
{
if (currentScene != "Gym")
{
return;
}
if (sceneChanged)
{
if (delayCycle > 1)
{
delayCycle--;
}
else
{
if (!loaded)
{
try
{
Transform child = Gym.GetGymRegionSelectorGameObject().transform.GetChild(0).GetChild(1).GetChild(2)
.GetChild(1);
((Component)child.GetChild(0)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
((Component)child.GetChild(1)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
((Component)child.GetChild(2)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
Transform child2 = Gym.GetGymRegionSelectorGameObject().transform.GetChild(0).GetChild(1).GetChild(3)
.GetChild(1);
((Component)child2.GetChild(0)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
((Component)child2.GetChild(1)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
((Component)child2.GetChild(2)).GetComponent<RevolvingNumber>().stepDuration = 0.001f;
RegionSelector component = ((Component)Gym.GetGymRegionSelectorGameObject().transform.GetChild(0).GetChild(1).GetChild(0)).GetComponent<RegionSelector>();
component.updateInterval = 0.4f;
loaded = true;
}
catch
{
MelonLogger.Msg("items failed to load");
return;
}
}
sceneChanged = false;
}
}
if (!loaded)
{
}
}
}