using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using DearImGuiInjection;
using DearImGuiInjection.BepInEx;
using Everything;
using ImGuiNET;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
using Zorro.Core.Serizalization;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Ashley.MeshSplitter")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("com.rlabrecque.steamworks.net")]
[assembly: IgnoresAccessChecksTo("DemiLib")]
[assembly: IgnoresAccessChecksTo("DOTween")]
[assembly: IgnoresAccessChecksTo("DOTweenPro")]
[assembly: IgnoresAccessChecksTo("HBAO.Runtime")]
[assembly: IgnoresAccessChecksTo("HBAO.Universal.Runtime")]
[assembly: IgnoresAccessChecksTo("Mono.Security")]
[assembly: IgnoresAccessChecksTo("netstandard")]
[assembly: IgnoresAccessChecksTo("Newtonsoft.Json")]
[assembly: IgnoresAccessChecksTo("Photon3Unity3D")]
[assembly: IgnoresAccessChecksTo("PhotonChat")]
[assembly: IgnoresAccessChecksTo("PhotonRealtime")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Demos")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")]
[assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.API")]
[assembly: IgnoresAccessChecksTo("PhotonVoice")]
[assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")]
[assembly: IgnoresAccessChecksTo("pworld")]
[assembly: IgnoresAccessChecksTo("sc.posteffects.runtime")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.Unity.Addressables")]
[assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Modules.UnityLocalization")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")]
[assembly: IgnoresAccessChecksTo("Sirenix.Serialization")]
[assembly: IgnoresAccessChecksTo("Sirenix.Utilities")]
[assembly: IgnoresAccessChecksTo("System.ComponentModel.Composition")]
[assembly: IgnoresAccessChecksTo("System.Configuration")]
[assembly: IgnoresAccessChecksTo("System.Data.DataSetExtensions")]
[assembly: IgnoresAccessChecksTo("System.EnterpriseServices")]
[assembly: IgnoresAccessChecksTo("System.Security")]
[assembly: IgnoresAccessChecksTo("System.ServiceModel.Internals")]
[assembly: IgnoresAccessChecksTo("System.Transactions")]
[assembly: IgnoresAccessChecksTo("Tayx.Graphy")]
[assembly: IgnoresAccessChecksTo("unity-websocket-sharp")]
[assembly: IgnoresAccessChecksTo("Unity.Addressables")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.InternalAPIEngineBridge.013")]
[assembly: IgnoresAccessChecksTo("Unity.Localization")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.MemoryProfiler")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Center.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Playmode.Common.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Playmode")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Rendering.LightTransport.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipeline.Universal.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime.Shared")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.GPUDriven.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.2D.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Universal.Shaders")]
[assembly: IgnoresAccessChecksTo("Unity.ResourceManager")]
[assembly: IgnoresAccessChecksTo("Unity.ScriptableBuildPipeline")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication.PlayerAccounts")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Multiplayer")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Wire.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Splines")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.AMDModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: IgnoresAccessChecksTo("UnityUIExtensions")]
[assembly: IgnoresAccessChecksTo("websocket-sharp")]
[assembly: IgnoresAccessChecksTo("Whinarn.UnityMeshSimplifier.Runtime")]
[assembly: IgnoresAccessChecksTo("Zorro.AutoLOD")]
[assembly: IgnoresAccessChecksTo("Zorro.ControllerSupport")]
[assembly: IgnoresAccessChecksTo("Zorro.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Zorro.JiggleBones")]
[assembly: IgnoresAccessChecksTo("Zorro.PhotonUtility")]
[assembly: IgnoresAccessChecksTo("Zorro.Settings.Runtime")]
[assembly: IgnoresAccessChecksTo("Zorro.UI.Runtime")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyCompany("Everything")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyInformationalVersion("1.0.2+c101882d79a3c807b1fcc1dc4b7659573943e771")]
[assembly: AssemblyProduct("Everything")]
[assembly: AssemblyTitle("Everything")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.0")]
[module: UnverifiableCode]
[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.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
internal class ConfigValue<T>
{
public bool constantUpdating;
public T value;
public ConfigValue(T value, bool constantUpdating = false)
{
this.value = value;
this.constantUpdating = constantUpdating;
}
}
internal class ConfigValues
{
public static ConfigValue<float> speed = new ConfigValue<float>(1f);
public static ConfigValue<float> jump = new ConfigValue<float>(1f);
public static ConfigValue<float> flySpeed = new ConfigValue<float>(5f);
public static bool windowLocked = false;
public static ConfigValue<bool> fly = new ConfigValue<bool>(value: false);
public static ConfigValue<bool> removeHunger = new ConfigValue<bool>(value: false);
public static ConfigValue<bool> eruptionSpawn = new ConfigValue<bool>(value: false);
public static ConfigValue<bool> noFallDamage = new ConfigValue<bool>(value: false);
public static ConfigValue<bool> infiniteStamina = new ConfigValue<bool>(value: false);
public static ConfigValue<bool> statusLock = new ConfigValue<bool>(value: false);
public static ImGuiWindowFlags everythingWindowFlags = (ImGuiWindowFlags)0;
}
internal class ConstantFields
{
private static PropertyInfo infiniteStamina;
private static PropertyInfo statusLock;
private static FieldInfo fallDamageTime;
public static PropertyInfo GetInfiniteStaminaField()
{
if (infiniteStamina == null)
{
PropertyInfo[] properties = typeof(Character).GetProperties();
foreach (PropertyInfo propertyInfo in properties)
{
if (propertyInfo.Name.ToLower().Contains("infinitestam"))
{
infiniteStamina = propertyInfo;
break;
}
}
}
return infiniteStamina;
}
public static PropertyInfo GetStatusLockField()
{
if (statusLock == null)
{
PropertyInfo[] properties = typeof(Character).GetProperties();
foreach (PropertyInfo propertyInfo in properties)
{
if (propertyInfo.Name.ToLower().Contains("statuseslocked"))
{
statusLock = propertyInfo;
break;
}
}
}
return statusLock;
}
public static FieldInfo GetFallDamageTime()
{
if (fallDamageTime == null)
{
FieldInfo[] fields = typeof(CharacterMovement).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
foreach (FieldInfo fieldInfo in fields)
{
Plugin.Logger.LogError((object)fieldInfo.Name);
if (fieldInfo.Name.ToLower().Contains("falldamagetime"))
{
fallDamageTime = fieldInfo;
break;
}
}
}
return fallDamageTime;
}
}
public class CorRunner
{
private Coroutine cor;
private Func<IEnumerator> enumeratorFunc;
public CorRunner(Func<IEnumerator> enumeratorFunc)
{
cor = null;
this.enumeratorFunc = enumeratorFunc;
}
public void Start()
{
Stop();
cor = ((MonoBehaviour)Plugin.Component).StartCoroutine(enumeratorFunc());
}
public void Stop()
{
if (cor != null)
{
((MonoBehaviour)Plugin.Component).StopCoroutine(cor);
cor = null;
}
}
public void Toggle(bool val)
{
if (val)
{
Start();
}
else
{
Stop();
}
}
}
public class EventComponent : MonoBehaviour
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static Action <>9__3_0;
internal void <Start>b__3_0()
{
}
}
private void Update()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_0207: Unknown result type (might be due to invalid IL or missing references)
//IL_020a: Unknown result type (might be due to invalid IL or missing references)
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_022e: Unknown result type (might be due to invalid IL or missing references)
//IL_0270: Unknown result type (might be due to invalid IL or missing references)
//IL_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: Unknown result type (might be due to invalid IL or missing references)
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_029c: Unknown result type (might be due to invalid IL or missing references)
//IL_02df: Unknown result type (might be due to invalid IL or missing references)
//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
//IL_02af: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
//IL_030b: Unknown result type (might be due to invalid IL or missing references)
//IL_034e: Unknown result type (might be due to invalid IL or missing references)
//IL_0351: Unknown result type (might be due to invalid IL or missing references)
//IL_0358: Unknown result type (might be due to invalid IL or missing references)
//IL_031b: Unknown result type (might be due to invalid IL or missing references)
//IL_031e: Unknown result type (might be due to invalid IL or missing references)
//IL_032f: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Unknown result type (might be due to invalid IL or missing references)
//IL_0374: Unknown result type (might be due to invalid IL or missing references)
//IL_0383: Unknown result type (might be due to invalid IL or missing references)
//IL_0386: Unknown result type (might be due to invalid IL or missing references)
//IL_0397: Unknown result type (might be due to invalid IL or missing references)
//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(Plugin.configKeyBind.Value))
{
Plugin.showMenu = !Plugin.showMenu;
}
if (Object.op_Implicit((Object)(object)GameHelpers.GetMovementComponent()))
{
if (ConfigValues.speed.constantUpdating)
{
GameHelpers.GetMovementComponent().movementModifier = ConfigValues.speed.value;
}
if (ConfigValues.jump.constantUpdating)
{
GameHelpers.GetMovementComponent().jumpGravity = ConfigValues.jump.value;
}
if (ConfigValues.noFallDamage.constantUpdating && ConfigValues.noFallDamage.value && ConstantFields.GetFallDamageTime() != null)
{
CharacterMovement movementComponent = GameHelpers.GetMovementComponent();
ConstantFields.GetFallDamageTime().SetValueDirect(__makeref(movementComponent), ConfigValues.noFallDamage.value ? 999f : 1.5f);
}
}
if (!Object.op_Implicit((Object)(object)GameHelpers.GetCharacterComponent()))
{
return;
}
if (ConfigValues.infiniteStamina.constantUpdating && ConfigValues.infiniteStamina.value && ConstantFields.GetInfiniteStaminaField() != null)
{
ConstantFields.GetInfiniteStaminaField().SetValue(GameHelpers.GetCharacterComponent(), ConfigValues.infiniteStamina.value);
}
if (ConfigValues.statusLock.constantUpdating && ConfigValues.statusLock.value && ConstantFields.GetStatusLockField() != null)
{
ConstantFields.GetStatusLockField().SetValue(GameHelpers.GetCharacterComponent(), ConfigValues.statusLock.value);
}
if (!ConfigValues.fly.value || !Object.op_Implicit((Object)(object)GameHelpers.GetRagdollComponent()) || !Object.op_Implicit((Object)(object)GameHelpers.GetMovementComponent()))
{
return;
}
GameHelpers.GetMovementComponent().maxGravity = 0f;
CharacterRagdoll ragdollComponent = GameHelpers.GetRagdollComponent();
if (ragdollComponent.partDict.ContainsKey((BodypartType)0))
{
Vector3 forward = ((Component)Camera.main).gameObject.transform.forward;
Vector3 right = ((Component)Camera.main).gameObject.transform.right;
float deltaTime = Time.deltaTime;
float value = ConfigValues.flySpeed.value;
float value2 = Plugin.controllerThreshold.Value;
ragdollComponent.HaltBodyVelocity();
if (Input.GetKey((KeyCode)119))
{
ragdollComponent.MoveAllRigsInDirection(forward * deltaTime * value);
}
else if (Gamepad.current != null && ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().y >= value2)
{
ragdollComponent.MoveAllRigsInDirection(forward * deltaTime * (value * ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().y));
}
if (Input.GetKey((KeyCode)115))
{
ragdollComponent.MoveAllRigsInDirection(-forward * deltaTime * value);
}
else if (Gamepad.current != null && ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().y <= 0f - value2)
{
ragdollComponent.MoveAllRigsInDirection(forward * deltaTime * (value * ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().y));
}
if (Input.GetKey((KeyCode)97))
{
ragdollComponent.MoveAllRigsInDirection(-right * deltaTime * value);
}
else if (Gamepad.current != null && ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().x <= 0f - value2)
{
ragdollComponent.MoveAllRigsInDirection(right * deltaTime * (value * ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().x));
}
if (Input.GetKey((KeyCode)100))
{
ragdollComponent.MoveAllRigsInDirection(right * deltaTime * value);
}
else if (Gamepad.current != null && ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().x >= value2)
{
ragdollComponent.MoveAllRigsInDirection(right * deltaTime * (value * ((InputControl<Vector2>)(object)Gamepad.current.leftStick).ReadValue().x));
}
}
}
private void OnGUI()
{
}
private void LateUpdate()
{
}
private void Start()
{
if (<>c.<>9__3_0 == null)
{
<>c.<>9__3_0 = delegate
{
};
}
}
}
internal class GameHelpers
{
private static CharacterMovement localMovement;
private static Character localCharacter;
private static CharacterRagdoll localCharRagdoll;
internal static CharacterMovement GetMovementComponent()
{
if ((Object)(object)localMovement != (Object)null)
{
return localMovement;
}
if ((Object)(object)Character.localCharacter == (Object)null || (Object)(object)((Component)Character.localCharacter).gameObject == (Object)null || (Object)(object)((Component)Character.localCharacter).gameObject.GetComponent<CharacterMovement>() == (Object)null)
{
return null;
}
localMovement = ((Component)Character.localCharacter).gameObject.GetComponent<CharacterMovement>();
return localMovement;
}
internal static Character GetCharacterComponent()
{
if ((Object)(object)localCharacter != (Object)null)
{
return localCharacter;
}
if ((Object)(object)Character.localCharacter == (Object)null)
{
return null;
}
localCharacter = Character.localCharacter;
return localCharacter;
}
internal static CharacterRagdoll GetRagdollComponent()
{
if ((Object)(object)localCharRagdoll != (Object)null)
{
return localCharRagdoll;
}
if ((Object)(object)Character.localCharacter == (Object)null || (Object)(object)((Component)Character.localCharacter).gameObject.GetComponent<CharacterRagdoll>() == (Object)null)
{
return null;
}
localCharRagdoll = ((Component)Character.localCharacter).gameObject.GetComponent<CharacterRagdoll>();
return localCharRagdoll;
}
}
namespace Everything
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Everything", "Everything", "1.0.2")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
internal static EventComponent Component;
internal static List<Item> items = new List<Item>();
internal static List<Character> players = new List<Character>();
internal static List<string> itemNames = new List<string>();
internal static List<string> playerNames = new List<string>();
internal static int itemsSelected = -1;
internal static int playerSelected = -1;
internal static byte inventorySlotNum = 0;
internal static CorRunner noHungerRunner = new CorRunner(RemoveHungerLoop);
internal static bool openedPlayerSelect = false;
internal static byte[] inventorySearchBuffer = new byte[1000];
internal static bool showMenu = true;
public static ConfigEntry<KeyCode> configKeyBind;
public static ConfigEntry<float> controllerThreshold;
private void Awake()
{
configKeyBind = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Keybinds", "ToggleKey", (KeyCode)278, "The key used to toggle the GUI on and off");
controllerThreshold = ((BaseUnityPlugin)this).Config.Bind<float>("Controller", "Threshold", 0.05f, "How much a joystick must be pushed until it's value is read");
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Plugin Everything is loaded!");
string[] commandLineArgs = Environment.GetCommandLineArgs();
foreach (string text in commandLineArgs)
{
Logger.LogInfo((object)("Launch Options " + text + ".!"));
}
Component = ((Component)this).gameObject.AddComponent<EventComponent>();
DearImGuiInjection.Render += MyUI;
}
private static void MyUI()
{
//IL_001b: 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_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
if (!showMenu)
{
return;
}
DearImGuiInjection.ToggleCursorActions(true);
DearImGuiInjection.AllowPassthroughInput = true;
if (!ImGui.Begin("Everything Menu", ConfigValues.everythingWindowFlags))
{
return;
}
if (ImGui.Checkbox("Lock", ref ConfigValues.windowLocked))
{
if (ConfigValues.windowLocked)
{
ConfigValues.everythingWindowFlags = (ImGuiWindowFlags)(ConfigValues.everythingWindowFlags | 4);
}
else
{
ConfigValues.everythingWindowFlags = (ImGuiWindowFlags)(ConfigValues.everythingWindowFlags ^ 4);
}
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Locks the mod menu position.");
}
if (ImGui.Checkbox("Fly", ref ConfigValues.fly.value))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
CharacterMovement movementComponent2 = GameHelpers.GetMovementComponent();
if ((Object)(object)movementComponent2 != (Object)null)
{
CharacterRagdoll ragdollComponent = GameHelpers.GetRagdollComponent();
if (ragdollComponent != null)
{
ragdollComponent.ToggleCollision(!ConfigValues.fly.value);
}
if (!ConfigValues.fly.value)
{
movementComponent2.maxGravity = -500f;
}
else
{
ConfigValues.noFallDamage.value = true;
ConfigValues.noFallDamage.constantUpdating = true;
}
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Lets you fly. Kinda buggy since I suck. Also isn't synced very well with other players.");
}
ImGui.SliderFloat("Fly Speed", ref ConfigValues.flySpeed.value, 10f, 200f);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Fly Speed...duh");
}
ImGui.Checkbox("Const##0", ref ConfigValues.noFallDamage.constantUpdating);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Makes this option constantly apply.");
}
ImGui.SameLine();
if (ImGui.Checkbox("No Fall Damage", ref ConfigValues.noFallDamage.value))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
if (Object.op_Implicit((Object)(object)GameHelpers.GetMovementComponent()))
{
try
{
CharacterMovement movementComponent = GameHelpers.GetMovementComponent();
ConstantFields.GetFallDamageTime().SetValueDirect(__makeref(movementComponent), ConfigValues.noFallDamage.value ? 999f : 1.5f);
}
catch (Exception ex6)
{
Logger.LogError((object)ex6);
Logger.LogError((object)ex6.Message);
Logger.LogError((object)ex6.StackTrace);
}
}
});
}
ImGui.Checkbox("Const##-1", ref ConfigValues.statusLock.constantUpdating);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Makes this option constantly apply.");
}
ImGui.SameLine();
if (ImGui.Checkbox("Status Lock", ref ConfigValues.statusLock.value))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
if (Object.op_Implicit((Object)(object)GameHelpers.GetCharacterComponent()))
{
ConstantFields.GetStatusLockField()?.SetValue(GameHelpers.GetCharacterComponent(), ConfigValues.statusLock.value);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Stops statuses from changing. (poison/sleep/etc)");
}
ImGui.Checkbox("Const##1", ref ConfigValues.infiniteStamina.constantUpdating);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Makes this option constantly apply.");
}
ImGui.SameLine();
if (ImGui.Checkbox("Freeze Stamina", ref ConfigValues.infiniteStamina.value))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
if ((Object)(object)GameHelpers.GetCharacterComponent() == (Object)null)
{
Logger.LogError((object)"NOCOMOPOPDKDNJIDNWIQND ");
}
if (ConstantFields.GetInfiniteStaminaField() == null)
{
Logger.LogError((object)"NO STAMMMMJDKNDJIKQJKDNQ ");
}
if (Object.op_Implicit((Object)(object)GameHelpers.GetCharacterComponent()))
{
ConstantFields.GetInfiniteStaminaField()?.SetValue(GameHelpers.GetCharacterComponent(), ConfigValues.infiniteStamina.value);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Freezes Stamina.");
}
ImGui.Checkbox("Const##2", ref ConfigValues.speed.constantUpdating);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Makes this option constantly apply.");
}
ImGui.SameLine();
if (ImGui.SliderFloat("Speed", ref ConfigValues.speed.value, 1f, 20f))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
if (Object.op_Implicit((Object)(object)GameHelpers.GetMovementComponent()))
{
GameHelpers.GetMovementComponent().movementModifier = ConfigValues.speed.value;
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Movement Speed Multiplier.");
}
ImGui.Checkbox("Const##3", ref ConfigValues.jump.constantUpdating);
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Makes this option constantly apply.");
}
ImGui.SameLine();
if (ImGui.SliderFloat("Jump", ref ConfigValues.jump.value, 1f, 500f))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
if (Object.op_Implicit((Object)(object)GameHelpers.GetMovementComponent()))
{
GameHelpers.GetMovementComponent().jumpGravity = ConfigValues.jump.value;
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Jump Multiplier.");
}
if (ImGui.Checkbox("Remove Everyone's Hunger Loop", ref ConfigValues.removeHunger.value))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
noHungerRunner.Toggle(ConfigValues.removeHunger.value);
});
}
if (ImGui.Button("Tele To 0,0,0"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
Character localCharacter = Character.localCharacter;
if (localCharacter != null)
{
PhotonView photonView = ((MonoBehaviourPun)localCharacter).photonView;
if (photonView != null)
{
photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2]
{
(object)new Vector3(0f, 0f, 0f),
true
});
}
}
});
}
if (ImGui.Button("Refresh Inventory Items"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: 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_0053: Unknown result type (might be due to invalid IL or missing references)
try
{
items.Clear();
itemNames.Clear();
itemsSelected = -1;
Item[] array2 = Resources.FindObjectsOfTypeAll<Item>();
for (int l = 0; l < array2.Length; l++)
{
if ((Object)(object)array2[l] != (Object)null)
{
Scene scene = ((Component)array2[l]).gameObject.scene;
if (((Scene)(ref scene)).handle == 0)
{
scene = ((Component)array2[l]).gameObject.scene;
if (string.IsNullOrEmpty(((Scene)(ref scene)).name))
{
items.Add(array2[l]);
itemNames.Add(array2[l].GetName());
}
}
}
}
}
catch (Exception ex5)
{
Logger.LogError((object)ex5);
Logger.LogError((object)ex5.Message);
Logger.LogError((object)ex5.StackTrace);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Refreshes the list of spawnable items.");
}
if (ImGui.RadioButton("Slot 1", inventorySlotNum == 0))
{
inventorySlotNum = 0;
}
ImGui.SameLine();
if (ImGui.RadioButton("Slot 2", inventorySlotNum == 1))
{
inventorySlotNum = 1;
}
ImGui.SameLine();
if (ImGui.RadioButton("Slot 3", inventorySlotNum == 2))
{
inventorySlotNum = 2;
}
if (ImGui.BeginCombo("Items##InventorySelect", (itemsSelected == -1) ? "None" : itemNames[itemsSelected]))
{
ImGui.InputText("##InventorySearch", inventorySearchBuffer, (uint)inventorySearchBuffer.Length);
for (int i = 0; i < itemNames.Count; i++)
{
int num = i;
if (!itemNames[i].ToLower().Contains(Encoding.UTF8.GetString(inventorySearchBuffer).Split(new char[1])[0].ToLower()))
{
continue;
}
if (ImGui.Selectable($"{itemNames[i]}##{num}Item1InvEditor", itemsSelected == num))
{
itemsSelected = i;
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)Player.localPlayer != (Object)null && Player.localPlayer.itemSlots != null && Player.localPlayer.itemSlots.Length >= 3)
{
Player.localPlayer.itemSlots[inventorySlotNum].prefab = items[itemsSelected];
Player.localPlayer.itemSlots[inventorySlotNum].data = new ItemInstanceData(Guid.NewGuid());
ItemInstanceDataHandler.AddInstanceData(Player.localPlayer.itemSlots[inventorySlotNum].data);
byte[] array = IBinarySerializable.ToManagedArray<InventorySyncData>(new InventorySyncData(Player.localPlayer.itemSlots, Player.localPlayer.backpackSlot, Player.localPlayer.tempFullSlot));
((MonoBehaviourPun)Player.localPlayer).photonView.RPC("SyncInventoryRPC", (RpcTarget)1, new object[2] { array, true });
}
});
}
if (itemsSelected == i)
{
ImGui.SetItemDefaultFocus();
}
}
ImGui.EndCombo();
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Clicking on an item will place it in the selected inventory slot.");
}
if (ImGui.Button("Give Items 999 Recharge"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Invalid comparison between Unknown and I4
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Invalid comparison between Unknown and I4
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Invalid comparison between Unknown and I4
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Invalid comparison between Unknown and I4
if ((Object)(object)Player.localPlayer != (Object)null && Player.localPlayer.itemSlots != null)
{
ItemSlot[] itemSlots = Player.localPlayer.itemSlots;
foreach (ItemSlot val2 in itemSlots)
{
if (val2 != null && val2.data != null && val2.data.data != null)
{
foreach (KeyValuePair<DataEntryKey, DataEntryValue> datum in val2.data.data)
{
if ((int)datum.Key == 12)
{
if (datum.Value is IntItemData)
{
DataEntryValue value = datum.Value;
((IntItemData)((value is IntItemData) ? value : null)).Value = 999;
}
}
else if ((int)datum.Key == 10)
{
if (datum.Value is FloatItemData)
{
DataEntryValue value2 = datum.Value;
((FloatItemData)((value2 is FloatItemData) ? value2 : null)).Value = 999f;
}
}
else if ((int)datum.Key == 11)
{
if (datum.Value is FloatItemData)
{
DataEntryValue value3 = datum.Value;
((FloatItemData)((value3 is FloatItemData) ? value3 : null)).Value = 999f;
}
}
else if ((int)datum.Key == 2 && datum.Value is OptionableIntItemData)
{
DataEntryValue value4 = datum.Value;
((OptionableIntItemData)((value4 is OptionableIntItemData) ? value4 : null)).Value = 999;
}
}
}
}
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Tries to set the recharge/ammo/filled amount of inventory items to 999");
}
if (ImGui.Button("Bypass OutOfDate"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
GameObject obj = GameObject.Find("/Modal(Clone)/Canvas");
if (obj != null)
{
obj.SetActive(false);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Lets you play the game if you get an Out of Date screen.");
}
if (ImGui.BeginCombo("Player Select", (playerSelected == -1) ? "None" : playerNames[playerSelected]))
{
if (!openedPlayerSelect)
{
openedPlayerSelect = true;
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
try
{
players.Clear();
playerNames.Clear();
playerSelected = -1;
foreach (Character allCharacter in Character.AllCharacters)
{
players.Add(allCharacter);
playerNames.Add(allCharacter.characterName);
}
}
catch (Exception ex4)
{
Logger.LogError((object)ex4);
Logger.LogError((object)ex4.Message);
Logger.LogError((object)ex4.StackTrace);
}
});
}
for (int j = 0; j < playerNames.Count; j++)
{
int num2 = j;
if (ImGui.Selectable($"{playerNames[j]}##{j}PlayerSelector", num2 == playerSelected))
{
playerSelected = num2;
}
if (num2 == playerSelected)
{
ImGui.SetItemDefaultFocus();
}
}
ImGui.EndCombo();
}
else
{
openedPlayerSelect = false;
}
if (ImGui.Button("Revive"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: 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_0078: 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_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)
try
{
if (playerSelected >= 0 && playerSelected < players.Count && (Object)(object)players[playerSelected] != (Object)null)
{
Vector3 val = ((!((Object)(object)players[playerSelected].Ghost != (Object)null)) ? players[playerSelected].Head : ((Component)players[playerSelected].Ghost).gameObject.transform.position);
((MonoBehaviourPun)players[playerSelected]).photonView.RPC("RPCA_ReviveAtPosition", (RpcTarget)0, new object[2]
{
val + new Vector3(0f, 4f, 0f),
false
});
}
}
catch (Exception ex3)
{
Logger.LogError((object)ex3);
Logger.LogError((object)ex3.Message);
Logger.LogError((object)ex3.StackTrace);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Revives Selected Player Above You.");
}
ImGui.SameLine();
if (ImGui.Button("Warp To"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: 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)
try
{
if (playerSelected >= 0 && playerSelected < players.Count && (Object)(object)players[playerSelected] != (Object)null)
{
((MonoBehaviourPun)Character.localCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2]
{
players[playerSelected].Head + new Vector3(0f, 4f, 0f),
true
});
}
}
catch (Exception ex2)
{
Logger.LogError((object)ex2);
Logger.LogError((object)ex2.Message);
Logger.LogError((object)ex2.StackTrace);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Warps you to the selected player");
}
ImGui.SameLine();
if (ImGui.Button("Warp To Me"))
{
UnityMainThreadDispatcher.Enqueue((Action)delegate
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: 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)
try
{
if (playerSelected >= 0 && playerSelected < players.Count && (Object)(object)players[playerSelected] != (Object)null)
{
((MonoBehaviourPun)players[playerSelected]).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2]
{
Character.localCharacter.Head + new Vector3(0f, 4f, 0f),
true
});
}
}
catch (Exception ex)
{
Logger.LogError((object)ex);
Logger.LogError((object)ex.Message);
Logger.LogError((object)ex.StackTrace);
}
});
}
if (ImGui.IsItemHovered())
{
ImGui.SetTooltip("Warps selected player to you");
}
ImGui.End();
}
private static IEnumerator RemoveHungerLoop()
{
while (ConfigValues.removeHunger.value)
{
foreach (Character allCharacter in Character.AllCharacters)
{
try
{
if (allCharacter.refs.afflictions.currentStatuses[1] == 0f)
{
continue;
}
allCharacter.refs.afflictions.currentStatuses[1] = 0f;
StatusSyncData val = default(StatusSyncData);
val.statusList = new List<float>(allCharacter.refs.afflictions.currentStatuses);
float[] array = IBinarySerializable.GetFromManagedArray<StatusSyncData>(IBinarySerializable.ToManagedArray<StatusSyncData>(val)).statusList.ToArray();
((MonoBehaviourPun)allCharacter).photonView.RPC("ApplyStatusesFromFloatArrayRPC", (RpcTarget)0, new object[1] { array });
Logger.LogInfo((object)("Tick: Applied no hunger to " + allCharacter.characterName));
goto IL_011d;
}
catch (Exception ex)
{
Logger.LogError((object)ex);
Logger.LogError((object)ex.StackTrace);
goto IL_011d;
}
IL_011d:
yield return (object)new WaitForSeconds(1f);
}
yield return (object)new WaitForEndOfFrame();
}
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "Everything";
public const string PLUGIN_NAME = "Everything";
public const string PLUGIN_VERSION = "1.0.2";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}