using System;
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using Il2CppRUMBLE.Managers;
using Il2CppRUMBLE.Utilities;
using MelonLoader;
using Microsoft.CodeAnalysis;
using ParkConsole;
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(Core), "ParkSettings", "1.0.0", "TacoSlayer36", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: MelonColor(255, 255, 248, 231)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("ParkSettings")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ParkSettings")]
[assembly: AssemblyTitle("ParkSettings")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace ParkConsole
{
public static class BuildInfo
{
public const string Name = "ParkSettings";
public const string Version = "1.0.0";
public const string Description = "Puts an extra settings menu in the Park";
public const string Author = "TacoSlayer36";
public const string Company = "";
}
public class Core : MelonMod
{
private bool hasCloned = false;
private string? currentScene;
private GameObject? parkSettingsClone;
private GameObject? cloneMicThreshold;
private Transform? playerHead;
private float micThresholdRenderDistance = 4f;
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
currentScene = sceneName;
if (sceneName != "Loader")
{
MelonCoroutines.Start(setup());
}
GameObject? obj = parkSettingsClone;
if (obj != null)
{
obj.SetActive(currentScene == "Park");
}
}
public override void OnFixedUpdate()
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)cloneMicThreshold == (Object)null) && !((Object)(object)playerHead == (Object)null))
{
cloneMicThreshold.SetActive(Vector3.Distance(cloneMicThreshold.transform.position, playerHead.position) <= micThresholdRenderDistance);
}
}
private IEnumerator setup()
{
yield return (object)new WaitForSeconds(5f);
if (!hasCloned && currentScene == "Gym")
{
cloneSettings();
hasCloned = true;
}
playerHead = ((Component)Singleton<PlayerManager>.instance.localPlayer.Controller).transform.GetChild(1).GetChild(0).GetChild(0);
}
private void cloneSettings()
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
parkSettingsClone = Object.Instantiate<GameObject>(GameObject.Find("--------------LOGIC--------------/Slabbuddy menu variant"));
Object.DontDestroyOnLoad((Object)(object)parkSettingsClone);
((Object)parkSettingsClone).name = "Park Settings";
parkSettingsClone.transform.position = new Vector3(-23.88f, -1.23f, -6.91f);
parkSettingsClone.transform.rotation = Quaternion.Euler(0f, 349f, 0f);
cloneMicThreshold = ((Component)parkSettingsClone.transform.GetChild(0).GetChild(0).GetChild(4)
.GetChild(1)
.GetChild(0)
.GetChild(1)
.GetChild(2)
.GetChild(3)).gameObject;
}
}
}