Decompiled source of Nebula Menu v1.0.0
NebulaMenu.dll
Decompiled 5 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using System.Text.RegularExpressions; using Ballistics; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using Construction.Anim; using Endnight.Types; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using Sons; using Sons.Ai.Vail; using Sons.Ai.Vail.StimuliTypes; using Sons.Characters; using Sons.Crafting.Structures; using Sons.Environment; using Sons.Gameplay; using Sons.Input; using Sons.Inventory; using Sons.Items.Core; using Sons.Save; using Sons.StatSystem; using Sons.Weapon; using Sons.Wearable.Race; using TheForest; using TheForest.Items.Inventory; using TheForest.Items.Special; using TheForest.Utils; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("NebulaMenu")] [assembly: AssemblyConfiguration("Public")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+d7a841fe11ba8124d8a29421d102dca230a4e40b")] [assembly: AssemblyProduct("NebulaMenu")] [assembly: AssemblyTitle("NebulaMenu")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 NebulaMenu { internal static class Aim { internal static readonly string[] WeaponNames = new string[4] { "Bows", "Crossbow", "Slingshot", "Stones" }; private static readonly int[][] WeaponIds = new int[4][] { new int[2] { 443, 360 }, new int[1] { 365 }, new int[1] { 459 }, new int[1] { 476 } }; internal static ConfigEntry<int> Weapons; internal static ConfigEntry<bool> Dotted; internal static ConfigEntry<bool> OnlyAiming; internal static ConfigEntry<bool> ShowDistance; internal static ConfigEntry<float> Thickness; internal static ConfigEntry<float> SeeThrough; private static GameObject _pathPrefab; private static GameObject _markerPrefab; private static readonly HashSet<IntPtr> _ours = new HashSet<IntPtr>(); internal static readonly List<Vector3> Points = new List<Vector3>(); internal static Vector3? Impact; internal static Color MarkerColour = Color.white; internal static float AimSince = -1f; private static RangedWeapon _current; private static float _nextPrefabTry; internal static void Bind(ConfigFile c) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown Weapons = c.Bind<int>("Aim", "Weapons", 7, "Bit flags: 1 bows, 2 crossbow, 4 slingshot, 8 stones"); Dotted = c.Bind<bool>("Aim", "Dotted", false, "Dotted line instead of solid."); Thickness = c.Bind<float>("Aim", "Thickness", 3f, new ConfigDescription("Line thickness.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 8f), Array.Empty<object>())); SeeThrough = c.Bind<float>("Aim", "SeeThrough", 0.25f, new ConfigDescription("How see-through the line is.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 0.8f), Array.Empty<object>())); OnlyAiming = c.Bind<bool>("Aim", "OnlyWhenDrawn", false, "Only show the line once you have been aiming for a moment (bow drawn)."); ShowDistance = c.Bind<bool>("Aim", "ShowDistance", true, "Show the distance at the landing marker."); } internal static void RegisterCheats(Action<Cheat> add) { add(new Cheat("aim", "Lights & Aim", "AIM LINE", "Show where it will land", isNew: true) { OnChange = delegate(bool b) { if (!b) { HideAll(); } } }); } internal static bool WeaponOn(int i) { return (Weapons.Value & (1 << i)) != 0; } internal static void SetWeapon(int i, bool on) { Weapons.Value = (on ? (Weapons.Value | (1 << i)) : (Weapons.Value & ~(1 << i))); } internal static void Patch(Harmony h) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(RangedWeapon), "SimulateTrajectory", new Type[2] { typeof(Vector3), typeof(Vector3) }, (Type[])null); h.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(Aim), "SimPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Plugin.L.LogInfo((object)"Aim: hook on RangedWeapon.SimulateTrajectory OK"); } private static void SimPrefix(RangedWeapon __instance, ref Vector3 position, ref Vector3 direction) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) try { if (!_ours.Contains(((Il2CppObjectBase)__instance).Pointer)) { return; } Transform projectilePhysicalSpawnPoint = __instance._projectilePhysicalSpawnPoint; if (!((Object)(object)projectilePhysicalSpawnPoint == (Object)null)) { position = projectilePhysicalSpawnPoint.position; direction = projectilePhysicalSpawnPoint.forward; Ammo ammo = __instance.GetAmmo(); object obj; if (ammo == null) { obj = null; } else { AmmoProperties properties = ammo._properties; obj = ((properties != null) ? properties.ProjectileInfo : null); } ProjectileInfo val = (ProjectileInfo)obj; if (val != null) { __instance._simulatedBulletInfo = ((Il2CppObjectBase)val).TryCast<BulletInfo>(); } } } catch { } } private static bool Prefabs() { if ((Object)(object)_pathPrefab != (Object)null && (Object)(object)_markerPrefab != (Object)null) { return true; } if (Time.time < _nextPrefabTry) { return false; } _nextPrefabTry = Time.time + 10f; foreach (GrenadeWeaponController item in Resources.FindObjectsOfTypeAll<GrenadeWeaponController>()) { RangedWeapon val = ((item != null) ? ((RangedWeaponController)item).GetRangedWeapon() : null); if (!((Object)(object)val == (Object)null)) { _pathPrefab = val._trajectoryPathPrefab; _markerPrefab = val._impactTargetPrefab; if ((Object)(object)_pathPrefab != (Object)null) { return true; } } } return false; } private static RangedWeapon Held(out int itemId) { itemId = -1; PlayerInventory inventory = LocalPlayer.Inventory; if ((Object)(object)inventory == (Object)null) { return null; } ItemInstance[] array = (ItemInstance[])(object)new ItemInstance[2] { inventory.RightHandItem, inventory.LeftHandItem }; foreach (ItemInstance val in array) { if (val == null || (Object)(object)val.ItemObject == (Object)null) { continue; } for (int j = 0; j < WeaponIds.Length; j++) { int[] array2 = WeaponIds[j]; foreach (int num in array2) { if (val._itemID == num && WeaponOn(j)) { RangedWeapon componentInChildren = val.ItemObject.GetComponentInChildren<RangedWeapon>(true); if ((Object)(object)componentInChildren != (Object)null) { itemId = num; return componentInChildren; } } } } } return null; } internal static void Update() { } internal static void LateUpdate() { //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) Points.Clear(); Impact = null; if (!Cheats.Get("aim").On) { return; } int itemId; RangedWeapon val = Held(out itemId); if ((Object)(object)val == (Object)null) { _current = null; AimSince = -1f; return; } if (!_ours.Contains(((Il2CppObjectBase)val).Pointer)) { if (!Prefabs()) { return; } if ((Object)(object)val._trajectoryPathPrefab == (Object)null) { val._trajectoryPathPrefab = _pathPrefab; } if ((Object)(object)val._impactTargetPrefab == (Object)null) { val._impactTargetPrefab = _markerPrefab; } _ours.Add(((Il2CppObjectBase)val).Pointer); } _current = val; bool isAiming = val.IsAiming; if (isAiming && AimSince < 0f) { AimSince = Time.time; } if (!isAiming) { AimSince = -1f; } bool flag = (val._showImpactLocation = !OnlyAiming.Value || (isAiming && Time.time - AimSince > 0.6f)); LineRenderer trajectoryPathInstance = val._trajectoryPathInstance; if ((Object)(object)trajectoryPathInstance != (Object)null) { trajectoryPathInstance.widthMultiplier = 0f; ((Renderer)trajectoryPathInstance).enabled = false; if (flag && ((Component)trajectoryPathInstance).gameObject.activeInHierarchy) { for (int i = 0; i < trajectoryPathInstance.positionCount; i++) { Points.Add(trajectoryPathInstance.GetPosition(i)); } } } GameObject impactTargetInstance = val._impactTargetInstance; if ((Object)(object)impactTargetInstance != (Object)null) { foreach (Renderer componentsInChild in impactTargetInstance.GetComponentsInChildren<Renderer>(true)) { componentsInChild.enabled = false; } if (impactTargetInstance.transform.localScale != Vector3.zero) { impactTargetInstance.transform.localScale = Vector3.zero; } if (flag && impactTargetInstance.activeInHierarchy && Points.Count > 1) { Impact = impactTargetInstance.transform.position; } else if (flag && Points.Count > 1) { Impact = Points[Points.Count - 1]; } } else if (flag && Points.Count > 1) { Impact = Points[Points.Count - 1]; } if (Impact.HasValue) { MarkerColour = WhatIsThere(Impact.Value); } } internal static Color WhatIsThere(Vector3 p) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_0038: Invalid comparison between Unknown and I4 //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0042: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_0089: 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_008e: Unknown result type (might be due to invalid IL or missing references) try { foreach (Collider item in (Il2CppArrayBase<Collider>)(object)Physics.OverlapSphere(p, 1.5f)) { VailActor componentInParent = ((Component)item).GetComponentInParent<VailActor>(); if (!((Object)(object)componentInParent == (Object)null) && !componentInParent._isDead) { if ((int)componentInParent.TypeId == 9 || (int)componentInParent.TypeId == 10) { return new Color(0.35f, 0.75f, 1f); } return ((int)componentInParent.ClassId == 3) ? new Color(0.37f, 0.83f, 0.35f) : new Color(1f, 0.35f, 0.31f); } } } catch { } return Color.white; } internal static void HideAll() { try { if ((Object)(object)_current != (Object)null) { if ((Object)(object)_current._trajectoryPathInstance != (Object)null) { ((Renderer)_current._trajectoryPathInstance).enabled = false; } _current._showImpactLocation = false; } } catch { } Points.Clear(); Impact = null; } } public class Menu : MonoBehaviour { private ConfigEntry<KeyCode> _rebind; private static readonly int[] ConvertIds = new int[6] { 78, 409, 408, 406, 395, 640 }; private int _restoreConfirm = -1; private int _vehTab; private int _kOpen = -1; private int _kRename = -1; private int _kDrop; private string _kRenameText; private bool _kRenameFocus; private string _modSearch = ""; private string _modSel; private readonly Dictionary<ConfigEntryBase, string> _edit = new Dictionary<ConfigEntryBase, string>(); private static readonly Color Accent = new Color(0.62f, 0.42f, 0.98f); private static readonly Color Text = new Color(0.914f, 0.902f, 0.882f); private static readonly Color Dim = new Color(0.56f, 0.54f, 0.51f); private static readonly Color Line = new Color(1f, 1f, 1f, 0.06f); private static readonly Color Card = new Color(1f, 1f, 1f, 0.05f); private static readonly Color Off = new Color(0.231f, 0.239f, 0.251f); private const float W = 820f; private const float H = 620f; private const float Side = 170f; private static readonly string[] Pages = new string[15] { "Player", "World", "Building", "Items", "Teleport", "Movement", "Inventory", "Lights & Aim", "Vehicles", "Look", "Kelvin & Virginia", "Save", "Performance", "Mods", "Settings" }; private static readonly (string title, int from)[] Sections = new(string, int)[4] { ("CHEATS", 0), ("GAMEPLAY", 5), ("HELPERS", 10), ("SYSTEM", 11) }; private static readonly HashSet<string> TitlePages = new HashSet<string> { "Save", "Performance", "Mods", "Settings" }; internal static bool IsOpen; internal static Menu Instance; internal static int DrawErrors; private bool _open; private bool _inWorld; private bool _stylesReady; private bool _waitingKey; private bool _weatherOpen; private int _page; private float _pageScroll; private float _contentBottom; private float _savedTimeScale = 1f; private float _reapplyAt = -1f; private float _timeValue = 12f; private float _timeSetAt = -1f; private float _timeSlider = -1f; private string _search = ""; private string _lastSearch; private string _status = ""; private string _amountText = "1"; private int _cat; private int _selected = -1; private int _amount = 1; private float _scroll; private List<ItemEntry> _filtered = new List<ItemEntry>(); private List<Spot> _spots; private float _statusUntil; private Texture2D _round; private Texture2D _circle; private Texture2D _white; private GUIStyle _box; private GUIStyle _label; private GUIStyle _small; private GUIStyle _title; private GUIStyle _group; private GUIStyle _tab; private GUIStyle _tabOn; private GUIStyle _brand; private GUIStyle _btn; private GUIStyle _btnGhost; private GUIStyle _field; private GUIStyle _tag; private GUIStyle _center; private GUIStyle _note; private Font _font; private GUIStyle _smallRight; private string _weather = "Game decides"; private int _renameIdx = -1; private string _renameText; private bool _renameFocus; private Camera _cam; private GUIStyle _espHp; private string _dragging; private GUIStyle _tagOn; private GUIStyle _tagNew; private GUIStyle _itemLabel; private GUIStyle _fieldCenter; internal static int PageCount => Pages.Length; private void DrawAim() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_020c: 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_0213: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) if ((int)Event.current.type != 7 || Aim.Points.Count < 2) { return; } if ((Object)(object)_cam == (Object)null) { _cam = Camera.main; } if ((Object)(object)_cam == (Object)null) { return; } Color color = default(Color); ((Color)(ref color))..ctor(Accent.r, Accent.g, Accent.b, 1f - Aim.SeeThrough.Value); float value = Aim.Thickness.Value; Vector3? val = null; float num = 0f; Vector3 val3 = default(Vector3); for (int i = 0; i < Aim.Points.Count; i++) { Vector3 val2 = _cam.WorldToScreenPoint(Aim.Points[i]); if (val2.z <= 0.3f) { val = null; continue; } ((Vector3)(ref val3))..ctor(val2.x, (float)Screen.height - val2.y, 0f); if (val.HasValue) { Vector3 value2 = val.Value; Vector3 val4 = val3 - value2; float magnitude = ((Vector3)(ref val4)).magnitude; int num2 = Mathf.Max(1, Mathf.CeilToInt(magnitude / Mathf.Max(1.5f, value * 0.6f))); for (int j = 0; j < num2; j++) { num += magnitude / (float)num2; if (!Aim.Dotted.Value || !(num % (value * 5f) > value * 2.2f)) { Vector3 val5 = value2 + val4 * ((float)j / (float)num2); Color color2 = GUI.color; GUI.color = color; GUI.DrawTexture(new Rect(val5.x - value / 2f, val5.y - value / 2f, value, value), (Texture)(object)_circle); GUI.color = color2; } } } val = val3; } if (!Aim.Impact.HasValue) { return; } Vector3 val6 = _cam.WorldToScreenPoint(Aim.Impact.Value); if (val6.z > 0.3f) { Vector2 val7 = default(Vector2); ((Vector2)(ref val7))..ctor(val6.x, (float)Screen.height - val6.y); float num3 = Vector3.Distance(((Component)_cam).transform.position, Aim.Impact.Value); float num4 = Mathf.Clamp(260f / Mathf.Max(1f, num3), 7f, 26f); Color color3 = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.45f); GUI.DrawTexture(new Rect(val7.x - num4 - 2f, val7.y - num4 - 2f, num4 * 2f + 4f, num4 * 2f + 4f), (Texture)(object)_circle); GUI.color = Aim.MarkerColour; GUI.DrawTexture(new Rect(val7.x - num4, val7.y - num4, num4 * 2f, num4 * 2f), (Texture)(object)_circle); GUI.color = new Color(0.05f, 0.06f, 0.07f, 0.85f); GUI.DrawTexture(new Rect(val7.x - num4 * 0.55f, val7.y - num4 * 0.55f, num4 * 1.1f, num4 * 1.1f), (Texture)(object)_circle); GUI.color = color3; if (Aim.ShowDistance.Value) { GUI.Label(new Rect(val7.x + num4 + 6f, val7.y - 9f, 80f, 20f), $"{num3:0} m", _note); } } } private bool CheatRow(Rect c, ref float y, string id, string label = null) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) Cheat cheat = Cheats.Get(id); bool value = cheat.On; bool num = ToggleRow(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label ?? cheat.Label, ref value, isNew: false); if (num) { Cheats.Set(cheat, value); } y += 30f; return num; } private bool BoolRow(Rect c, ref float y, string label, ConfigEntry<bool> e) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) bool value = e.Value; bool num = ToggleRow(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, ref value, isNew: false); if (num) { e.Value = value; } y += 30f; return num; } private void FloatRow(Rect c, ref float y, string label, ConfigEntry<float> e, float min, float max, string fmt, float step) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) float value = e.Value; float num = SliderRow(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, value, min, max, string.Format(fmt, value), isNew: false); if (Math.Abs(num - value) > 0.0001f) { e.Value = Mathf.Clamp(Mathf.Round(num / step) * step, min, max); } y += 30f; } private void IntRow(Rect c, ref float y, string label, ConfigEntry<int> e, int min, int max, string fmt) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) float value = e.Value; int num = Mathf.Clamp(Mathf.RoundToInt(SliderRow(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, value, min, max, string.Format(fmt, e.Value), isNew: false)), min, max); if (num != e.Value) { e.Value = num; } y += 30f; } private int ChipsRow(Rect c, ref float y, string label, string[] options, int selected) { //IL_0016: 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 //IL_0045: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, isNew: false); float num = ((Rect)(ref c)).xMax; Rect val = default(Rect); for (int num2 = options.Length - 1; num2 >= 0; num2--) { float num3 = _small.CalcSize(new GUIContent(options[num2])).x + 18f; num -= num3; ((Rect)(ref val))..ctor(num, y + 5f, num3, 20f); bool flag = num2 == selected; Round(val, (Color)(flag ? Accent : new Color(1f, 1f, 1f, ((Rect)(ref val)).Contains(Event.current.mousePosition) ? 0.12f : 0.07f))); GUI.Label(val, options[num2], flag ? _tagOn : _tag); if (GUI.Button(val, GUIContent.none, GUIStyle.none)) { selected = num2; } num -= 5f; } y += 30f; return selected; } private void MultiChipsRow(Rect c, ref float y, string label, string[] options, Func<int, bool> get, Action<int, bool> set) { //IL_0016: 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 //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, isNew: false); float num = ((Rect)(ref c)).xMax; Rect val = default(Rect); for (int num2 = options.Length - 1; num2 >= 0; num2--) { float num3 = _small.CalcSize(new GUIContent(options[num2])).x + 18f; num -= num3; ((Rect)(ref val))..ctor(num, y + 5f, num3, 20f); bool flag = get(num2); Round(val, (Color)(flag ? Accent : new Color(1f, 1f, 1f, ((Rect)(ref val)).Contains(Event.current.mousePosition) ? 0.12f : 0.07f))); GUI.Label(val, options[num2], flag ? _tagOn : _tag); if (GUI.Button(val, GUIContent.none, GUIStyle.none)) { set(num2, !flag); } num -= 5f; } y += 30f; } private void KeyRow(Rect c, ref float y, string label, ConfigEntry<KeyCode> e) { //IL_0016: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Invalid comparison between Unknown and I4 //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Invalid comparison between Unknown and I4 //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, isNew: false); bool num = _rebind == e; string text = (num ? "press a key..." : (((int)e.Value == 0) ? "none" : KeyName(e.Value))); Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).xMax - 130f, y + 3f, 130f, 24f); if (Button(r, text, ghost: true)) { _rebind = e; _waitingKey = true; } if (num && (int)Event.current.type == 4 && (int)Event.current.keyCode != 0) { KeyCode keyCode = Event.current.keyCode; if ((int)keyCode == 8 || (int)keyCode == 127) { e.Value = (KeyCode)0; Flash(label + ": no key"); } else if ((int)keyCode != 27) { e.Value = keyCode; Flash(label + ": " + KeyName(keyCode)); } _rebind = null; _waitingKey = false; Event.current.Use(); } y += 30f; } internal unsafe static string KeyName(KeyCode k) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Invalid comparison between Unknown and I4 //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected I4, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 if ((int)k <= 91) { switch (k - 45) { default: if ((int)k != 91) { break; } return "["; case 0: return "-"; case 16: return "="; case 3: return "0"; case 4: return "1"; case 5: return "2"; case 6: return "3"; case 7: return "4"; case 8: return "5"; case 9: return "6"; case 10: return "7"; case 11: return "8"; case 12: return "9"; case 1: case 2: case 13: case 14: case 15: break; } } else { if ((int)k == 93) { return "]"; } if ((int)k == 96) { return "` (~ key)"; } } return ((object)(*(KeyCode*)(&k))/*cast due to .constrained prefix*/).ToString(); } private bool ButtonRow(Rect c, ref float y, string label, string button, bool ghost = false) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), label, isNew: false); float num = _btn.CalcSize(new GUIContent(button)).x + 28f; bool result = Button(new Rect(((Rect)(ref c)).xMax - num, y + 3f, num, 24f), button, ghost); y += 30f; return result; } private void Hint(Rect c, ref float y, string text, int lines = 1) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) GUIStyle val = new GUIStyle(_small) { wordWrap = true }; GUI.Label(new Rect(((Rect)(ref c)).x, y + 6f, ((Rect)(ref c)).width, (float)(18 * lines)), text, val); y += 18 * lines + 8; } private void PageMovement(Rect c) { //IL_0026: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) int num = (Cheats.Get("fly").On ? 1 : 0) + ((Settings.RunSpeed.Value > 1.01f) ? 1 : 0); float y = Header(c, "MOVEMENT", (num > 0) ? $"{num} on" : null); y = Group(c, y, "FLY"); CheatRow(c, ref y, "fly"); KeyRow(c, ref y, "Fly key", Fly.Key); FloatRow(c, ref y, "Fly speed", Fly.Speed, 4f, 80f, "{0:0}", 1f); BoolRow(c, ref y, "Fly where I look (W goes up when you look up)", Fly.Look); BoolRow(c, ref y, "Safe landing (no fall damage until you touch ground)", Fly.SafeLanding); BoolRow(c, ref y, "Show \"FLYING\" tag on screen", Fly.ShowTag); y = Group(c, y, "RUN"); float value = Settings.RunSpeed.Value; float num2 = SliderRow(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), "Run speed", value, 1f, 3f, $"{value:0.0}×", isNew: false); if (Math.Abs(num2 - value) > 0.001f) { Speed.Set(Mathf.Round(num2 * 10f) / 10f); } y += 30f; Hint(c, ref y, "While flying: Space up · Ctrl down · Shift faster · + / − change speed.\nThe fly key does nothing while you type, or in the backpack or menu.", 2); } private void DrawBackpackSearch() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Invalid comparison between Unknown and I4 //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Invalid comparison between Unknown and I4 //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Expected O, but got Unknown //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) if (!Backpack.Search.Value || !LocalPlayer.IsInInventory || _open) { return; } Event current = Event.current; if (Backpack.Typing && (int)current.type == 4) { if ((int)current.keyCode == 27) { Backpack.SetTyping(on: false); } else if ((int)current.keyCode == 13 || (int)current.keyCode == 271) { Backpack.Find(Backpack.Query, next: true); } else if ((int)current.keyCode == 8) { if (Backpack.Query.Length > 0) { Backpack.Query = Backpack.Query.Substring(0, Backpack.Query.Length - 1); Backpack.Find(Backpack.Query, next: false); } } else if (current.character != 0 && !char.IsControl(current.character) && current.character != '/') { Backpack.Query += current.character; Backpack.Find(Backpack.Query, next: false); } current.Use(); } if ((int)current.type == 7) { string text = ((Backpack.Query.Length == 0) ? "type a name" : ((Backpack.MatchCount == 0) ? "nothing found" : (Backpack.MatchCount + " found · Enter = next"))); GUIContent val = new GUIContent(Backpack.Typing ? ("Search: <b>" + Backpack.Query + "</b><color=#c4a8ff>|</color> <color=#9a948c>" + text + " · Esc = done</color>") : ("<color=#9a948c>" + KeyName(Backpack.SearchKey.Value) + " = search · Alt+1-5 = Weapons, Food, Crafting, Clothes, Ammo</color>")); Vector2 val2 = _note.CalcSize(val); Rect r = default(Rect); ((Rect)(ref r))..ctor(((float)Screen.width - val2.x) / 2f - 16f, 64f, val2.x + 32f, 30f); Round(r, new Color(0.055f, 0.063f, 0.071f, 0.88f)); GUI.Label(new Rect(((Rect)(ref r)).x + 16f, ((Rect)(ref r)).y + 7f, val2.x + 4f, 18f), val, _note); } } private void DrawHud() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Invalid comparison between Unknown and I4 //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0045: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) if ((int)Event.current.type == 7) { float num = (float)Screen.height - 120f; Rect r = default(Rect); for (int num2 = Hud.Tags.Count - 1; num2 >= 0; num2--) { GUIContent val = new GUIContent(Hud.Tags[num2]); Vector2 val2 = _note.CalcSize(val); ((Rect)(ref r))..ctor(((float)Screen.width - val2.x) / 2f - 12f, num - 26f, val2.x + 24f, 24f); Round(r, new Color(0.055f, 0.063f, 0.071f, 0.82f)); Pill(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).y, 3f, ((Rect)(ref r)).height), new Color(Accent.r, Accent.g, Accent.b, 0f)); GUI.Label(new Rect(((Rect)(ref r)).x + 12f, ((Rect)(ref r)).y + 4f, val2.x + 4f, 18f), val, _note); num -= 30f; } if (Hud.ToastText != null && Time.unscaledTime < Hud.ToastUntil) { GUIContent val3 = new GUIContent(Hud.ToastText); Vector2 val4 = _note.CalcSize(val3); Rect r2 = default(Rect); ((Rect)(ref r2))..ctor(((float)Screen.width - val4.x) / 2f - 14f, 104f, val4.x + 28f, 26f); Round(r2, new Color(Accent.r * 0.35f, Accent.g * 0.35f, Accent.b * 0.45f, 0.9f)); GUI.Label(new Rect(((Rect)(ref r2)).x + 14f, ((Rect)(ref r2)).y + 5f, val4.x + 4f, 18f), val3, _note); } } } private void PageInventory(Rect c) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_034d: 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_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) int num = new string[2] { "carry", "logcarry" }.Count((string id) => Cheats.Get(id).On); float y = Header(c, "INVENTORY", (num > 0) ? $"{num} on" : null); y = Group(c, y, "CARRY MORE"); CheatRow(c, ref y, "carry"); Carry.Mult.Value = ChipsRow(c, ref y, "How much more", Carry.MultNames, Carry.Mult.Value); MultiChipsRow(c, ref y, "Applies to", Carry.CatNames, Carry.CatOn, Carry.SetCat); Hint(c, ref y, "One item only? Open Items, pick its picture and set \"carry up to\" there."); y = Group(c, y, "LOGS, PLANKS, STONES"); CheatRow(c, ref y, "logcarry"); IntRow(c, ref y, "Carry up to", Logs.Cap, 2, 100, "{0}"); if (_inWorld) { Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), $"In stash now: {Logs.StashTotal} · in hands: {Logs.HeldCount}", isNew: false); y += 30f; } Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 58f), "Turn my stash into", isNew: false); float num2 = ((Rect)(ref c)).xMax - (float)(ConvertIds.Length * 62); int[] convertIds = ConvertIds; Rect val = default(Rect); foreach (int num4 in convertIds) { ((Rect)(ref val))..ctor(num2, y + 4f, 56f, 50f); bool flag = ((Rect)(ref val)).Contains(Event.current.mousePosition); Round(val, (Color)(flag ? new Color(Accent.r, Accent.g, Accent.b, 0.25f) : Card)); ItemData obj = ItemDatabaseManager.ItemById(num4); object obj2; if (obj == null) { obj2 = null; } else { ItemUiData uiData = obj._uiData; obj2 = ((uiData != null) ? uiData._icon : null); } Texture val2 = (Texture)obj2; if ((Object)(object)val2 != (Object)null) { GUI.DrawTexture(new Rect(((Rect)(ref val)).x + 14f, ((Rect)(ref val)).y + 3f, 28f, 28f), val2, (ScaleMode)2); } GUI.Label(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y + 32f, ((Rect)(ref val)).width, 16f), Logs.Name(num4), _tag); if (GUI.Button(val, GUIContent.none, GUIStyle.none) && _inWorld) { Logs.ConvertAll(num4, fromKey: false); } num2 += 62f; } y += 60f; Logs.Fair.Value = ChipsRow(c, ref y, "Convert mode", new string[2] { "Free 1:1", "Fair (1 log = 2 halves)" }, Logs.Fair.Value ? 1 : 0) == 1; KeyRow(c, ref y, "Put away / take out key", Logs.StowKey); KeyRow(c, ref y, "Convert key (hold the type you want)", Logs.ConvertKey); KeyRow(c, ref y, "Drop all key", Logs.DropKey); y = Group(c, y, "BACKPACK CAMERA"); FloatRow(c, ref y, "Pan speed", Backpack.Pan, 0.5f, 4f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Cursor speed", Backpack.Cursor, 0.3f, 3f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Zoom (field of view)", Backpack.Fov, 50f, 95f, "{0:0}", 1f); BoolRow(c, ref y, "Remember where I was looking", Backpack.RememberView); BoolRow(c, ref y, "Search (key below) + Alt+1–5 quick-jump in the backpack", Backpack.Search); KeyRow(c, ref y, "Backpack search key", Backpack.SearchKey); if (ButtonRow(c, ref y, "Backpack camera", "Reset to game normal", ghost: true)) { Backpack.ResetToNormal(); Flash("Backpack camera reset"); } _contentBottom = y; } private void PageSave(Rect c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Invalid comparison between Unknown and I4 //IL_01af: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) float y = Header(c, "SAVE", ((int)SaveMgr.SaveType == 2) ? "only the host can save" : "single player / host"); if (_inWorld) { Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 56f); Round(r, new Color(Accent.r, Accent.g, Accent.b, 0.12f)); if (Button(new Rect(((Rect)(ref r)).x + 14f, ((Rect)(ref r)).y + 12f, 130f, 32f), "Save now", ghost: false) && SaveMgr.SaveNow(auto: false)) { Flash("Saved"); } float num = ((SaveMgr.LastSaveTime < 0f) ? (-1f) : ((Time.realtimeSinceStartup - SaveMgr.LastSaveTime) / 60f)); GUI.Label(new Rect(((Rect)(ref r)).x + 160f, ((Rect)(ref r)).y + 10f, 400f, 20f), (num < 0f) ? "Not saved yet" : ((num < 1f) ? "Last saved just now" : $"Last saved {num:0} min ago"), _label); GUI.Label(new Rect(((Rect)(ref r)).x + 160f, ((Rect)(ref r)).y + 30f, 400f, 20f), SaveMgr.Status, _small); y += 66f; } KeyRow(c, ref y, "Save key", SaveMgr.Key); y = Group(c, y, "AUTOSAVE"); BoolRow(c, ref y, "Autosave", SaveMgr.Auto); FloatRow(c, ref y, "Every", SaveMgr.Every, 2f, 30f, "{0:0} min", 1f); BoolRow(c, ref y, "Wait until safe (not fighting, falling, flying, swimming)", SaveMgr.WaitSafe); BoolRow(c, ref y, "Remind me if not saved for 20 min", SaveMgr.Remind); y = Group(c, y, "BACKUPS (last 5 per save)"); List<(string, string, string)> list = (from b in SaveMgr.Backups() where !b.save.Contains("before-restore") select b).ToList(); if (list.Count == 0) { Hint(c, ref y, "No backups yet. One is made every time you save."); } for (int num2 = 0; num2 < list.Count && num2 < 10; num2++) { (string, string, string) tuple = list[num2]; Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 28f), tuple.Item2.Replace('_', ' ').Replace('-', ':').Insert(4, "-") .Remove(5, 1) .Insert(7, "-") .Remove(8, 1) + " · save " + tuple.Item1, isNew: false); if (_inWorld) { GUI.Label(new Rect(((Rect)(ref c)).xMax - 230f, y + 6f, 230f, 20f), "restore from the title screen", _smallRight); } else if (Button(new Rect(((Rect)(ref c)).xMax - 110f, y + 2f, 110f, 24f), (_restoreConfirm == num2) ? "Sure? click" : "Restore", ghost: true)) { if (_restoreConfirm == num2) { string text = SaveMgr.Restore(tuple.Item1, tuple.Item3); Flash(text ?? "Restored. Load the save now."); _restoreConfirm = -1; } else { _restoreConfirm = num2; } } y += 28f; } _contentBottom = y; } private void PagePerformance(Rect c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02da: 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_0302: Unknown result type (might be due to invalid IL or missing references) float num = Header(c, "PERFORMANCE", Perf.Enabled.Value ? Perf.PresetNames[Perf.Preset.Value] : "game settings"); Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, num, ((Rect)(ref c)).width, 54f); Round(r, new Color(Accent.r, Accent.g, Accent.b, 0.12f)); GUI.Label(new Rect(((Rect)(ref r)).x + 14f, ((Rect)(ref r)).y + 12f, 120f, 30f), $"<size=26><b>{Perf.Fps:0}</b></size> <color=#c4a8ff>FPS</color>", _label); float num2 = ((Rect)(ref r)).x + 150f; float num3 = (((Rect)(ref r)).width - 170f) / (float)Perf.History.Length; float num4 = Mathf.Max(60f, Perf.History.Max()); for (int i = 0; i < Perf.History.Length; i++) { float num5 = 34f * Perf.History[i] / num4; Fill(new Rect(num2 + (float)i * num3, ((Rect)(ref r)).yMax - 10f - num5, num3 - 2f, num5), new Color(Accent.r, Accent.g, Accent.b, 0.55f)); } num += 64f; int num6 = ChipsRow(c, ref num, "Preset", Perf.PresetNames, Perf.Enabled.Value ? Perf.Preset.Value : 3); if (num6 != (Perf.Enabled.Value ? Perf.Preset.Value : 3)) { Perf.ApplyPreset(num6); } num = Group(c, num, "DETAIL"); BoolRow(c, ref num, "Use my settings (off = game's own)", Perf.Enabled); FloatRow(c, ref num, "Grass amount", Perf.Grass, 0f, 1.5f, "{0:0%}", 0.05f); FloatRow(c, ref num, "Trees & objects distance", Perf.Distance, 0.3f, 2f, "{0:0%}", 0.05f); FloatRow(c, ref num, "Shadow distance", Perf.Shadow, 0.2f, 1.5f, "{0:0%}", 0.05f); Perf.Limit.Value = ChipsRow(c, ref num, "FPS limit", Perf.LimitNames, Perf.Limit.Value); BoolRow(c, ref num, "Show FPS on screen", Perf.ShowFps); num = Group(c, num, "AUTO"); BoolRow(c, ref num, "Smart mode: lower grass & shadows when FPS drops below 60", Perf.Smart); BoolRow(c, ref num, "Extra help in caves", Perf.CaveHelp); if (ButtonRow(c, ref num, "", "Reset to game normal", ghost: true)) { Perf.ResetAll(); Flash("Game settings back"); } _contentBottom = num; } private void PageLook(Rect c) { //IL_0001: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: 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_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0293: 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) float num = Header(c, "LOOK", Look.Enabled.Value ? Look.Names[Look.Race.Value] : "game's look"); Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, num, 170f, 208f); Round(r, new Color(0.08f, 0.09f, 0.11f, 1f)); Texture val = (_inWorld ? Look.Mirror() : null); if ((Object)(object)val != (Object)null) { GUI.DrawTexture(new Rect(((Rect)(ref r)).x + 4f, ((Rect)(ref r)).y + 4f, ((Rect)(ref r)).width - 8f, ((Rect)(ref r)).height - 8f), val, (ScaleMode)1); } else { GUI.Label(new Rect(((Rect)(ref r)).x, ((Rect)(ref r)).y + ((Rect)(ref r)).height / 2f - 10f, ((Rect)(ref r)).width, 20f), _inWorld ? "mirror off" : "load a save", _tag); } Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref r)).x + 8f, ((Rect)(ref r)).yMax - 24f, 80f, 18f); Round(val2, new Color(0f, 0f, 0f, 0.55f)); GUI.Label(val2, "Live mirror", _tag); float num2 = ((Rect)(ref c)).x + 186f; float num3 = (((Rect)(ref c)).width - 186f - 30f) / 4f; Rect val3 = default(Rect); for (int i = 0; i < 8; i++) { ((Rect)(ref val3))..ctor(num2 + (float)(i % 4) * (num3 + 10f), num + (float)(i / 4 * 104), num3, 96f); bool flag = Look.Enabled.Value && Look.Race.Value == i; bool flag2 = ((Rect)(ref val3)).Contains(Event.current.mousePosition); Round(val3, (Color)(flag ? new Color(Accent.r, Accent.g, Accent.b, 0.8f) : (flag2 ? new Color(1f, 1f, 1f, 0.09f) : Card))); if (flag) { Round(new Rect(((Rect)(ref val3)).x + 1f, ((Rect)(ref val3)).y + 1f, ((Rect)(ref val3)).width - 2f, ((Rect)(ref val3)).height - 2f), new Color(0.11f, 0.09f, 0.16f, 1f)); } GUI.Label(new Rect(((Rect)(ref val3)).x, ((Rect)(ref val3)).y + 26f, ((Rect)(ref val3)).width, 24f), $"<size=22><b>{i + 1}</b></size>", _center); GUI.Label(new Rect(((Rect)(ref val3)).x, ((Rect)(ref val3)).y + 60f, ((Rect)(ref val3)).width, 18f), Look.Names[i], _tag); if (GUI.Button(val3, GUIContent.none, GUIStyle.none)) { Look.Pick(i); Flash(Look.Names[i]); } } num += 216f; BoolRow(c, ref num, "Use my pick (off = the game's own look)", Look.Enabled); BoolRow(c, ref num, "Live mirror", Look.MirrorOn); BoolRow(c, ref num, "Different look for each save", Look.PerSave); if (ButtonRow(c, ref num, "Random look", "Surprise me", ghost: true)) { int num4 = Random.Range(0, 8); Look.Pick(num4); Flash(Look.Names[num4]); } Hint(c, ref num, "Your character changes right away. Looks 1–4 and 5–8 are the game's 8 face and skin sets."); _contentBottom = num; } private void PageLightsAim(Rect c) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_025f: 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_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0338: 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_0386: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) int num = new string[2] { "lighter", "aim" }.Count((string id) => Cheats.Get(id).On); float y = Header(c, "LIGHTS & AIM", (num > 0) ? $"{num} on" : null); y = Group(c, y, "LIGHTER"); CheatRow(c, ref y, "lighter"); int num2 = ChipsRow(c, ref y, "Preset", Lighter.PresetNames, Lighter.Preset.Value); if (num2 != Lighter.Preset.Value) { Lighter.ApplyPreset(num2); } FloatRow(c, ref y, "Brightness", Lighter.Bright, 0.5f, 20f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Range", Lighter.Range, 5f, 120f, "{0:0} m", 1f); Row(new Rect(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 30f), "Colour", isNew: false); float num3 = ((Rect)(ref c)).xMax - 150f - 60f; Rect val = default(Rect); for (int num4 = 0; num4 < 4; num4++) { ((Rect)(ref val))..ctor(num3 + (float)(num4 * 30), y + 5f, 20f, 20f); if (Lighter.Colour.Value == num4) { Color color = GUI.color; GUI.color = Color.white; GUI.DrawTexture(new Rect(((Rect)(ref val)).x - 2f, ((Rect)(ref val)).y - 2f, 24f, 24f), (Texture)(object)_circle); GUI.color = color; } Color color2 = GUI.color; GUI.color = Lighter.Swatches[num4]; GUI.DrawTexture(val, (Texture)(object)_circle); GUI.color = color2; if (GUI.Button(val, GUIContent.none, GUIStyle.none)) { Lighter.Colour.Value = num4; } } Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(num3 + 120f, y + 5f, 74f, 20f); Round(val2, (Color)((Lighter.Colour.Value == 4) ? Accent : new Color(1f, 1f, 1f, 0.08f))); GUI.Label(val2, "Custom", (Lighter.Colour.Value == 4) ? _tagOn : _tag); if (GUI.Button(val2, GUIContent.none, GUIStyle.none)) { Lighter.Colour.Value = 4; } y += 30f; if (Lighter.Colour.Value == 4) { FloatRow(c, ref y, "Custom colour", Lighter.Hue, 0f, 1f, "{0:0.00}", 0.01f); } BoolRow(c, ref y, "Flame flicker", Lighter.Flicker); BoolRow(c, ref y, "Also the flashlight", Lighter.Flashlight); y = Group(c, y, "AIM LINE"); CheatRow(c, ref y, "aim"); MultiChipsRow(c, ref y, "For", Aim.WeaponNames, Aim.WeaponOn, Aim.SetWeapon); Aim.Dotted.Value = ChipsRow(c, ref y, "Line look", new string[2] { "Solid", "Dotted" }, Aim.Dotted.Value ? 1 : 0) == 1; FloatRow(c, ref y, "Thickness", Aim.Thickness, 1f, 8f, "{0:0}", 1f); FloatRow(c, ref y, "See-through", Aim.SeeThrough, 0f, 0.8f, "{0:0%}", 0.05f); BoolRow(c, ref y, "Show distance at the marker", Aim.ShowDistance); BoolRow(c, ref y, "Only when drawn (after aiming a moment)", Aim.OnlyAiming); Hint(c, ref y, "Marker colour: red = enemy · green = animal · blue = Kelvin/Virginia · white = ground. Spears are thrown by hand in the game, so they have no path.", 2); _contentBottom = y; } private void PageVehicles(Rect c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) float y = Header(c, "VEHICLES", (Vehicles.Pocket.Count > 0) ? $"{Vehicles.Pocket.Count} carried" : null); y = Group(c, y, "POCKET"); CheatRow(c, ref y, "pocket"); KeyRow(c, ref y, "Pick-up key (stand next to a glider / Knight V)", Vehicles.PickKey); float num = (((Rect)(ref c)).width - 30f) / 4f; Rect val = default(Rect); for (int i = 0; i < 4; i++) { ((Rect)(ref val))..ctor(((Rect)(ref c)).x + (float)i * (num + 10f), y + 4f, num, 66f); if (i < Vehicles.Pocket.Count) { int num2 = Vehicles.Pocket[i]; Round(val, Card); ItemData obj = ItemDatabaseManager.ItemById(num2); object obj2; if (obj == null) { obj2 = null; } else { ItemUiData uiData = obj._uiData; obj2 = ((uiData != null) ? uiData._icon : null); } Texture val2 = (Texture)obj2; if ((Object)(object)val2 != (Object)null) { GUI.DrawTexture(new Rect(((Rect)(ref val)).x + 8f, ((Rect)(ref val)).y + 6f, 28f, 28f), val2, (ScaleMode)2); } GUI.Label(new Rect(((Rect)(ref val)).x + 42f, ((Rect)(ref val)).y + 12f, ((Rect)(ref val)).width - 46f, 20f), (num2 == 626) ? "Glider" : "Knight V", _label); if (Button(new Rect(((Rect)(ref val)).x + 8f, ((Rect)(ref val)).y + 38f, ((Rect)(ref val)).width - 16f, 22f), "Take out", ghost: false) && _inWorld) { Vehicles.TakeOut(i); } } else { Round(val, new Color(1f, 1f, 1f, 0.025f)); GUI.Label(val, "empty", _tag); } } y += 78f; if (ButtonRow(c, ref y, "Bring my last placed glider / Knight V here", "Bring here") && _inWorld) { Vehicles.CallBack(); } if (ButtonRow(c, ref y, "Bring the nearest golf cart here", "Bring here") && _inWorld) { Vehicles.BringCart(); } y = Group(c, y, "UPGRADES"); CheatRow(c, ref y, "upgrades"); _vehTab = ChipsRow(c, ref y, "Vehicle", new string[2] { "Golf cart", "Knight V" }, _vehTab); bool flag = _vehTab == 0; int num3 = ChipsRow(c, ref y, "Preset", Vehicles.PresetNames, flag ? Vehicles.CartPreset.Value : Vehicles.KnightPreset.Value); if (num3 != (flag ? Vehicles.CartPreset.Value : Vehicles.KnightPreset.Value)) { Vehicles.ApplyPreset(flag, num3); } if (flag) { FloatRow(c, ref y, "Top speed", Vehicles.CartSpeed, 0.5f, 4f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Power", Vehicles.CartAccel, 0.5f, 5f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Grip", Vehicles.CartGrip, 0.3f, 3f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Headlights", Vehicles.CartLights, 1f, 6f, "{0:0.0}×", 0.1f); } else { FloatRow(c, ref y, "Top speed", Vehicles.KnightSpeed, 0.5f, 4f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Power", Vehicles.KnightAccel, 0.5f, 5f, "{0:0.0}×", 0.1f); FloatRow(c, ref y, "Jump", Vehicles.KnightJump, 0.5f, 4f, "{0:0.0}×", 0.1f); KeyRow(c, ref y, "Boost key", Vehicles.BoostKey); } BoolRow(c, ref y, "No damage to me while driving", Vehicles.NoDamage); BoolRow(c, ref y, "Speed meter", Vehicles.SpeedMeter); KeyRow(c, ref y, "Flip back up key", Vehicles.FlipKey); _contentBottom = y; } internal void TestKelvinOrders(int i) { _kOpen = i; } private void KelvinCards(Rect c, ref float y) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Invalid comparison between Unknown and I4 //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Invalid comparison between Unknown and I4 //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Invalid comparison between Unknown and I4 //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Invalid comparison between Unknown and I4 //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Invalid comparison between Unknown and I4 //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) List<VailActor> list = Helpers.Kelvins(); y = Group(c, y, (list.Count > 1) ? $"KELVINS ({list.Count})" : "KELVIN"); if (list.Count == 0) { Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 50f); Round(r, Card); GUI.Label(new Rect(((Rect)(ref r)).x + 14f, ((Rect)(ref r)).y + 15f, 400f, 20f), "Kelvin is not around (or not met yet)", _small); y += 58f; _kOpen = -1; _kRename = -1; return; } Vector3 position = LocalPlayer.Transform.position; Rect r2 = default(Rect); Rect val2 = default(Rect); Rect r3 = default(Rect); Rect r4 = default(Rect); for (int i = 0; i < list.Count; i++) { VailActor val = list[i]; ((Rect)(ref r2))..ctor(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 50f); Round(r2, Card); ((Rect)(ref val2))..ctor(((Rect)(ref r2)).x + 10f, ((Rect)(ref r2)).y + 9f, 32f, 32f); Round(val2, new Color(Accent.r, Accent.g, Accent.b, (i == 0) ? 0.45f : 0.22f)); string text = Helpers.NameOf(i); GUI.Label(val2, $"<b>{((text.Length > 0) ? text[0] : 'K')}</b>", _center); float num = ((Rect)(ref r2)).width - 52f - 350f; if (_kRename == i) { ((Rect)(ref r3))..ctor(((Rect)(ref r2)).x + 52f, ((Rect)(ref r2)).y + 5f, num, 22f); Round(r3, new Color(1f, 1f, 1f, 0.09f)); GUI.SetNextControlName("nm_krename"); Event current = Event.current; bool flag = GUI.GetNameOfFocusedControl() == "nm_krename"; bool num2 = (int)current.type == 4 && ((int)current.keyCode == 13 || (int)current.keyCode == 271) && flag; bool flag2 = (int)current.type == 4 && (int)current.keyCode == 27 && flag; _kRenameText = GUI.TextField(new Rect(((Rect)(ref r3)).x + 6f, ((Rect)(ref r3)).y + 1f, ((Rect)(ref r3)).width - 12f, 20f), _kRenameText ?? "", 24, _field); if (_kRenameFocus) { GUI.FocusControl("nm_krename"); _kRenameFocus = false; } if (num2) { Helpers.Rename(i, _kRenameText); Flash("Renamed to " + Helpers.NameOf(i)); _kRename = -1; current.Use(); } else if (flag2) { _kRename = -1; current.Use(); } } else { GUI.Label(new Rect(((Rect)(ref r2)).x + 52f, ((Rect)(ref r2)).y + 6f, num, 20f), (i == 0 && list.Count > 1) ? (text + " <size=10><color=#B9A6FF>MAIN</color></size>") : text, _label); } GUI.Label(new Rect(((Rect)(ref r2)).x + 52f, ((Rect)(ref r2)).y + 26f, num, 18f), $"{Helpers.Task(val)} · {Vector3.Distance(((Component)val).transform.position, position):0} m away", _small); float health = val.GetHealth(); float num3 = Mathf.Max(1f, val.GetMaxHealth()); ((Rect)(ref r4))..ctor(((Rect)(ref r2)).x + 52f, ((Rect)(ref r2)).y + 45f, num, 2f); Pill(r4, Off); Pill(new Rect(((Rect)(ref r4)).x, ((Rect)(ref r4)).y, Mathf.Max(2f, ((Rect)(ref r4)).width * Mathf.Clamp01(health / num3)), 2f), new Color(0.37f, 0.83f, 0.35f)); float num4 = ((Rect)(ref r2)).xMax - 10f; num4 -= 96f; if (Button(new Rect(num4, ((Rect)(ref r2)).y + 12f, 96f, 26f), "Bring here", ghost: false)) { Flash(Helpers.BringHere(val) ? (text + " is here") : (text + " not found")); } num4 -= 64f; if (Button(new Rect(num4, ((Rect)(ref r2)).y + 12f, 58f, 26f), "Heal", ghost: true)) { Flash(Helpers.Heal(val) ? (text + " healed") : (text + ": could not heal")); } if (_kRename == i) { num4 -= 82f; if (Button(new Rect(num4, ((Rect)(ref r2)).y + 12f, 76f, 26f), "Save", ghost: false)) { Helpers.Rename(i, _kRenameText); Flash("Renamed to " + Helpers.NameOf(i)); _kRename = -1; } } else { num4 -= 82f; if (Button(new Rect(num4, ((Rect)(ref r2)).y + 12f, 76f, 26f), "Rename", ghost: true)) { _kRename = i; _kRenameText = text; _kRenameFocus = true; } } num4 -= 90f; if (Button(new Rect(num4, ((Rect)(ref r2)).y + 12f, 84f, 26f), (_kOpen == i) ? "Orders ▴" : "Orders ▾", _kOpen != i)) { _kOpen = ((_kOpen == i) ? (-1) : i); } y += 54f; if (_kOpen == i) { KelvinOrders(c, ref y, val, text); } y += 4f; } if (_kOpen >= list.Count) { _kOpen = -1; } if (list.Count > 1 && ButtonRow(c, ref y, "All Kelvins", "Bring all here")) { Helpers.BringAll(); Flash($"{list.Count} Kelvins are here"); } } private void KelvinOrders(Rect c, ref float y, VailActor a, string nm) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) List<Helpers.OrderGroup> list = Helpers.OrderMenu(Helpers.RobbyFor(a)); float num = y; Rect c2 = default(Rect); ((Rect)(ref c2))..ctor(((Rect)(ref c)).x + 14f, y, ((Rect)(ref c)).width - 28f, 0f); if (list == null) { GUI.Label(new Rect(((Rect)(ref c2)).x, y + 4f, ((Rect)(ref c2)).width, 20f), "Getting his order list… (open again in a moment)", _small); y += 30f; return; } foreach (Helpers.OrderGroup item in list) { if (item.Items.Any((Helpers.OrderOpt o) => o.NeedsDrop)) { _kDrop = ChipsRow(c2, ref y, "Bring it to", Helpers.DropNames, _kDrop); } int num2 = ChipsWrap(c2, ref y, item.Name, item.Items.Select((Helpers.OrderOpt o) => o.Label).ToList()); if (num2 >= 0) { Helpers.OrderOpt orderOpt = item.Items[num2]; bool flag = false; try { flag = Helpers.Give(a, orderOpt, Helpers.DropValues[Mathf.Clamp(_kDrop, 0, Helpers.DropValues.Length - 1)]); } catch (Exception ex) { Flash("Order failed: " + ex.Message); } if (flag) { Flash(nm + ": " + orderOpt.Label); } } } Hint(c2, ref y, "Orders work like his notepad: build and clear orders start where you are standing."); Fill(new Rect(((Rect)(ref c)).x + 6f, num, 2f, y - num), new Color(Accent.r, Accent.g, Accent.b, 0.6f)); } private int ChipsWrap(Rect c, ref float y, string label, List<string> opts) { //IL_001b: 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_0060: Expected O, but got Unknown //IL_005b: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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) int result = -1; GUI.Label(new Rect(((Rect)(ref c)).x, y + 5f, 110f, 20f), label, _small); float num = ((Rect)(ref c)).x + 112f; float num2 = num; float num3 = y; Rect val = default(Rect); for (int i = 0; i < opts.Count; i++) { float num4 = _small.CalcSize(new GUIContent(opts[i])).x + 18f; if (num2 + num4 > ((Rect)(ref c)).xMax && num2 > num) { num2 = num; num3 += 25f; } ((Rect)(ref val))..ctor(num2, num3 + 5f, num4, 20f); Round(val, new Color(1f, 1f, 1f, ((Rect)(ref val)).Contains(Event.current.mousePosition) ? 0.16f : 0.07f)); GUI.Label(val, opts[i], _tag); if (GUI.Button(val, GUIContent.none, GUIStyle.none)) { result = i; } num2 += num4 + 5f; } y = num3 + 30f; return result; } private void PageHelpers(Rect c) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0476: 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) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0394: 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) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Invalid comparison between Unknown and I4 //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) float y = Header(c, "KELVIN & VIRGINIA"); KelvinCards(c, ref y); y = Group(c, y, "VIRGINIA"); (VailActorTypeId, string)[] array = new(VailActorTypeId, string)[1] { ((VailActorTypeId)10, "Virginia") }; Rect r = default(Rect); Rect val2 = default(Rect); Rect r2 = default(Rect); for (int i = 0; i < array.Length; i++) { (VailActorTypeId, string) tuple = array[i]; VailActorTypeId item = tuple.Item1; string item2 = tuple.Item2; VailActor val = Helpers.Find(item).FirstOrDefault(); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, y, ((Rect)(ref c)).width, 50f); Round(r, Card); ((Rect)(ref val2))..ctor(((Rect)(ref r)).x + 10f, ((Rect)(ref r)).y + 9f, 32f, 32f); Round(val2, new Color(Accent.r, Accent.g, Accent.b, 0.25f)); GUI.Label(val2, $"<b>{item2[0]}</b>", _center); string text = (((Object)(object)val == (Object)null) ? "not around (or not met yet)" : $"{(((int)item == 9) ? (Helpers.Task(val) + " · ") : "")}{Vector3.Distance(((Component)val).transform.position, LocalPlayer.Transform.position):0} m away"); GUI.Label(new Rect(((Rect)(ref r)).x + 52f, ((Rect)(ref r)).y + 7f, 300f, 20f), item2, _label); GUI.Label(new Rect(((Rect)(ref r)).x + 52f, ((Rect)(ref r)).y + 26f, 300f, 18f), text, _small); if ((Object)(object)val != (Object)null) { float health = val.GetHealth(); float num = Mathf.Max(1f, val.GetMaxHealth()); ((Rect)(ref r2))..ctor(((Rect)(ref r)).xMax - 330f, ((Rect)(ref r)).y + 22f, 90f, 6f); Pill(r2, Off); Pill(new Rect(((Rect)(ref r2)).x, ((Rect)(ref r2)).y, Mathf.Max(6f, ((Rect)(ref r2)).width * health / num), 6f), new Color(0.37f, 0.83f, 0.35f)); if (Button(new Rect(((Rect)(ref r)).xMax - 226f, ((Rect)(ref r)).y + 12f, 90f, 26f), "Heal", ghost: true)) { Flash(Helpers.Heal(val) ? (item2 + " healed") : (item2 + ": could not heal")); } if (Button(new Rect(((Rect)(ref r)).xMax - 126f, ((Rect)(ref r)).y + 12f, 116f, 26f), "Bring here", ghost: false)) { Flash(Helpers.BringHere(item) ? (item2 + " is here") : (item2 + " not found")); } } y += 58f; } y = Group(c, y, "KELVIN SETTINGS (ALL)"); CheatRow(c, ref y, "kelvinrest"); FloatRow(c, ref y, "Work speed (try)", Helpers.WorkSpeed, 1f, 3f, "×{0:0.0}", 0.1f); CheatRow(c, ref y, "kelvingod"); BoolRow(c, ref y, "Show name + what he's doing above his head", Helpers.ShowTask); if (ButtonRow(c, ref y, "Extra Kelvin (try: can glitch in saves)", "+ Add one", ghost: true) && _inWorld) { try { Helpers.AddKelvin(); Flash("Another Kelvin joined"); } catch (Exception ex) { Flash("Could not add: " + ex.Message); } } y = Group(c, y, "VIRGINIA SETTINGS"); CheatRow(c, ref y, "virgod"); CheatRow(c, ref y, "virbeckon"); Hint(c, ref y, "Kelvin's carry amount per trip isn't a setting the game exposes, so it was left out."); _contentBottom = y; } private void DrawHelperTags() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) if (!Helpers.ShowTask.Value || (int)Event.current.type != 7) { return; } if ((Object)(object)_cam == (Object)null) { _cam = Camera.main; } if ((Object)(object)_cam == (Object)null) { return; } foreach (VailActor item in Helpers.Kelvins()) { Vector3 val = ((Component)item).transform.position + Vector3.up * 2.2f; if (Vector3.Distance(((Component)_cam).transform.position, val) > 60f) { continue; } Vector3 val2 = _cam.WorldToScreenPoint(val); if (!(val2.z < 0f)) { string text = Helpers.Task(item); if (text.Length > 0) { EspLabel(new Vector2(val2.x, (float)Screen.height - val2.y), Helpers.NameOf(item) + " · " + text, new Color(0.77f, 0.66f, 1f)); } } } } private static IEnumerable<(string guid, string name, string ver, ConfigFile cfg)> ModList() { foreach (KeyValuePair<string, PluginInfo> plugin in ((BaseChainloader<BasePlugin>)(object)IL2CPPChainloader.Instance).Plugins) { PluginInfo value = plugin.Value; ConfigFile item = null; try { object instance = value.Instance; BasePlugin val = (BasePlugin)((instance is BasePlugin) ? instance : null); if (val != null) { item = val.Config; } } catch { } yield return (guid: plugin.Key, name: value.Metadata.Name, ver: ((object)value.Metadata.Version).ToString(), cfg: item); } } private static List<(string mod, ConfigEntryBase e)> AllEntries() { List<(string, ConfigEntryBase)> list = new List<(string, ConfigEntryBase)>(); foreach (var item in ModList()) { if (item.cfg == null) { continue; } foreach (KeyValuePair<ConfigDefinition, ConfigEntryBase> item2 in item.cfg) { list.Add((item.name, item2.Value)); } } return list; } private void PageMods(Rect c) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_0853: Unknown result type (might be due to invalid IL or missing references) //IL_0810: Unknown result type (might be due to invalid IL or missing references) List<(string, string, string, ConfigFile)> list = (from m in ModList() orderby (!(m.guid == "rias.sotf.nebulamenu")) ? m.name : "" select m).ToList(); float num = Header(c, "MODS", $"{list.Count} loaded"); Rect r = default(Rect); ((Rect)(ref r))..ctor(((Rect)(ref c)).x, num, ((Rect)(ref c)).width, 28f); Round(r, new Color(1f, 1f, 1f, 0.07f)); GUI.SetNextControlName("nm_modsearch"); _modSearch = GUI.TextField(new Rect(((Rect)(ref r)).x + 10f, ((Rect)(ref r)).y + 3f, ((Rect)(ref r)).width - 20f, 22f), _modSearch ?? "", _field); if (string.IsNullOrEmpty(_modSearch) && GUI.GetNameOfFocusedControl() != "nm_modsearch") { GUI.Label(new Rect(((Rect)(ref r)).x + 12f, ((Rect)(ref r)).y + 5f, 300f, 20f), "Search all settings… e.g. \"key\", \"speed\"", _small); } num += 36f; List<(string, ConfigEntryBase)> source = AllEntries(); List<IGrouping<KeyCode, (string, ConfigEntryBase)>> list2 = (from t in source where t.e is ConfigEntry<KeyCode> val3 && (int)val3.Value > 0 group t by ((ConfigEntry<KeyCode>)(object)t.e).Value into g where g.Count() > 1 select g).ToList(); HashSet<ConfigEntryBase> hashSet = new HashSet<ConfigEntryBase>(list2.SelectMany((IGrouping<KeyCode, (string mod, ConfigEntryBase e)> g) => g.Select(((string mod, ConfigEntryBase e) t) => t.e))); Rect r2 = default(Rect); foreach (IGrouping<KeyCode, (string, ConfigEntryBase)> item in list2.Take(3)) { ((Rect)(ref r2))..ctor(((Rect)(ref c)).x, num, ((Rect)(ref c)).width, 24f); Round(r2, new Color(0.88f, 0.75f, 0.44f, 0.16f)); GUI.Label(new Rect(((Rect)(ref r2)).x + 10f, ((Rect)(ref r2)).y + 4f, ((Rect)(ref r2)).width - 20f, 18f), $"<color=#f0dca4>Key clash: {KeyName(item.Key)} is used by {string.Join(" and ", item.Select<(string, ConfigEntryBase), string>(((string mod, ConfigEntryBase e) t) => t.mod + " › " + t.e.Definition.Key))}</color>", _small); num += 28f; } if (list2.Count > 3) { GUI.Label(new Rect(((Rect)(ref c)).x, num, ((Rect)(ref c)).width, 18f), $"+ {list2.Count - 3} more key clashes", _small); num += 20f; } if (!string.IsNullOrWhiteSpace(_modSearch)) { string q = _modSearch.Trim().ToLowerInvariant(); List<(string, ConfigEntryBase)> list3 = source.Where<(string, ConfigEntryBase)>(delegate((string mod, ConfigEntryBase e) t) { DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(3, 4); defaultInterpolatedStringHandler.AppendFormatted(t.mod); defaultInterpolatedStringHandler.AppendLiteral(" "); defaultInterpolatedStringHandler.AppendFormatted(t.e.Definition.Section); defaultInterpolatedStringHandler.AppendLiteral(" "); defaultInterpolatedStringHandler.AppendFormatted(t.e.Definition.Key); defaultInterpolatedStringHandler.AppendLiteral(" "); ConfigDescription description = t.e.Description; defaultInterpolatedStringHandler.AppendFormatted((description != null) ? description.Description : null); return defaultInterpolatedStringHandler.ToStringAndClear().ToLowerInvariant().Contains(q); }).Take(40).ToList(); if (list3.Count == 0) { Hint(c, ref num, "Nothing found."); } foreach (var (text, val) in list3) { EntryRow(c, ref num, text + " › " + val.Definition.Key, val, hashSet.Contains(val)); } _contentBottom = num; return; } if (_modSel == null) { _modSel = list.FirstOrDefault().Item1; } float num2 = 190f; float num3 = num; Rect val2 = default(Rect); foreach (var item2 in list) { ((Rect)(ref val2))..ctor(((Rect)(ref c)).x, num, num2, 26f); bool flag = item2.Item1 == _modSel; if (flag) { Round(val2, new Color(Accent.r, Accent.g, Accent.b, 0.16f)); } else if (((Rect)(ref val2)).Contains(Event.current.mousePosition)) { Round(val2, new Color(1f, 1f, 1f, 0.04f)); } Color color = GUI.color; GUI.color = new Color(0.37f, 0.83f, 0.35f); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 8f, ((Rect)(ref val2)).y + 10f, 7f, 7f), (Texture)(object)_circle); GUI.color = color; GUI.Label(new Rect(((Rect)(ref val2)).x + 22f, ((Rect)(ref val2)).y + 5f, num2 - 70f, 18f), (item2.Item2.Length > 17) ? (item2.Item2.Substring(0, 16) + "…") : item2.Item2, flag ? _tabOn : _tab); GUI.Label(new Rect(((Rect)(ref val2)).x, ((Rect)(ref val2)).y + 6f, num2 - 6f, 18f), item2.Item3, _smallRight); if (GUI.Button(val2, GUIContent.none, GUIStyle.none)) { (_modSel, _, _, _) = item2; } num += 28f; } float num4 = num; (string, string, string, ConfigFile) tuple3 = list.FirstOrDefault<(string, string, string, ConfigFile)>(((string guid, string name, string ver, ConfigFile cfg) m) => m.guid == _modSel); Rect c2 = default(Rect); ((Rect)(ref c2))..ctor(((Rect)(ref c)).x + num2 + 16f, num3, ((Rect)(ref c)).width - num2 - 16f, ((Rect)(ref c)).height); float y = num3; if (tuple3.Item4 == null) { GUI.Label(new Rect(((Rect)(ref c2)).x, y + 4f, ((Rect)(ref c2)).width, 40f), "This mod has no settings the menu can reach.", _small); y += 30f; } else { string text2 = null; foreach (KeyValuePair<ConfigDefinition, ConfigEntryBase> item3 in tuple3.Item4) { ConfigEntryBase value = item3.Value; if (!(tuple3.Item1 == "rias.sotf.nebulamenu") || !(value.Definition.Section != "Menu")) { if (value.Definition.Section != text2) { text2 = value.Definition.Section; y = Group(c2, y, text2.ToUpperInvariant()); } EntryRow(c2, ref y, value.Definition.Key, value, hashSet.Contains(value)); } } if (tuple3.Item1 == "rias.sotf.nebulamenu") { GUI.Label(new Rect(((Rect)(ref c2)).x, y + 6f, ((Rect)(ref c2)).width, 20f), "Everything else for Nebula Menu is on its own page.", _small); y += 28f; } y += 6f; if (Button(new Rect(((Rect)(ref c2)).xMax - 140f, y, 140f, 26f), "Reset this mod", ghost: true)) { foreach (KeyValuePair<ConfigDefinition, ConfigEntryBase> item4 in tuple3.Item4) { item4.Value.BoxedValue = item4.Value.DefaultValue; } Flash(tuple3.Item2 + ": settings reset"); } y += 34f; } _contentBottom = Mathf.Max(num4, y); } private void EntryRow(Rect c, ref float y, string label, ConfigEntryBase e, bool clash) { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type