using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using GorillaLibrary.Models; using GorillaLibrary.Utilities; using GorillaLocomotion; using HarmonyLib; using MelonLoader; using Microsoft.CodeAnalysis; using ModTemplate; using Monke_Mod_Panel; using Monke_Mod_Panel.Attributes; 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(Mod), "Monke Mod Extras!", "1.0.3", "Estatic", null)] [assembly: MelonGame("Another Axiom", "Gorilla Tag")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MonkeModExtras")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+8025ed41e5c504147da0e8066a9e0c66a508fc81")] [assembly: AssemblyProduct("MonkeModExtras")] [assembly: AssemblyTitle("MonkeModExtras")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] 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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ModTemplate { [Toggleable] public class Beacons : Mod { public bool beaconson = false; public List myBeacons = new List(); public VRRig[] allRigs; public float rigUpdateTimer = 0f; public override string Name => "Beacons"; public override void OnEnable() { beaconson = true; rigUpdateTimer = 2f; } public override void OnDisable() { beaconson = false; for (int i = 0; i < myBeacons.Count; i++) { Object.Destroy((Object)(object)myBeacons[i]); } myBeacons.Clear(); } public override void OnModdedJoin() { } public override void OnModdedLeave() { beaconson = false; for (int i = 0; i < myBeacons.Count; i++) { Object.Destroy((Object)(object)myBeacons[i]); } myBeacons.Clear(); } public override void OnUpdate() { //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) if (!beaconson) { return; } rigUpdateTimer += Time.deltaTime; if (rigUpdateTimer >= 2f || allRigs == null) { rigUpdateTimer = 0f; allRigs = (VRRig[])(object)Object.FindObjectsOfType(typeof(VRRig)); for (int i = 0; i < myBeacons.Count; i++) { Object.Destroy((Object)(object)myBeacons[i]); } myBeacons.Clear(); for (int j = 0; j < allRigs.Length; j++) { if (!allRigs[j].isOfflineVRRig && !allRigs[j].isMyPlayer) { GameObject val = GameObject.CreatePrimitive((PrimitiveType)2); Object.Destroy((Object)(object)val.GetComponent()); val.transform.localScale = new Vector3(0.04f, 200f, 0.04f); ((Renderer)val.GetComponent()).material = ((Renderer)allRigs[j].mainSkin).material; myBeacons.Add(val); } } } int num = 0; for (int k = 0; k < allRigs.Length; k++) { if (!allRigs[k].isOfflineVRRig && !allRigs[k].isMyPlayer && num < myBeacons.Count) { myBeacons[num].transform.position = ((Component)allRigs[k]).transform.position; num++; } } } } [Toggleable] public class Checkpoint : Mod { private GameObject checkpointer; public float maxDistance = 100f; public bool enablayd; public override string Name => "Checkpoint"; public override void OnEnable() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) enablayd = true; checkpointer = GameObject.CreatePrimitive((PrimitiveType)0); checkpointer.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f); checkpointer.GetComponent().material = new Material(Shader.Find("GorillaTag/UberShader")); checkpointer.GetComponent().material.color = Color.purple; ObjectExtensions.Destroy((Object)(object)checkpointer.GetComponent()); } public override void OnDisable() { enablayd = false; ObjectExtensions.Destroy((Object)(object)checkpointer); } public override void OnModdedJoin() { } public override void OnModdedLeave() { ((Mod)this).OnDisable(); } public override void OnUpdate() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (enablayd) { if (((InputTracker)InputUtility.RightSecondary).pressed) { GTPlayer.Instance.TeleportTo(checkpointer.transform.position, Quaternion.identity, false, false); checkpointer.GetComponent().material.color = Color.green; } if (InputUtility.RightGrip.GetValue() > 0.7f && !((InputTracker)InputUtility.RightSecondary).pressed) { checkpointer.transform.position = GorillaTagger.Instance.rightHandTransform.position; checkpointer.GetComponent().material.color = Color.purple; } else if (!((InputTracker)InputUtility.RightSecondary).pressed) { checkpointer.GetComponent().material.color = Color.blue; } } } } [Toggleable] public class GripMonk : Mod { private static Harmony harmony = new Harmony("com.est.gtag.gripmonk"); public static bool inModdedRoom = false; public override string Name => "Grip Monk"; public override void OnInitializeMelon() { inModdedRoom = false; MethodInfo methodInfo = AccessTools.Method(typeof(GTPlayer), "GetSlidePercentage", (Type[])null, (Type[])null); harmony.Unpatch((MethodBase)methodInfo, (HarmonyPatchType)0, "*"); } public override void OnEnable() { inModdedRoom = true; harmony.PatchAll(Assembly.GetExecutingAssembly()); } public override void OnDisable() { inModdedRoom = false; MethodInfo methodInfo = AccessTools.Method(typeof(GTPlayer), "GetSlidePercentage", (Type[])null, (Type[])null); harmony.Unpatch((MethodBase)methodInfo, (HarmonyPatchType)0, "*"); } public override void OnUpdate() { } public override void OnModdedJoin() { inModdedRoom = true; } public override void OnModdedLeave() { inModdedRoom = false; MethodInfo methodInfo = AccessTools.Method(typeof(GTPlayer), "GetSlidePercentage", (Type[])null, (Type[])null); harmony.Unpatch((MethodBase)methodInfo, (HarmonyPatchType)0, "*"); } } [HarmonyPatch(typeof(GTPlayer), "GetSlidePercentage")] public class SlidePatch { private static void Postfix(ref float __result) { if (GripMonk.inModdedRoom) { __result = 0.03f; } } } [Toggleable] public class IronMonke : Mod { public override string Name => "Iron Monke (LG & RG)"; public override void OnUpdate() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) if (((ControllerInputPoller)ControllerInputPoller.instance).rightGrab) { Rigidbody attachedRigidbody = ((Collider)GTPlayer.Instance.bodyCollider).attachedRigidbody; attachedRigidbody.velocity += ((Component)GorillaTagger.Instance.rightHandTransform).transform.right * 7f * Time.deltaTime * GTPlayer.Instance.scale; } if (((ControllerInputPoller)ControllerInputPoller.instance).leftGrab) { Rigidbody attachedRigidbody2 = ((Collider)GTPlayer.Instance.bodyCollider).attachedRigidbody; attachedRigidbody2.velocity += ((Component)GorillaTagger.Instance.leftHandTransform).transform.right * -7f * Time.deltaTime * GTPlayer.Instance.scale; } } } [Toggleable] public class LongArms : Mod { public override string Name => "Long Arms"; public override void OnUpdate() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (((ControllerInputPoller)ControllerInputPoller.instance).rightControllerSecondaryButton) { ((Component)GTPlayer.Instance).transform.localScale = new Vector3(1f, 1f, 1f); } if (((ControllerInputPoller)ControllerInputPoller.instance).rightControllerPrimaryButton) { ((Component)GTPlayer.Instance).transform.localScale = new Vector3(2f, 2f, 2f); } } public override void OnDisable() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) ((Component)GTPlayer.Instance).transform.localScale = new Vector3(1f, 1f, 1f); } public override void OnModdedLeave() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) ((Component)GTPlayer.Instance).transform.localScale = new Vector3(1f, 1f, 1f); } } public class Mod : MelonMod { } [Toggleable] public class NoClip : Mod { public static bool NoClipOn; public override string Name => "No Clip (Y)"; public override void OnUpdate() { if (((ControllerInputPoller)ControllerInputPoller.instance).leftControllerSecondaryButton && !NoClipOn) { MeshCollider[] array = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array.Length; i++) { ((Collider)array[i]).enabled = false; } NoClipOn = true; } if (!((ControllerInputPoller)ControllerInputPoller.instance).leftControllerSecondaryButton && NoClipOn) { MeshCollider[] array2 = Resources.FindObjectsOfTypeAll(); for (int j = 0; j < array2.Length; j++) { ((Collider)array2[j]).enabled = true; } NoClipOn = false; } } } [Toggleable] public class SpiderMonke : Mod { private SpringJoint rightJoint; private SpringJoint leftJoint; private LineRenderer rightLR; private LineRenderer leftLR; private Vector3 rightPoint; private Vector3 leftPoint; private GameObject rightBall; private GameObject leftBall; private bool inModded = false; public override string Name => "Spider Monke"; private void Setup() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown rightLR = ((Component)GTPlayer.Instance).gameObject.AddComponent(); leftLR = new GameObject().AddComponent(); LineRenderer[] array = (LineRenderer[])(object)new LineRenderer[2] { rightLR, leftLR }; foreach (LineRenderer val in array) { ((Renderer)val).material = new Material(Shader.Find("Sprites/Default")); float startWidth = (val.endWidth = 0.02f); val.startWidth = startWidth; val.positionCount = 0; } rightBall = CreateBall(); leftBall = CreateBall(); } private void Teardown() { Object.Destroy((Object)(object)rightJoint); Object.Destroy((Object)(object)leftJoint); Object.Destroy((Object)(object)rightLR); Object.Destroy((Object)(object)leftLR); Object.Destroy((Object)(object)rightBall); Object.Destroy((Object)(object)leftBall); } private GameObject CreateBall() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) //IL_004a: Expected O, but got Unknown GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); val.transform.localScale = Vector3.one * 0.1f; val.GetComponent().enabled = false; val.GetComponent().material = new Material(Shader.Find("GorillaTag/UberShader")); val.SetActive(false); return val; } public override void OnEnable() { if (inModded) { Setup(); } } public override void OnDisable() { if (inModded) { Teardown(); } } public override void OnModdedJoin() { inModded = true; if (((Mod)this).Enabled) { Setup(); } } public override void OnModdedLeave() { inModded = false; Teardown(); } public override void OnUpdate() { if (inModded) { Grapple(((ControllerInputPoller)ControllerInputPoller.instance).rightControllerIndexFloat, GorillaTagger.Instance.rightHandTransform, ref rightJoint, rightLR, ref rightPoint, rightBall); Grapple(((ControllerInputPoller)ControllerInputPoller.instance).leftControllerIndexFloat, GorillaTagger.Instance.leftHandTransform, ref leftJoint, leftLR, ref leftPoint, leftBall); } } private void Grapple(float trigger, Transform hand, ref SpringJoint joint, LineRenderer lr, ref Vector3 point, GameObject ball) { //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if (trigger > 0.1f) { RaycastHit val = default(RaycastHit); if (!Object.op_Implicit((Object)(object)joint) && Physics.Raycast(hand.position, hand.forward, ref val, 100f)) { point = ((RaycastHit)(ref val)).point; joint = ((Component)GTPlayer.Instance).gameObject.AddComponent(); ((Joint)joint).autoConfigureConnectedAnchor = false; ((Joint)joint).connectedAnchor = point; float num = Vector3.Distance(((Collider)GTPlayer.Instance.bodyCollider).attachedRigidbody.position, point); joint.maxDistance = num * 0.8f; joint.minDistance = num * 0.25f; joint.spring = 20f; joint.damper = 21f; ((Joint)joint).massScale = 12f; lr.positionCount = 2; } ball.SetActive(false); if (Object.op_Implicit((Object)(object)joint)) { lr.SetPosition(0, hand.position); lr.SetPosition(1, point); } } else { Object.Destroy((Object)(object)joint); joint = null; lr.positionCount = 0; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(hand.position, hand.forward, ref val2, 100f)) { ball.transform.position = ((RaycastHit)(ref val2)).point; ball.SetActive(true); } else { ball.SetActive(false); } } } } [Toggleable] public class SuperMonke : Mod { public bool nograv = false; public bool debounce = false; public override string Name => "Super Monke"; public override void OnUpdate() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (((ControllerInputPoller)ControllerInputPoller.instance).rightControllerSecondaryButton) { Transform transform = ((Component)GTPlayer.Instance).transform; transform.position += ((Component)GorillaTagger.Instance.headCollider).transform.forward * 12f * Time.deltaTime * GTPlayer.Instance.scale; ((Collider)GTPlayer.Instance.bodyCollider).attachedRigidbody.velocity = Vector3.zero; } bool rightControllerPrimaryButton = ((ControllerInputPoller)ControllerInputPoller.instance).rightControllerPrimaryButton; if (rightControllerPrimaryButton && !debounce) { nograv = !nograv; } debounce = rightControllerPrimaryButton; if (nograv) { Rigidbody attachedRigidbody = ((Collider)GTPlayer.Instance.bodyCollider).attachedRigidbody; attachedRigidbody.velocity += ((Component)GTPlayer.Instance.bodyCollider).transform.up * 9.9f * Time.deltaTime * GTPlayer.Instance.scale; } } } [Toggleable] public class tpGun : Mod { private GameObject tpball; public float maxDistance = 100f; public bool enablayd; private RaycastHit hitData; public override string Name => "Teleport Gun"; public override void OnEnable() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) enablayd = true; tpball = GameObject.CreatePrimitive((PrimitiveType)0); tpball.GetComponent().material = new Material(Shader.Find("GorillaTag/UberShader")); tpball.GetComponent().material.color = Color.blue; ObjectExtensions.Destroy((Object)(object)tpball.GetComponent()); tpball.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f); } public override void OnDisable() { enablayd = false; ObjectExtensions.Destroy((Object)(object)tpball); } public override void OnModdedJoin() { } public override void OnModdedLeave() { ((Mod)this).OnDisable(); } public override void OnUpdate() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) Vector3 position = GorillaTagger.Instance.rightHandTransform.position; Vector3 forward = GorillaTagger.Instance.rightHandTransform.forward; float rightControllerGripFloat = ((ControllerInputPoller)ControllerInputPoller.instance).rightControllerGripFloat; float rightControllerIndexFloat = ((ControllerInputPoller)ControllerInputPoller.instance).rightControllerIndexFloat; Ray val = default(Ray); ((Ray)(ref val))..ctor(position, forward); if (!Physics.Raycast(val, ref hitData, maxDistance) || !enablayd) { return; } Vector3 point = ((RaycastHit)(ref hitData)).point; if (rightControllerGripFloat > 0.7f) { if (InputUtility.RightTrigger.GetValue() > 0.7f) { GTPlayer.Instance.TeleportTo(tpball.transform.position, Quaternion.identity, false, false); tpball.GetComponent().material.color = Color.green; } else { tpball.transform.position = point; tpball.GetComponent().material.color = Color.blue; } } } } }