Decompiled source of CompleteCheatMenu v0.6.1
CompleteCheatMenu.dll
Decompiled 3 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; 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.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CompleteCheatMenu.Cheats; using CompleteCheatMenu.Game; using CompleteCheatMenu.Runtime; using CompleteCheatMenu.UI; using CompleteCheatMenu.UI.Tabs; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CompleteCheatMenu")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.6.1.0")] [assembly: AssemblyInformationalVersion("0.6.1+e81d2eca07f44ac6ef7c03939c49c4c2607fd278")] [assembly: AssemblyProduct("Complete Cheat Menu")] [assembly: AssemblyTitle("CompleteCheatMenu")] [assembly: AssemblyVersion("0.6.1.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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 CompleteCheatMenu { [BepInPlugin("envincible.howtofish.completecheatmenu", "Complete Cheat Menu", "0.6.1")] [BepInProcess("How to Fish.exe")] public class Plugin : BaseUnityPlugin { public const string Guid = "envincible.howtofish.completecheatmenu"; public const string Name = "Complete Cheat Menu"; public const string Version = "0.6.1"; internal static ManualLogSource Log; private Harmony _harmony; internal static ConfigEntry<KeyCode> ToggleKey; internal static ConfigEntry<bool> AutoEnableCheats; internal static ConfigEntry<bool> BackupSaves; internal static ConfigEntry<bool> KeybindsEnabled; private bool _checkedOnce; private float _nextGateCheck; private void Awake() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; ToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "ToggleKey", (KeyCode)277, "Opens and closes the cheat menu."); AutoEnableCheats = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "AutoEnableCheats", true, "Unlock the game's own developer command suite automatically when you load in."); BackupSaves = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "BackupSaves", true, "Copy the save folder once per session before the first destructive action. Silent, no prompt."); KeybindsEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Keybinds", "EnableAllKeybinds", false, "Master switch for every cheat hotkey. The menu key is unaffected and always works."); Keybinds.Register(((BaseUnityPlugin)this).Config); _harmony = new Harmony("envincible.howtofish.completecheatmenu"); try { _harmony.PatchAll(Assembly.GetExecutingAssembly()); int num = 0; foreach (MethodBase patchedMethod in _harmony.GetPatchedMethods()) { _ = patchedMethod; num++; } Log.LogInfo((object)$"{num} method(s) patched."); } catch (Exception arg) { Log.LogError((object)$"Harmony patching failed; the rest of the menu still works: {arg}"); } Log.LogInfo((object)string.Format("{0} {1} loaded. Press {2} in game.", "Complete Cheat Menu", "0.6.1", ToggleKey.Value)); } private void OnDestroy() { if (VisualCheats.FreeCamActive) { VisualCheats.ToggleFreeCam(on: false); } Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } private void Update() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(ToggleKey.Value)) { MenuWindow.Toggle(); if (MenuWindow.Visible && !_checkedOnce) { _checkedOnce = true; SafeRun(DiagnosticsTab.RunChecks, "diagnostics"); } } if (AutoEnableCheats.Value && Time.unscaledTime >= _nextGateCheck) { _nextGateCheck = Time.unscaledTime + 5f; if (Refs.InGame && Refs.IsHost) { SafeRun(CheatGate.EnsureEnabled, "cheat gate"); } } SafeRun(Keybinds.Poll, "keybinds"); SafeRun(WeaponCheats.Tick, "weapons"); SafeRun(TickDriver.Tick, "tick"); } private void FixedUpdate() { SafeRun(TickDriver.FixedTick, "fixed tick"); } private void OnGUI() { SafeRun(EspRenderer.Draw, "esp"); SafeRun(MenuWindow.Draw, "menu"); } private static void SafeRun(Action action, string what) { try { action(); } catch (Exception arg) { Log.LogError((object)$"{what} failed: {arg}"); } } } } namespace CompleteCheatMenu.UI { internal static class MenuWindow { private struct Tab { internal string Title; internal Action Draw; internal bool ServerSide; } [CompilerGenerated] private static class <>O { public static WindowFunction <0>__DrawWindow; } private const int WindowId = 4408141; private static readonly Tab[] Tabs = new Tab[19] { new Tab { Title = "Player", Draw = PlayerTab.Draw, ServerSide = true }, new Tab { Title = "Weapons", Draw = WeaponsTab.Draw, ServerSide = true }, new Tab { Title = "Movement", Draw = MovementTab.Draw, ServerSide = false }, new Tab { Title = "Boat", Draw = BoatTab.Draw, ServerSide = true }, new Tab { Title = "Teleport", Draw = TeleportTab.Draw, ServerSide = true }, new Tab { Title = "Spawn", Draw = SpawnTab.Draw, ServerSide = true }, new Tab { Title = "Entities", Draw = EntitiesTab.Draw, ServerSide = true }, new Tab { Title = "Items", Draw = ItemsTab.Draw, ServerSide = true }, new Tab { Title = "Skins", Draw = SkinsTab.Draw, ServerSide = true }, new Tab { Title = "Money", Draw = MoneyTab.Draw, ServerSide = true }, new Tab { Title = "World", Draw = WorldTab.Draw, ServerSide = true }, new Tab { Title = "Kill score", Draw = KillScoreTab.Draw, ServerSide = true }, new Tab { Title = "Progression", Draw = ProgressionTab.Draw, ServerSide = true }, new Tab { Title = "Gambling", Draw = GamblingTab.Draw, ServerSide = true }, new Tab { Title = "Fishing", Draw = FishingTab.Draw, ServerSide = true }, new Tab { Title = "Visuals", Draw = VisualsTab.Draw, ServerSide = false }, new Tab { Title = "Keybinds", Draw = KeybindsTab.Draw, ServerSide = false }, new Tab { Title = "Settings", Draw = SettingsTab.Draw, ServerSide = false }, new Tab { Title = "Diagnostics", Draw = DiagnosticsTab.Draw, ServerSide = false } }; private static int _active; private static Rect _rect = new Rect(80f, 80f, 620f, 520f); private static Vector2 _contentScroll; private static bool _resizing; internal static bool Visible { get; private set; } internal static void Toggle() { Visible = !Visible; } internal static void Draw() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown if (Visible) { Theme.EnsureBuilt(); Rect rect = _rect; object obj = <>O.<0>__DrawWindow; if (obj == null) { WindowFunction val = DrawWindow; <>O.<0>__DrawWindow = val; obj = (object)val; } _rect = GUILayout.Window(4408141, rect, (WindowFunction)obj, "Complete Cheat Menu v0.6.1", Theme.Window, Array.Empty<GUILayoutOption>()); DrawToasts(); } } private static void DrawWindow(int id) { //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) Keybinds.HandleCapture(Event.current); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.BeginVertical(Theme.SidebarBox, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(132f) }); for (int i = 0; i < Tabs.Length; i++) { if (GUILayout.Button((Tabs[i].ServerSide && !Refs.IsHost) ? (Tabs[i].Title + " ·") : Tabs[i].Title, (i == _active) ? Theme.TabActive : Theme.TabNormal, Array.Empty<GUILayoutOption>())) { _active = i; } } GUILayout.FlexibleSpace(); GUILayout.Label(Refs.IsHost ? "HOST" : (Refs.InGame ? "CLIENT" : "MENU"), Theme.Muted, Array.Empty<GUILayoutOption>()); if (!Refs.IsHost) { GUILayout.Label("· = needs host", Theme.Muted, Array.Empty<GUILayoutOption>()); } GUILayout.EndVertical(); GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.Space(2f); _contentScroll = GUILayout.BeginScrollView(_contentScroll, Array.Empty<GUILayoutOption>()); try { Tabs[_active].Draw(); } catch (Exception ex) { GUILayout.Label("This tab hit an error.", Theme.H2, Array.Empty<GUILayoutOption>()); GUILayout.Label(ex.Message, Theme.Muted, Array.Empty<GUILayoutOption>()); Plugin.Log.LogError((object)$"Tab '{Tabs[_active].Title}' failed: {ex}"); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); HandleResize(); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _rect)).width, 24f)); } private static void HandleResize() { //IL_0031: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Invalid comparison between Unknown and I4 //IL_0052: 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_0081: Invalid comparison between Unknown and I4 //IL_0093: 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) Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref _rect)).width - 16f, ((Rect)(ref _rect)).height - 16f, 14f, 14f); GUI.Label(val, "◢", Theme.Muted); Event current = Event.current; if ((int)current.type == 0 && ((Rect)(ref val)).Contains(current.mousePosition)) { _resizing = true; } if ((int)current.type == 1) { _resizing = false; } if (_resizing && (int)current.type == 3) { ((Rect)(ref _rect)).width = Mathf.Clamp(((Rect)(ref _rect)).width + current.delta.x, 460f, (float)Screen.width); ((Rect)(ref _rect)).height = Mathf.Clamp(((Rect)(ref _rect)).height + current.delta.y, 320f, (float)Screen.height); current.Use(); } } private static void DrawToasts() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) float num = 12f; foreach (Notifications.Toast item in Notifications.Active) { GUIStyle val = (item.Ok ? Theme.ToastOk : Theme.ToastBad); float num2 = Mathf.Max(val.CalcSize(new GUIContent(item.Text)).x + 20f, 160f); GUI.Label(new Rect((float)Screen.width - num2 - 16f, num, num2, 26f), item.Text, val); num += 30f; } } } internal static class Theme { internal static readonly Color Bg = Hex(1316636u); internal static readonly Color Sidebar = Hex(921878u); internal static readonly Color Panel = Hex(1777447u); internal static readonly Color PanelHi = Hex(2304051u); internal static readonly Color Border = Hex(3028033u); internal static readonly Color Accent = Hex(5030568u); internal static readonly Color AccentDim = Hex(3045995u); internal static readonly Color Danger = Hex(14702415u); internal static readonly Color TextMain = Hex(15133424u); internal static readonly Color TextMuted = Hex(9213349u); internal const float SidebarWidth = 132f; internal const float RowHeight = 24f; internal const float Pad = 10f; internal static GUIStyle Window; internal static GUIStyle SidebarBox; internal static GUIStyle TabNormal; internal static GUIStyle TabActive; internal static GUIStyle Section; internal static GUIStyle H1; internal static GUIStyle H2; internal static GUIStyle Body; internal static GUIStyle Muted; internal static GUIStyle Btn; internal static GUIStyle BtnAccent; internal static GUIStyle BtnDanger; internal static GUIStyle Toggle; internal static GUIStyle Field; internal static GUIStyle SliderBar; internal static GUIStyle SliderThumb; internal static GUIStyle ToastOk; internal static GUIStyle ToastBad; internal static GUIStyle Divider; private static bool _built; private static Texture2D _transparent; internal static void EnsureBuilt() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_007b: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) //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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_017c: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Expected O, but got Unknown //IL_01f2: 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_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0223: 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_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_027d: 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_0291: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: 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_02ad: 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_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown //IL_02e9: 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_02f6: 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_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Expected O, but got Unknown //IL_031c: 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_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Expected O, but got Unknown //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Expected O, but got Unknown //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Expected O, but got Unknown //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Expected O, but got Unknown //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Expected O, but got Unknown //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Expected O, but got Unknown //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Expected O, but got Unknown //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Expected O, but got Unknown //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Expected O, but got Unknown //IL_05ba: Expected O, but got Unknown //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Expected O, but got Unknown //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Expected O, but got Unknown //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Expected O, but got Unknown //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Expected O, but got Unknown //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Expected O, but got Unknown //IL_06f2: Expected O, but got Unknown if (!_built || Window == null) { _built = true; Texture2D background = Rounded(48, 8, Bg, Border); Texture2D tex = Rounded(48, 8, Sidebar, Border); Texture2D tex2 = Rounded(32, 6, Panel, Border); Texture2D background2 = Rounded(32, 6, PanelHi, Accent); Texture2D background3 = Rounded(32, 6, PanelHi, Border); Texture2D background4 = Rounded(32, 6, PanelHi, Border); Texture2D background5 = Rounded(32, 6, Lighten(PanelHi, 0.1f), Accent); Texture2D background6 = Rounded(32, 6, AccentDim, Accent); Texture2D background7 = Rounded(32, 6, Mix(Panel, Danger, 0.35f), Danger); Texture2D background8 = Rounded(32, 6, Hex(724241u), Border); Texture2D background9 = Rounded(16, 4, Hex(724241u), Border); Texture2D background10 = Rounded(16, 8, Accent, Accent); GUIStyle val = new GUIStyle(GUI.skin.window); val.normal.background = background; val.normal.textColor = TextMain; val.onNormal.background = background; val.onNormal.textColor = TextMain; val.border = new RectOffset(10, 10, 10, 10); val.padding = new RectOffset(0, 0, 26, 0); val.fontSize = 13; val.fontStyle = (FontStyle)1; val.alignment = (TextAnchor)1; Window = val; SidebarBox = Boxed(tex, 10); SidebarBox.padding = new RectOffset(8, 8, 8, 8); Section = Boxed(tex2, 8); Section.padding = new RectOffset(10, 10, 8, 10); GUIStyle val2 = new GUIStyle(GUI.skin.button); val2.normal.background = Transparent(); val2.normal.textColor = TextMuted; val2.hover.background = background3; val2.hover.textColor = TextMain; val2.active.background = background3; val2.active.textColor = TextMain; val2.border = new RectOffset(8, 8, 8, 8); val2.padding = new RectOffset(10, 6, 6, 6); val2.margin = new RectOffset(0, 0, 1, 1); val2.alignment = (TextAnchor)3; val2.fontSize = 12; TabNormal = val2; GUIStyle val3 = new GUIStyle(TabNormal); val3.normal.background = background2; val3.normal.textColor = TextMain; val3.hover.background = background2; val3.hover.textColor = TextMain; val3.fontStyle = (FontStyle)1; TabActive = val3; GUIStyle val4 = new GUIStyle(GUI.skin.label) { fontSize = 15, fontStyle = (FontStyle)1 }; val4.normal.textColor = TextMain; H1 = val4; GUIStyle val5 = new GUIStyle(GUI.skin.label) { fontSize = 12, fontStyle = (FontStyle)1 }; val5.normal.textColor = Accent; H2 = val5; GUIStyle val6 = new GUIStyle(GUI.skin.label) { fontSize = 12 }; val6.normal.textColor = TextMain; Body = val6; GUIStyle val7 = new GUIStyle(GUI.skin.label) { fontSize = 11 }; val7.normal.textColor = TextMuted; val7.wordWrap = true; Muted = val7; GUIStyle val8 = new GUIStyle(GUI.skin.button); val8.normal.background = background4; val8.normal.textColor = TextMain; val8.hover.background = background5; val8.hover.textColor = TextMain; val8.active.background = background6; val8.active.textColor = TextMain; val8.border = new RectOffset(8, 8, 8, 8); val8.padding = new RectOffset(8, 8, 5, 5); val8.margin = new RectOffset(2, 2, 2, 2); val8.fontSize = 12; Btn = val8; GUIStyle val9 = new GUIStyle(Btn); val9.normal.background = background6; val9.normal.textColor = TextMain; val9.fontStyle = (FontStyle)1; BtnAccent = val9; GUIStyle val10 = new GUIStyle(Btn); val10.normal.background = background7; val10.normal.textColor = TextMain; val10.hover.background = background7; val10.hover.textColor = Color.white; BtnDanger = val10; GUIStyle val11 = new GUIStyle(GUI.skin.toggle) { fontSize = 12 }; val11.normal.textColor = TextMain; val11.onNormal.textColor = TextMain; Toggle = val11; GUIStyle val12 = new GUIStyle(GUI.skin.textField); val12.normal.background = background8; val12.normal.textColor = TextMain; val12.focused.background = background8; val12.focused.textColor = TextMain; val12.border = new RectOffset(8, 8, 8, 8); val12.padding = new RectOffset(7, 7, 4, 4); val12.fontSize = 12; Field = val12; GUIStyle val13 = new GUIStyle(GUI.skin.horizontalSlider); val13.normal.background = background9; val13.border = new RectOffset(4, 4, 4, 4); val13.fixedHeight = 10f; val13.margin = new RectOffset(2, 2, 8, 8); SliderBar = val13; GUIStyle val14 = new GUIStyle(GUI.skin.horizontalSliderThumb); val14.normal.background = background10; val14.active.background = background10; val14.border = new RectOffset(6, 6, 6, 6); val14.fixedWidth = 14f; val14.fixedHeight = 14f; SliderThumb = val14; ToastOk = Boxed(Rounded(32, 6, Mix(Panel, Accent, 0.22f), Accent), 8); ToastOk.padding = new RectOffset(10, 10, 6, 6); ToastOk.normal.textColor = TextMain; ToastOk.fontSize = 12; GUIStyle val15 = new GUIStyle(ToastOk); val15.normal.background = Rounded(32, 6, Mix(Panel, Danger, 0.25f), Danger); val15.normal.textColor = TextMain; ToastBad = val15; GUIStyle val16 = new GUIStyle(); val16.normal.background = Solid(Border); val16.fixedHeight = 1f; val16.margin = new RectOffset(0, 0, 6, 6); Divider = val16; } } private static GUIStyle Boxed(Texture2D tex, int border) { //IL_000a: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_003b: Expected O, but got Unknown GUIStyle val = new GUIStyle(GUI.skin.box); val.normal.background = tex; val.normal.textColor = TextMain; val.border = new RectOffset(border, border, border, border); return val; } private static Texture2D Rounded(int size, int radius, Color fill, Color border) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)5, false) { filterMode = (FilterMode)1, hideFlags = (HideFlags)61 }; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num = CornerDistance(j, i, size, radius); if (num > (float)radius + 0.5f) { val.SetPixel(j, i, Color.clear); continue; } bool flag = num > (float)radius - 1.5f || j == 0 || i == 0 || j == size - 1 || i == size - 1; val.SetPixel(j, i, flag ? border : fill); } } val.Apply(); return val; } private static float CornerDistance(int x, int y, int size, int radius) { float num = ((x < radius) ? radius : ((x > size - 1 - radius) ? (size - 1 - radius) : x)); float num2 = ((y < radius) ? radius : ((y > size - 1 - radius) ? (size - 1 - radius) : y)); return Mathf.Sqrt(((float)x - num) * ((float)x - num) + ((float)y - num2) * ((float)y - num2)); } private static Texture2D Solid(Color c) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown Texture2D val = new Texture2D(1, 1, (TextureFormat)5, false) { hideFlags = (HideFlags)61 }; val.SetPixel(0, 0, c); val.Apply(); return val; } private static Texture2D Transparent() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) return _transparent ?? (_transparent = Solid(new Color(0f, 0f, 0f, 0f))); } private static Color Hex(uint rgb) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) return new Color((float)((rgb >> 16) & 0xFF) / 255f, (float)((rgb >> 8) & 0xFF) / 255f, (float)(rgb & 0xFF) / 255f, 1f); } private static Color Lighten(Color c, float amount) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //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) return Color.Lerp(c, Color.white, amount); } private static Color Mix(Color a, Color b, float t) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) return Color.Lerp(a, b, t); } } internal static class Widgets { internal static void Section(string title, Action body) { GUILayout.BeginVertical(Theme.Section, Array.Empty<GUILayoutOption>()); if (!string.IsNullOrEmpty(title)) { GUILayout.Label(title.ToUpperInvariant(), Theme.H2, Array.Empty<GUILayoutOption>()); } body(); GUILayout.EndVertical(); GUILayout.Space(6f); } internal static void Divider() { GUILayout.Box(GUIContent.none, Theme.Divider, Array.Empty<GUILayoutOption>()); } internal static void Note(string text) { GUILayout.Label(text, Theme.Muted, Array.Empty<GUILayoutOption>()); } internal static float SliderRow(string label, float value, float min, float max, string format = "0.##", float? resetTo = null) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(label, Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); float result = GUILayout.HorizontalSlider(value, min, max, Theme.SliderBar, Theme.SliderThumb, Array.Empty<GUILayoutOption>()); GUILayout.Label(result.ToString(format), Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(52f) }); if (resetTo.HasValue && GUILayout.Button("↺", Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(24f) })) { result = resetTo.Value; } GUILayout.EndHorizontal(); return result; } internal static int IntSliderRow(string label, int value, int min, int max) { return Mathf.RoundToInt(SliderRow(label, value, min, max, "0")); } internal static bool ToggleRow(string label, bool value, string hint = null) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); bool result = GUILayout.Toggle(value, " " + label, Theme.Toggle, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); if (!string.IsNullOrEmpty(hint)) { GUILayout.Label(hint, Theme.Muted, Array.Empty<GUILayoutOption>()); } GUILayout.EndHorizontal(); return result; } internal static string FieldRow(string label, string value, float labelWidth = 150f) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(label, Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(labelWidth) }); string result = GUILayout.TextField(value ?? "", Theme.Field, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); return result; } internal static string SearchBox(string value, string placeholder = "Search…") { //IL_002c: 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_005a: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string text = GUILayout.TextField(value ?? "", Theme.Field, Array.Empty<GUILayoutOption>()); if (string.IsNullOrEmpty(text)) { Rect lastRect = GUILayoutUtility.GetLastRect(); GUI.Label(new Rect(((Rect)(ref lastRect)).x + 8f, ((Rect)(ref lastRect)).y + 2f, ((Rect)(ref lastRect)).width, ((Rect)(ref lastRect)).height), placeholder, Theme.Muted); } if (GUILayout.Button("×", Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(26f) })) { text = ""; } GUILayout.EndHorizontal(); return text; } internal static void ActionButton(string label, Func<bool> action, string okText, GUIStyle style = null, float width = 0f) { GUILayoutOption[] array = (GUILayoutOption[])(object)((!(width > 0f)) ? new GUILayoutOption[0] : new GUILayoutOption[1] { GUILayout.Width(width) }); if (GUILayout.Button(label, style ?? Theme.Btn, array)) { bool ok; try { ok = action(); } catch (Exception ex) { ok = false; Plugin.Log.LogError((object)ex); } Notifications.Result(ok, okText, label + " failed — see log"); } } internal static bool RequireHost(string blockReason) { if (blockReason == null) { return true; } GUILayout.BeginVertical(Theme.Section, Array.Empty<GUILayoutOption>()); GUILayout.Label("Unavailable", Theme.H2, Array.Empty<GUILayoutOption>()); GUILayout.Label(blockReason, Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndVertical(); return false; } } } namespace CompleteCheatMenu.UI.Tabs { internal static class BoatTab { private struct Row { internal string Field; internal string Label; internal float Min; internal float Max; } internal const string Title = "Boat"; private static readonly Row[] Rows = new Row[6] { new Row { Field = "_antiRollOverForce", Label = "Anti-rollover", Min = 0f, Max = 200f }, new Row { Field = "_steerSmoothing", Label = "Steer smoothing", Min = 0f, Max = 30f }, new Row { Field = "_linearDampAboveWater", Label = "Air drag", Min = 0f, Max = 5f }, new Row { Field = "_angularDampAboveWater", Label = "Air spin drag", Min = 0f, Max = 5f }, new Row { Field = "_underwaterLinearDamp", Label = "Water drag", Min = 0f, Max = 5f }, new Row { Field = "_underwaterAngularDamp", Label = "Water spin drag", Min = 0f, Max = 5f } }; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } if (!BoatCheats.Available) { Widgets.Note("No boat in the scene yet. Load into a save with a boat spawned."); return; } Widgets.Section("Unlocks", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(BoatCheats.Unlocked ? "Boat unlocked" : "Boat locked", Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); GUILayout.Label(BoatCheats.RadarUnlocked ? "Radar unlocked" : "Radar locked", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Unlock boat", BoatCheats.UnlockBoat, "Boat unlocked", Theme.BtnAccent); Widgets.ActionButton("Unlock radar", BoatCheats.UnlockRadar, "Radar unlocked", Theme.BtnAccent); Widgets.ActionButton("Bring boat to me", BoatCheats.BringToPlayer, "Boat moved"); GUILayout.EndHorizontal(); }); Widgets.Section("Motor", delegate { GUILayout.Label($"Current tier: {BoatCheats.Motor}", Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (byte b = 0; b <= 4; b++) { byte t = b; Widgets.ActionButton($"{t}", () => BoatCheats.SetMotor(t), $"Motor set to {t}", (t == BoatCheats.Motor) ? Theme.BtnAccent : Theme.Btn, 44f); } GUILayout.EndHorizontal(); Widgets.Note("The game's own SetMotor only ever upgrades, so dropping to a lower tier writes the value directly instead."); }); Widgets.Section("Flight", delegate { if (!BoatCheats.FlyAvailable) { Widgets.Note("No boat rigidbody resolved — flight unavailable."); } else { CheatState.BoatFly = Widgets.ToggleRow("Boat flight", CheatState.BoatFly, CheatState.BoatFly ? "active" : "off"); CheatState.BoatFlySpeed = Widgets.SliderRow("Climb speed", CheatState.BoatFlySpeed, 1f, 100f, "0.#", 15f); Widgets.Note("Turns off the boat's gravity and gives Space and Left Ctrl control of its height. Steer normally while airborne. Gravity comes back when you switch it off — so switch it off over water."); } }); Widgets.Section("Speed", delegate { float motorForce = BoatCheats.MotorForce; float num = Widgets.SliderRow("Engine power", motorForce, 0f, 20000f, "0", BoatCheats.MotorForceDefault); if (!Mathf.Approximately(motorForce, num)) { BoatCheats.SetMotorForce(num); } float maxSpeed = BoatCheats.MaxSpeed; float num2 = Widgets.SliderRow("Speed limit", maxSpeed, 1f, 400f, "0"); if (!Mathf.Approximately(maxSpeed, num2)) { BoatCheats.SetMaxSpeed(num2); } Widgets.Note("Engine power is the thrust the motor applies and is the real speed control. The limit is the rigidbody's velocity cap — the game only reads its own value at startup, so this writes the cap directly."); }); Widgets.Section("Handling", delegate { Row[] rows = Rows; for (int i = 0; i < rows.Length; i++) { Row row = rows[i]; float num = BoatCheats.Get(row.Field); float num2 = Widgets.SliderRow(row.Label, num, row.Min, row.Max, "0.##", BoatCheats.Default(row.Field)); if (!Mathf.Approximately(num, num2)) { BoatCheats.Set(row.Field, num2); } } GUILayout.Space(4f); Widgets.ActionButton("Reset handling", delegate { BoatCheats.ResetAll(); return true; }, "Boat handling reset", Theme.BtnAccent); Widgets.Note("Steering and throttle angle were removed — they only rotate the wheel and lever props and never touched how the boat handles."); }); } } internal static class DiagnosticsTab { internal const string Title = "Diagnostics"; private static Vector2 _scroll; internal static void Draw() { //IL_0052: 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_0061: Unknown result type (might be due to invalid IL or missing references) Widgets.Section("Status", delegate { Line("In game", Refs.InGame); Line("Host / solo", Refs.IsHost); Line("Dev cheats unlocked", CheatGate.CheatsEnabled); Line("Money API", MoneyCheats.Available); Line("Movement API", MovementCheats.Available); Line("Spawn API", SpawnCheats.Available); Line("Spawn catalogue", SpawnCatalog.Loaded, $"{SpawnCatalog.Count} entries"); Line("Boat present", BoatCheats.Available); Line("Casino present", GamblingCheats.Available); Line("Skin machine", GamblingCheats.SlotsAvailable); Line("Inventory API", FishingCheats.Available); Line("Boss active", WorldCheats.BossActive); Line("FOV control", VisualCheats.FovAvailable); Line("Free camera", VisualCheats.FreeCamAvailable); Line("Holding a weapon", WeaponCheats.HoldingWeapon, WeaponCheats.WeaponName); Line("Kill score control", KillScoreCheats.Available, $"{KillScoreCheats.Catalogue.Count} bonuses"); }); Widgets.Section("Bindings", delegate { int failed = BindingReport.Failed; GUILayout.Label((failed == 0) ? $"All {BindingReport.Total} resolved." : $"{failed} of {BindingReport.Total} failed to resolve.", (failed == 0) ? Theme.Body : Theme.H2, Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Re-run checks", Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) })) { RunChecks(); } }); _scroll = GUILayout.BeginScrollView(_scroll, Array.Empty<GUILayoutOption>()); foreach (BindingReport.Entry item in BindingReport.All) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(item.Ok ? "OK" : "MISSING", item.Ok ? Theme.Muted : Theme.H2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(64f) }); GUILayout.Label(item.Name, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } private static void Line(string label, bool ok, string extra = null) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(label, Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(170f) }); GUILayout.Label(ok ? "yes" : "no", ok ? Theme.Body : Theme.H2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) }); if (!string.IsNullOrEmpty(extra)) { GUILayout.Label(extra, Theme.Muted, Array.Empty<GUILayoutOption>()); } GUILayout.EndHorizontal(); } internal static void RunChecks() { _ = MoneyCheats.Available; _ = MovementCheats.Available; _ = SpawnCheats.Available; _ = CheatGate.CheatsEnabled; _ = Refs.IsHost; string[] fields = MovementCheats.Fields; foreach (string fieldName in fields) { GameBinder.Field("PlayerMovement", fieldName); } GameBinder.Method("PlayerManager", "ToggleGodMode", 0); GameBinder.Property("PlayerManager", "InGodMode"); GameBinder.Method("ServerSettings", "ToggleOneShot", 0); GameBinder.Method("ServerSettings", "ToggleFriendlyFire", 1); GameBinder.Method("PlayerVitals", "Heal", 1); GameBinder.Method("PlayerVitals", "RestoreFullness", 1); GameBinder.Method("PlayerVitals", "ServerResetVitals", 0); GameBinder.Method("ClientSettings", "ToggleCheats", 1); GameBinder.Field("GameInfo", "_nameToSpawnable"); GameBinder.Field("MoneyManager", "_money"); GameBinder.Method("MoneyManager", "RemoveMoney", 2); GameBinder.Field("Player", "LocalPlayer"); GameBinder.Property("BoatManager", "Boat"); GameBinder.Method("Boat", "SetMotor", 1); GameBinder.Method("Boat", "UnlockBoat", 0); GameBinder.Method("BoatManager", "TryMoveBoat", 2); GameBinder.Method("OnlineIslandManager", "TpToSpecificIsland", 1); GameBinder.Method("OnlineIslandManager", "UnlockIsland", 1); GameBinder.Method("Server", "TeleportPlayer", 3); GameBinder.Property("PlayerManager", "AlivePlayers"); GameBinder.Property("PlayerHolding", "HeldItem"); GameBinder.Field("Item", "_worth"); GameBinder.Field("Item", "_cookness"); GameBinder.Method("Item", "SetKillscoreMultiplier", 1); GameBinder.Method("Server", "SetItemSkin", 2); GameBinder.Method("SaveManager", "UnlockSkin", 2); GameBinder.Method("SaveManager", "LockAllSkins", 0); GameBinder.Property("GameInfo", "ItemWithSkinsforCommands"); GameBinder.Method("Server", "SetBoatSkin", 1); GameBinder.Method("GameInfo", "ToggleAllCreaturesKilled", 2); GameBinder.Method("BossManager", "ToggleImmortal", 1); GameBinder.Method("Creature", "HealBoss", 1); GameBinder.Method("NPCManager", "UnlockGrill", 0); GameBinder.Method("AchievementManager", "ToggleAllAchievements", 1); GameBinder.Method("DazedCommands", "UseFinishGameCommand", 0); GameBinder.Method("PlayerInventory", "UnlockExtraPocket", 1); GameBinder.Method("PlayerInventory", "ServerBoughtBait", 1); GameBinder.Method("PlayerInventory", "ServerSetCurBait", 1); GameBinder.Property("GameInfo", "AllBaits"); GameBinder.Method("CasinoManager", "ServerRouletteResult", 1); GameBinder.Method("SlotMachineManager", "SetCheatSkin", 2); GameBinder.EnumNames("BetColor"); GameBinder.Method("PlayerCamera", "SetFOV", 1); GameBinder.Property("PlayerCamera", "CamTransform"); GameBinder.Method("DecalManager", "ToggleDamageNumbers", 1); GameBinder.Method("DecalManager", "ToggleBlood", 1); GameBinder.Method("DecalManager", "ToggleDecals", 1); GameBinder.Property("ItemManager", "Items"); GameBinder.Property("Creature", "IsDead"); GameBinder.Field("CasinoManager", "_curBetColor"); GameBinder.Field("CasinoManager", "_itemsToBet"); GameBinder.Property("CasinoManager", "IsBetting"); GameBinder.Method("CasinoManager", "ServerStartBet", 1); GameBinder.Field("LocalCasino", "_wheel"); GameBinder.Field("LocalCasino", "_ballAngleObject"); GameBinder.Field("LocalCasino", "_slotSize"); GameBinder.Field("LocalCasino", "_isPlaying"); GameBinder.Field("LocalCasino", "_timeInSameSlot"); GameBinder.Method("SlotMachineManager", "RollRandom", 1); GameBinder.Field("SlotMachineManager", "_cheatSkinIndex"); GameBinder.Field("PlayerMovement", "_curMoveSpeed"); GameBinder.Field("PlayerMovement", "_targetMoveSpeed"); GameBinder.Method("PlayerMovement", "Teleport", 2); GameBinder.Property("Player", "Rigidbody"); GameBinder.Property("Player", "Movement"); GameBinder.Property("Player", "Skin"); GameBinder.Field("Boat", "_motorIndex"); GameBinder.Property("Boat", "HiddenPhysicsRig"); GameBinder.Method("Creature", "ServerChangeHp", 1); GameBinder.Method("Item", "DestroyItem", 2); GameBinder.Method("PlayerSkin", "InitializeOther", 0); GameBinder.Field("PlayerSkin", "_bodyRenderer"); GameBinder.Property("Item", "Weapon"); GameBinder.Property("Weapon", "Attachments"); GameBinder.Property("Weapon", "Ammo"); GameBinder.Field("Weapon", "<Ammo>k__BackingField"); GameBinder.Field("Weapon", "_spread"); GameBinder.Field("Weapon", "_recoilKnockback"); GameBinder.Field("Weapon", "_timeBetweenShots"); GameBinder.Field("Weapon", "_projectileCountPerShot"); GameBinder.Field("Weapon", "_projSpeed"); GameBinder.Property("Attachments", "FirePoint"); GameBinder.Method("Server", "BuyBulletUpgrade", 1); GameBinder.Method("PlayerKillScore", "AddKillScore", 3); GameBinder.Method("KillScoreCalculator", "GetAllBonuses", 1); GameBinder.Field("Bonus", "Name"); GameBinder.Field("Bonus", "Worth"); GameBinder.Method("PlayerInventory", "ServerDropAll", 2); GameBinder.Method("PlayerInventory", "SaveInventory", 1); GameBinder.Method("Server", "DropAllItems", 3); GameBinder.Method("Weapon", "Shoot", 0); GameBinder.Method("Weapon", "AddModelRecoil", 1); GameBinder.Method("PlayerCamera", "Recoil", 1); GameBinder.Method("PlayerToolMovement", "Recoil", 1); GameBinder.Field("Boat", "_motors"); GameBinder.Field("Boat", "_propellerInWater"); GameBinder.Property("BoatMotor", "Force"); GameBinder.Field("BoatMotor", "<Force>k__BackingField"); SpawnCatalog.Load(); Plugin.Log.LogInfo((object)$"Diagnostics: {BindingReport.Failed}/{BindingReport.Total} bindings failed."); } } internal static class EntitiesTab { internal const string Title = "Entities"; private static Vector2 _scroll; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } if (!EntityCheats.Available) { Widgets.Note("ItemManager.Items did not resolve. See Diagnostics."); return; } Widgets.Section("What's out there", delegate { //IL_0046: 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_0063: Unknown result type (might be due to invalid IL or missing references) GUILayout.Label($"{EntityCheats.TotalCount} loose object(s) in the world", Theme.H1, Array.Empty<GUILayoutOption>()); Widgets.Note("Anything a player is holding or has stored is excluded and never removed."); List<EntityCheats.Group> list = EntityCheats.Summary(); if (list.Count == 0) { Widgets.Note("Nothing loose right now."); } else { _scroll = GUILayout.BeginScrollView(_scroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(150f) }); foreach (EntityCheats.Group item in list) { SpawnCatalog.Category kind = item.Kind; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(kind.ToString(), Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.Label(item.Count.ToString("N0"), Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); GUILayout.FlexibleSpace(); Widgets.ActionButton("Despawn", () => EntityCheats.DespawnCategory(kind) > 0, $"Cleared {kind}", Theme.Btn, 80f); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } }); Widgets.Section("Clear near me", delegate { CheatState.DespawnRadius = Widgets.SliderRow("Radius", CheatState.DespawnRadius, 5f, 200f, "0", 30f); Widgets.ActionButton($"Despawn everything within {CheatState.DespawnRadius:0}m", () => EntityCheats.DespawnNearby(CheatState.DespawnRadius) > 0, "Area cleared", Theme.BtnAccent); Widgets.Note("The safest option after a spawn button gets away from you."); }); Widgets.Section("Clear everything", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("All creatures", () => EntityCheats.DespawnCreatures() > 0, "Creatures cleared", Theme.BtnDanger); Widgets.ActionButton("Everything loose", () => EntityCheats.DespawnAll() > 0, "World cleared", Theme.BtnDanger); GUILayout.EndHorizontal(); Widgets.Note("Uses the game's own Item.DestroyItem, so objects despawn across the network properly rather than vanishing only on your screen. This will also remove loot and quest items lying on the ground."); }); } } internal static class FishingTab { internal const string Title = "Fishing"; private static Vector2 _scroll; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } if (!FishingCheats.Available) { Widgets.Note("No player inventory yet. Load into a save first."); return; } Widgets.Section("Bait", delegate { GUILayout.Label($"Currently equipped: bait {FishingCheats.CurrentBait}", Theme.Body, Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Grant every bait", FishingCheats.GrantAllBaits, "All baits granted", Theme.BtnAccent); Widgets.Note("Grants ownership without charging — the same call the game makes once a purchase is approved."); }); List<FishingCheats.BaitEntry> baits = FishingCheats.AllBaits(); if (baits.Count == 0) { Widgets.Note("GameInfo.AllBaits did not resolve. See Diagnostics."); return; } Widgets.Section($"All baits ({baits.Count})", delegate { //IL_0000: 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_001d: Unknown result type (might be due to invalid IL or missing references) _scroll = GUILayout.BeginScrollView(_scroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(260f) }); foreach (FishingCheats.BaitEntry item in baits) { FishingCheats.BaitEntry b = item; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(b.Name, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); if (b.Cost > 0) { GUILayout.Label($"{b.Cost:N0}", Theme.Muted, Array.Empty<GUILayoutOption>()); } Widgets.ActionButton("Grant", () => FishingCheats.GrantBait(b.Index), "Granted " + b.Name, Theme.Btn, 58f); Widgets.ActionButton("Equip", () => FishingCheats.SelectBait(b.Index), "Equipped " + b.Name, (b.Index == FishingCheats.CurrentBait) ? Theme.BtnAccent : Theme.Btn, 58f); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); }); } } internal static class GamblingTab { internal const string Title = "Gambling"; private static Vector2 _scroll; internal static void Draw() { if (Widgets.RequireHost(CheatGate.BlockReason())) { if (!GamblingCheats.Available) { Widgets.Note("No casino in this scene. Travel to the island with the casino."); DrawSlotMachine(); return; } DrawRig(); DrawLive(); DrawTable(); DrawSlotMachine(); } } private static void DrawRig() { Widgets.Section("Roulette odds", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Off", Mode(GamblingCheats.Mode.Off), Array.Empty<GUILayoutOption>())) { GamblingCheats.RigMode = GamblingCheats.Mode.Off; } if (GUILayout.Button("Win chance", Mode(GamblingCheats.Mode.Odds), Array.Empty<GUILayoutOption>())) { GamblingCheats.RigMode = GamblingCheats.Mode.Odds; } if (GUILayout.Button("Force colour", Mode(GamblingCheats.Mode.ForceColour), Array.Empty<GUILayoutOption>())) { GamblingCheats.RigMode = GamblingCheats.Mode.ForceColour; } GUILayout.EndHorizontal(); switch (GamblingCheats.RigMode) { case GamblingCheats.Mode.Off: Widgets.Note("The wheel runs untouched. Real odds: 18 red, 18 black, 1 green."); break; case GamblingCheats.Mode.Odds: GamblingCheats.WinChance = Widgets.SliderRow("Win chance", GamblingCheats.WinChance, 0f, 100f, "0'%'", 50f); Widgets.Note("Rolled once per spin. On a win the ball is steered to the colour you bet; on a loss it goes to the other of red or black, never green, so a loss can't accidentally pay 35x."); break; case GamblingCheats.Mode.ForceColour: { string[] colours = GamblingCheats.Colours; if (colours.Length == 0) { Widgets.Note("BetColor enum did not resolve. See Diagnostics."); } else { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string[] array = colours; foreach (string text in array) { if (GUILayout.Button(text, (GamblingCheats.ForcedColour == text) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(96f) })) { GamblingCheats.ForcedColour = text; } } GUILayout.EndHorizontal(); Widgets.Note("Every spin lands on this colour regardless of what you bet. Green pays 35x."); } break; } } }); Widgets.Section("How this works", delegate { Widgets.Note("The ball is a real physics object and the game reads its actual angle against the wheel to decide the result. Rather than forging the payout — which is why other mods pay out on a colour the ball never touched — this rotates the wheel a fraction of a pocket while the ball settles, so the ball genuinely comes to rest on the colour you asked for. What you see is what pays, and other players see the same wheel."); }); } private static GUIStyle Mode(GamblingCheats.Mode m) { if (GamblingCheats.RigMode != m) { return Theme.Btn; } return Theme.BtnAccent; } private static void DrawLive() { Widgets.Section("Live", delegate { Row("Spin in progress", GamblingCheats.IsBetting ? "yes" : "no"); Row("You bet", GamblingCheats.BetColour); Row("Ball is on", GamblingCheats.CurrentBallColour); Row("Steering toward", GamblingCheats.CurrentTarget); Row("Pot worth", GamblingCheats.PotWorth.ToString("N0")); Row("Last result", GamblingCheats.LastOutcome); GUILayout.Space(4f); Row("Spins", $"{GamblingCheats.SpinsSeen} won {GamblingCheats.SpinsWon} " + $"lost {GamblingCheats.SpinsLost}"); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Settle now", GamblingCheats.SettleNow, "Wheel settled", Theme.Btn); Widgets.ActionButton("Reset stats", delegate { GamblingCheats.ResetStats(); return true; }, "Stats cleared", Theme.Btn); GUILayout.EndHorizontal(); Widgets.Note("Settle now ends the spin immediately on whatever pocket the ball is already over — use it once the colour reads correctly."); }); } private static void Row(string label, string value) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(label, Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(140f) }); GUILayout.Label(value, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); } private static void DrawTable() { Widgets.Section("Bet table", delegate { List<object> list = GamblingCheats.BetItems(); GUILayout.Label($"{list.Count} item(s) on the table", Theme.Body, Array.Empty<GUILayoutOption>()); CheatState.BetBoost = Widgets.SliderRow("Item value multiplier", CheatState.BetBoost, 1f, 50f, "0.##", 1f); Widgets.ActionButton("Apply to table", () => GamblingCheats.BoostBetItems(CheatState.BetBoost), $"Table items multiplied by {CheatState.BetBoost:0.##}", Theme.BtnAccent); Widgets.Note("Raises the worth of everything you've placed, so a win pays more. Apply before the wheel resolves."); string[] colours = GamblingCheats.Colours; if (colours.Length != 0 && !GamblingCheats.IsBetting) { GUILayout.Space(4f); GUILayout.Label("Start a spin manually", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string[] array = colours; foreach (string text in array) { string colour = text; Widgets.ActionButton(colour, () => GamblingCheats.StartSpin(colour), "Spinning on " + colour, Theme.Btn, 96f); } GUILayout.EndHorizontal(); } }); } private static void DrawSlotMachine() { if (!GamblingCheats.SlotsAvailable) { Widgets.Section("Skin machine", delegate { Widgets.Note("SlotMachineManager did not resolve. See Diagnostics."); }); return; } List<object> targets = GamblingCheats.SkinTargets(); object selected = SelectedTarget(targets); Widgets.Section("Skin machine", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(GamblingCheats.SlotRigArmed ? "Armed:" : "Nothing armed", Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(96f) }); GUILayout.Label(GamblingCheats.SlotRigArmed ? GamblingCheats.LastArmed : "the roll is random", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Roll the machine", GamblingCheats.RollSlots, "Rolled", Theme.BtnAccent); Widgets.ActionButton("Clear", GamblingCheats.ClearArmed, "Rig cleared"); GUILayout.EndHorizontal(); Widgets.Note("Arm a skin, then roll — the reel is built around your pick, so the machine visibly stops on the skin it hands you."); }); Widgets.Section("1 · What are you winning a skin for", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Boat", (CheatState.SlotTargetIndex < 0) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(96f) })) { CheatState.SlotTargetIndex = -1; } object held = ItemCheats.HeldItem; if (held != null) { int num = targets.FindIndex((object t) => t == held); if (GUILayout.Button("Held item", (num >= 0 && CheatState.SlotTargetIndex == num) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { if (num >= 0) { CheatState.SlotTargetIndex = num; } else { Notifications.Show(ItemCheats.ItemName(held) + " has no skins", ok: false); } } } GUILayout.EndHorizontal(); CheatState.SlotTargetFilter = Widgets.SearchBox(CheatState.SlotTargetFilter, "Find a weapon…"); string text = (CheatState.SlotTargetFilter ?? "").Trim().ToLowerInvariant(); int num2 = 0; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (int num3 = 0; num3 < targets.Count; num3++) { string text2 = GamblingCheats.TargetName(targets[num3]); if (text.Length <= 0 || text2.ToLowerInvariant().Contains(text)) { int num4 = num3; if (GUILayout.Button(text2, (CheatState.SlotTargetIndex == num4) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(128f) })) { CheatState.SlotTargetIndex = num4; } if (++num2 % 3 == 0) { GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); } } } GUILayout.EndHorizontal(); GUILayout.Label("Selected: " + GamblingCheats.TargetName(selected), Theme.Body, Array.Empty<GUILayoutOption>()); }); List<SkinCheats.SkinEntry> skins = GamblingCheats.SkinsFor(selected); if (skins.Count == 0) { Widgets.Section("2 · Pick a skin", delegate { Widgets.Note(GamblingCheats.TargetName(selected) + " has no skin preset."); }); return; } <>c__DisplayClass8_0 CS$<>8__locals2; Widgets.Section("2 · Pick a rarity, or take any of it", delegate { List<string> list = GamblingCheats.RaritiesFor(selected); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("All", string.IsNullOrEmpty(CheatState.SlotRarity) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(84f) })) { CheatState.SlotRarity = ""; } foreach (string item in list) { if (GUILayout.Button(item, (CheatState.SlotRarity == item) ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(104f) })) { CheatState.SlotRarity = item; } } GUILayout.EndHorizontal(); if (!string.IsNullOrEmpty(CheatState.SlotRarity)) { string rarity = CheatState.SlotRarity; Widgets.ActionButton("Arm a random " + rarity + " skin", () => GamblingCheats.ArmRandomOfRarity(CS$<>8__locals2, rarity), "Armed a " + rarity + " skin", Theme.BtnAccent); } Widgets.Note("Rarity also decides where on the reel it lands — the game seats commons, rares and legendaries in different positions."); }); Widgets.Section("3 · Or choose the exact skin", delegate { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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) CheatState.SlotSkinFilter = Widgets.SearchBox(CheatState.SlotSkinFilter, "Filter skins…"); string filter = (CheatState.SlotSkinFilter ?? "").Trim().ToLowerInvariant(); List<SkinCheats.SkinEntry> list = (from skinEntry in skins where string.IsNullOrEmpty(CheatState.SlotRarity) || string.Equals(skinEntry.Rarity, CheatState.SlotRarity, StringComparison.OrdinalIgnoreCase) where filter.Length == 0 || skinEntry.Name.ToLowerInvariant().Contains(filter) || (skinEntry.Rarity ?? "").ToLowerInvariant().Contains(filter) select skinEntry).ToList(); GUILayout.Label($"{list.Count} of {skins.Count} skins", Theme.Muted, Array.Empty<GUILayoutOption>()); _scroll = GUILayout.BeginScrollView(_scroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(220f) }); foreach (SkinCheats.SkinEntry item2 in list) { SkinCheats.SkinEntry s = item2; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(s.Name, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); if (!string.IsNullOrEmpty(s.Rarity)) { GUILayout.Label(s.Rarity, Theme.Muted, Array.Empty<GUILayoutOption>()); } Widgets.ActionButton("Arm", () => GamblingCheats.ArmSkin(CS$<>8__locals2, s), "Next roll awards " + s.Name, Theme.BtnAccent, 54f); Widgets.ActionButton("Unlock", () => SkinCheats.UnlockSkin(CS$<>8__locals2, s.Index), "Unlocked " + s.Name, Theme.Btn, 66f); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); }); } private static object SelectedTarget(List<object> targets) { if (CheatState.SlotTargetIndex < 0) { return null; } if (CheatState.SlotTargetIndex >= targets.Count) { return null; } return targets[CheatState.SlotTargetIndex]; } } internal static class ItemsTab { internal const string Title = "Items"; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } object held = ItemCheats.HeldItem; Widgets.Section("Target", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Held item", (CheatState.ItemTarget == ItemCheats.Target.Held) ? Theme.BtnAccent : Theme.Btn, Array.Empty<GUILayoutOption>())) { CheatState.ItemTarget = ItemCheats.Target.Held; } if (GUILayout.Button("Every item in world", (CheatState.ItemTarget == ItemCheats.Target.World) ? Theme.BtnAccent : Theme.Btn, Array.Empty<GUILayoutOption>())) { CheatState.ItemTarget = ItemCheats.Target.World; } GUILayout.EndHorizontal(); int count = ItemCheats.Resolve(CheatState.ItemTarget).Count; GUILayout.Label((CheatState.ItemTarget != ItemCheats.Target.Held) ? $"{count} items in the world." : ((held == null) ? "Nothing in hand." : ("Holding: " + ItemCheats.ItemName(held))), Theme.Muted, Array.Empty<GUILayoutOption>()); }); if (held != null && CheatState.ItemTarget == ItemCheats.Target.Held) { Widgets.Section("Current values", delegate { Stat("Base worth", ItemCheats.Worth(held).ToString("N0")); Stat("Total worth", ItemCheats.TotalWorth(held).ToString("N0")); Stat("Weight", ItemCheats.Weight(held).ToString("0.###")); Stat("Cookness", ItemCheats.Cookness(held).ToString("0.###")); Stat("Kill score multi", ItemCheats.KillScoreMulti(held).ToString("0.###")); Stat("Betting multi", ItemCheats.BettingMulti(held).ToString("0.###")); }); } Widgets.Section("Worth", delegate { CheatState.ItemWorth = Widgets.FieldRow("Base worth", CheatState.ItemWorth, 100f); int worth = MoneyTab.Parse(CheatState.ItemWorth); Widgets.ActionButton("Apply worth", () => Apply((object i) => ItemCheats.SetWorth(i, worth)), $"Worth set to {worth:N0}", Theme.BtnAccent); Widgets.Note("Total worth is derived from base worth, weight and cookness."); }); Widgets.Section("Multipliers", delegate { CheatState.ItemWeight = Widgets.SliderRow("Weight", CheatState.ItemWeight, 0.1f, 50f, "0.##", 1f); Widgets.ActionButton("Apply weight", () => Apply((object i) => ItemCheats.SetWeight(i, CheatState.ItemWeight)), $"Weight set to {CheatState.ItemWeight:0.##}"); CheatState.ItemCookness = Widgets.SliderRow("Cookness", CheatState.ItemCookness, 0f, 2f, "0.##", 1f); Widgets.ActionButton("Apply cookness", () => Apply((object i) => ItemCheats.SetCookness(i, CheatState.ItemCookness)), $"Cookness set to {CheatState.ItemCookness:0.##}"); CheatState.ItemKillScore = Widgets.SliderRow("Kill score", CheatState.ItemKillScore, 0f, 25f, "0.##", 1f); Widgets.ActionButton("Apply kill score", () => Apply((object i) => ItemCheats.SetKillScoreMulti(i, CheatState.ItemKillScore)), $"Kill score multi {CheatState.ItemKillScore:0.##}"); CheatState.ItemBetting = Widgets.SliderRow("Betting", CheatState.ItemBetting, 0f, 25f, "0.##", 1f); Widgets.ActionButton("Apply betting", () => Apply((object i) => ItemCheats.SetBettingMulti(i, CheatState.ItemBetting)), $"Betting multi {CheatState.ItemBetting:0.##}"); }); Widgets.Section("Stacking and inventory", delegate { CheatState.KeepInventory = Widgets.ToggleRow("Keep inventory on death", CheatState.KeepInventory, CheatState.KeepInventory ? "ACTIVE" : "off"); Widgets.Note("Skips the drop that normally scatters your items when you die, on both the inventory and the server side so nothing desyncs."); GUILayout.Space(4f); CheatState.DuplicateCount = Widgets.IntSliderRow("Copies", CheatState.DuplicateCount, 1, 50); Widgets.ActionButton($"Duplicate held item ×{CheatState.DuplicateCount}", () => InventoryCheats.DuplicateHeld(CheatState.DuplicateCount) > 0, $"Made {CheatState.DuplicateCount} copies", Theme.BtnAccent); Widgets.Note("The game has no stack count — every slot holds one real item with its own worth and skin — so this spawns that many genuine copies at your feet instead of faking a stack number."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Save inventory", InventoryCheats.SaveInventory, "Inventory saved"); Widgets.ActionButton("Drop everything", InventoryCheats.DropAll, "Dropped", Theme.BtnDanger); GUILayout.EndHorizontal(); }); Widgets.Section("Bulk", delegate { Widgets.ActionButton("Make everything valuable", () => Apply((object i) => ItemCheats.SetWorth(i, 100000) && ItemCheats.SetWeight(i, 10f)), "Applied to the current target", Theme.BtnDanger); Widgets.Note("Applies base worth 100,000 and weight 10 to whichever target is selected above."); }); } private static bool Apply(Func<object, bool> action) { return ItemCheats.ApplyToAll(CheatState.ItemTarget, action) > 0; } private static void Stat(string label, string value) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(label, Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); GUILayout.Label(value, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); } } internal static class KeybindsTab { internal const string Title = "Keybinds"; internal static void Draw() { Widgets.Section("Master switch", delegate { //IL_0086: Unknown result type (might be due to invalid IL or missing references) bool enabled = Keybinds.Enabled; bool flag = Widgets.ToggleRow("Enable all keybinds", enabled, enabled ? "ACTIVE" : "off"); if (flag != enabled) { Plugin.KeybindsEnabled.Value = flag; Notifications.Show(flag ? "Cheat hotkeys enabled" : "Cheat hotkeys disabled"); } GUILayout.Space(2f); GUILayout.Label(enabled ? "Hotkeys below are live." : "Hotkeys below do nothing while this is off.", enabled ? Theme.Body : Theme.Muted, Array.Empty<GUILayoutOption>()); Widgets.Note($"The menu key ({Plugin.ToggleKey.Value}) is not affected by this switch " + "and always works."); }); Widgets.Section("Hotkeys", delegate { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) if (!Keybinds.Enabled) { Widgets.Note("Currently inactive — you can still rebind them."); } Widgets.Note("Click a key to rebind it, then press the new key. Escape cancels."); GUILayout.Space(2f); foreach (Keybinds.Bind item in Keybinds.All) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(item.Name, Keybinds.Enabled ? Theme.Body : Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); bool flag = Keybinds.Capturing == item; if (GUILayout.Button(flag ? "press a key…" : ((object)item.Key.Value/*cast due to .constrained prefix*/).ToString(), flag ? Theme.BtnAccent : Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) })) { Keybinds.Capturing = (flag ? null : item); } GUILayout.Label(item.IsOn() ? "on" : "off", Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(30f) }); if (GUILayout.Button("clear", Theme.Btn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(56f) })) { item.Key.Value = (KeyCode)0; } GUILayout.EndHorizontal(); } GUILayout.Space(4f); Widgets.Note("A cleared bind is stored as None and stays inactive until you set a key."); }); Widgets.Section("Menu", delegate { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Open / close menu", Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label(((object)Plugin.ToggleKey.Value/*cast due to .constrained prefix*/).ToString(), Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) }); GUILayout.Label("always on", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); Widgets.Note("Change this one in BepInEx/config/envincible.howtofish.completecheatmenu.cfg, so a mis-set key can never lock you out of the menu."); }); } } internal static class KillScoreTab { internal const string Title = "Kill score"; private static Vector2 _scroll; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } if (!KillScoreCheats.Available) { Widgets.Note("PlayerKillScore.AddKillScore did not resolve. See Diagnostics."); return; } Widgets.Section("Override", delegate { CheatState.KillScoreOverride = Widgets.ToggleRow("Use my bonuses", CheatState.KillScoreOverride, CheatState.KillScoreOverride ? "ACTIVE" : "off"); GUILayout.Label($"Multiplier: ×{KillScoreCheats.PreviewMultiplier:0.##}", Theme.H1, Array.Empty<GUILayoutOption>()); CheatState.KillFlatMultiplier = Widgets.SliderRow("Extra multiplier", CheatState.KillFlatMultiplier, 1f, 50f, "0.##", 1f); CheatState.KillBonusLabel = Widgets.FieldRow("Its label", CheatState.KillBonusLabel, 90f); Widgets.Note("The extra multiplier is added as its own named row, so it shows up on the banner like any other bonus rather than appearing from nowhere."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Select all", delegate { for (int i = 0; i < KillScoreCheats.Catalogue.Count; i++) { if (!KillScoreCheats.Catalogue[i].Selected) { KillScoreCheats.Toggle(i); } } return true; }, "All bonuses selected", Theme.Btn); Widgets.ActionButton("Clear", delegate { KillScoreCheats.ClearSelection(); return true; }, "Selection cleared", Theme.Btn); GUILayout.EndHorizontal(); }); Widgets.Section($"Bonuses ({KillScoreCheats.Selected.Count()} of {KillScoreCheats.Catalogue.Count})", delegate { //IL_0000: 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_001d: Unknown result type (might be due to invalid IL or missing references) _scroll = GUILayout.BeginScrollView(_scroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(300f) }); List<KillScoreCheats.BonusOption> catalogue = KillScoreCheats.Catalogue; for (int i = 0; i < catalogue.Count; i++) { KillScoreCheats.BonusOption bonusOption = catalogue[i]; int index = i; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Toggle(bonusOption.Selected, " " + bonusOption.Name, Theme.Toggle, Array.Empty<GUILayoutOption>()) != bonusOption.Selected) { KillScoreCheats.Toggle(index); } GUILayout.FlexibleSpace(); GUILayout.Label($"×{bonusOption.Worth:0.##}", Theme.Muted, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(52f) }); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); Widgets.Note("Bonuses multiply together — the game computes the payout as the product of every row, which is why picking several stacks up fast."); }); } } internal static class MoneyTab { internal const string Title = "Money"; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } if (!MoneyCheats.Available) { Widgets.Note("MoneyManager.AddMoney(int, Player) did not resolve. See Diagnostics."); return; } Widgets.Section("Balance", delegate { GUILayout.Label($"{MoneyCheats.Balance:N0}", Theme.H1, Array.Empty<GUILayoutOption>()); CheatState.MoneyAmount = Widgets.FieldRow("Amount", CheatState.MoneyAmount, 80f); int amount = Parse(CheatState.MoneyAmount); Widgets.Note("Accepts shorthand: 50k, 2.5m, 1b."); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Add", () => MoneyCheats.Add(amount), $"+{amount:N0}", Theme.BtnAccent); Widgets.ActionButton("Remove", () => MoneyCheats.Remove(amount), $"-{amount:N0}"); Widgets.ActionButton("Set to", () => MoneyCheats.SetTo(amount), $"Balance set to {amount:N0}"); GUILayout.EndHorizontal(); }); Widgets.Section("Quick add", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("+1k", () => MoneyCheats.Add(1000), "+1,000"); Widgets.ActionButton("+10k", () => MoneyCheats.Add(10000), "+10,000"); Widgets.ActionButton("+100k", () => MoneyCheats.Add(100000), "+100,000"); Widgets.ActionButton("+1M", () => MoneyCheats.Add(1000000), "+1,000,000"); GUILayout.EndHorizontal(); }); } internal static int Parse(string s) { if (string.IsNullOrEmpty(s)) { return 0; } s = s.Trim().Replace(",", "").Replace("_", ""); double num = 1.0; if (s.Length > 1) { switch (char.ToLowerInvariant(s[s.Length - 1])) { case 'k': num = 1000.0; s = s.Substring(0, s.Length - 1); break; case 'm': num = 1000000.0; s = s.Substring(0, s.Length - 1); break; case 'b': num = 1000000000.0; s = s.Substring(0, s.Length - 1); break; } } if (!double.TryParse(s, NumberStyles.Float, CultureInfo.InvariantCulture, out var result)) { return 0; } double val = result * num; return (int)Math.Max(-2147483648.0, Math.Min(2147483647.0, val)); } } internal static class MovementTab { private struct Row { internal string Field; internal string Label; internal float Min; internal float Max; } internal const string Title = "Movement"; private static readonly Row[] Rows = new Row[8] { new Row { Field = "_walkSpeed", Label = "Walk speed", Min = 0f, Max = 60f }, new Row { Field = "_sprintSpeed", Label = "Sprint speed", Min = 0f, Max = 100f }, new Row { Field = "_crouchWalkSpeedMulti", Label = "Crouch multi", Min = 0f, Max = 5f }, new Row { Field = "_jumpForce", Label = "Jump force", Min = 0f, Max = 60f }, new Row { Field = "_extraGravityForce", Label = "Extra gravity", Min = 0f, Max = 60f }, new Row { Field = "_acceleration", Label = "Acceleration", Min = 0f, Max = 200f }, new Row { Field = "_decceleration", Label = "Deceleration", Min = 0f, Max = 200f }, new Row { Field = "_sinkSpeed", Label = "Sink speed", Min = 0f, Max = 30f } }; internal static void Draw() { if (!MovementCheats.Available) { Widgets.RequireHost("Load into a save first."); return; } Widgets.Section("Flight", delegate { if (!MovementCheats.FlyAvailable) { Widgets.Note("PlayerMovement._curMoveSpeed did not resolve — flight unavailable."); } else { CheatState.Fly = Widgets.ToggleRow("Fly mode", CheatState.Fly, CheatState.Fly ? "active" : "off"); CheatState.FlyHorizontalSpeed = Widgets.SliderRow("Horizontal speed", CheatState.FlyHorizontalSpeed, 1f, 200f, "0.#", 25f); CheatState.FlyVerticalSpeed = Widgets.SliderRow("Vertical speed", CheatState.FlyVerticalSpeed, 1f, 120f, "0.#", 12f); Widgets.Note("WASD moves, Space up, Left Ctrl down. Releasing both hovers instead of falling. Gravity is restored when you switch fly off."); } }); Widgets.Section("Ground movement", delegate { Row[] rows = Rows; for (int i = 0; i < rows.Length; i++) { Row row = rows[i]; float num = MovementCheats.Get(row.Field); float num2 = Widgets.SliderRow(row.Label, num, row.Min, row.Max, "0.##", MovementCheats.Default(row.Field)); if (!Mathf.Approximately(num, num2)) { MovementCheats.Set(row.Field, num2); } } GUILayout.Space(4f); Widgets.ActionButton("Reset all to defaults", delegate { MovementCheats.ResetAll(); return true; }, "Movement reset", Theme.BtnAccent); Widgets.Note("Defaults are captured the first time each slider is read this session."); }); } } internal static class PlayerTab { internal const string Title = "Player"; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } Widgets.Section("Invulnerability", delegate { bool godMode = CombatCheats.GodMode; bool flag = Widgets.ToggleRow("God mode", godMode, godMode ? "on" : "off"); if (flag != godMode) { Notifications.Result(CombatCheats.SetGodMode(flag), flag ? "God mode on" : "God mode off", "God mode toggle failed"); } bool oneShot = CombatCheats.OneShot; bool flag2 = Widgets.ToggleRow("One-shot kills", oneShot, oneShot ? "on" : "off"); if (flag2 != oneShot) { Notifications.Result(CombatCheats.SetOneShot(flag2), flag2 ? "One-shot on" : "One-shot off", "One-shot toggle failed"); } bool friendlyFire = CombatCheats.FriendlyFire; bool flag3 = Widgets.ToggleRow("Friendly fire", friendlyFire, friendlyFire ? "on" : "off"); if (flag3 != friendlyFire) { Notifications.Result(CombatCheats.SetFriendlyFire(flag3), flag3 ? "Friendly fire on" : "Friendly fire off", "Friendly fire toggle failed"); } }); Widgets.Section("Vitals", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label($"Health {CombatCheats.Health}", Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); GUILayout.Label($"Fullness {CombatCheats.Fullness}", Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); CheatState.HealAmount = Widgets.IntSliderRow("Amount", CheatState.HealAmount, 1, 100); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Heal", () => CombatCheats.Heal(CheatState.HealAmount), $"Healed {CheatState.HealAmount}"); Widgets.ActionButton("Feed", () => CombatCheats.RestoreFullness(CheatState.HealAmount), $"Fullness +{CheatState.HealAmount}"); Widgets.ActionButton("Full reset", CombatCheats.ResetVitals, "Vitals reset", Theme.BtnAccent); GUILayout.EndHorizontal(); Widgets.Note("Full reset also clears poison and fire."); }); Widgets.Section("Developer cheats", delegate { bool on = CheatGate.CheatsEnabled; GUILayout.Label(on ? "The game's own command suite is unlocked." : "Locked — the game's dev commands will refuse to run.", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton(on ? "Disable dev cheats" : "Enable dev cheats", () => CheatGate.EnableCheats(!on), on ? "Dev cheats disabled" : "Dev cheats enabled", on ? Theme.Btn : Theme.BtnAccent); GUILayout.EndHorizontal(); }); } } internal static class ProgressionTab { internal const string Title = "Progression"; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } Widgets.Section("Everything at once", delegate { Widgets.ActionButton("Unlock everything", ProgressionCheats.UnlockEverything, "Skins, characters, islands, boat, radar, grill and pockets unlocked", Theme.BtnAccent); Widgets.Note("Skins, characters, all islands, boat, radar, grill and every inventory pocket."); }); Widgets.Section("Inventory", delegate { GUILayout.Label($"Extra pockets unlocked: {ProgressionCheats.ExtraSlots}", Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); for (byte b = 1; b <= 4; b++) { byte slot = b; Widgets.ActionButton($"Pocket {slot}", () => ProgressionCheats.UnlockPocket(slot), $"Pocket {slot} unlocked", Theme.Btn, 88f); } GUILayout.EndHorizontal(); Widgets.ActionButton("Unlock all pockets", ProgressionCheats.UnlockAllPockets, "All pockets unlocked", Theme.BtnAccent); }); Widgets.Section("Game completion", delegate { Widgets.ActionButton("Finish game", ProgressionCheats.FinishGame, "Game marked finished", Theme.BtnDanger); Widgets.ActionButton("Show kill scores", ProgressionCheats.ShowKillScores, "Kill scores shown"); }); Widgets.Section("Steam achievements", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Unlock all", ProgressionCheats.UnlockAchievements, "All achievements unlocked", Theme.BtnDanger); Widgets.ActionButton("Lock all", ProgressionCheats.LockAchievements, "Achievements locked", Theme.Btn); GUILayout.EndHorizontal(); Widgets.Note("Achievements are written to Steam. Locking clears the local flags, but anything already pushed to your Steam profile stays there."); }); Widgets.Section("Save", delegate { Widgets.ActionButton("Save now", ProgressionCheats.SaveNow, "Server saved", Theme.BtnAccent); Widgets.Note("A backup copy of your save folder is taken automatically before the first permanent change each session."); }); } } internal static class SettingsTab { internal const string Title = "Settings"; internal static void Draw() { Widgets.Section("Presets", delegate { CheatState.PresetName = Widgets.FieldRow("Name", CheatState.PresetName, 60f); Widgets.ActionButton("Save current settings", () => Presets.Save(CheatState.PresetName), "Saved '" + CheatState.PresetName + "'", Theme.BtnAccent); List<string> list = Presets.List(); if (list.Count == 0) { Widgets.Note("No presets yet. Presets store movement, ESP, camera and item values."); return; } GUILayout.Space(4f); foreach (string item in list) { string n = item; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(n, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); Widgets.ActionButton("Load", () => Presets.Load(n), "Loaded '" + n + "'", Theme.BtnAccent, 58f); if (GUILayout.Button("×", Theme.BtnDanger, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(26f) })) { Presets.Delete(n); } GUILayout.EndHorizontal(); } }); Widgets.Section("Plugin", delegate { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Menu key", Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label(((object)Plugin.ToggleKey.Value/*cast due to .constrained prefix*/).ToString(), Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label("Cheat hotkeys", Theme.Body, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(150f) }); GUILayout.Label(Keybinds.Enabled ? "enabled" : "disabled — see Keybinds tab", Theme.Muted, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); Plugin.AutoEnableCheats.Value = Widgets.ToggleRow("Auto-unlock dev cheats", Plugin.AutoEnableCheats.Value); Plugin.BackupSaves.Value = Widgets.ToggleRow("Back up saves before permanent changes", Plugin.BackupSaves.Value); Widgets.Note("Config: BepInEx/config/envincible.howtofish.completecheatmenu.cfg"); }); } } internal static class SkinsTab { internal const string Title = "Skins"; private static Vector2 _scroll; internal static void Draw() { if (!Widgets.RequireHost(CheatGate.BlockReason())) { return; } Widgets.Section("Everything", delegate { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); Widgets.ActionButton("Unlock all weapon skins", SkinCheats.UnlockAll, "All weapon skins unlocked", Theme.BtnAccent); Widgets.ActionButton("Lock all", SkinCheats.LockAll, "All skins locked", Theme.BtnDanger); GUILayout.EndHorizontal(); Widgets.ActionButton("Unlock all characters", SkinCheats.UnlockAllCharacters, "All characters unlocked", Theme.BtnAccent); }); Widgets.Section("Held item skin", delegate { //IL_0072: 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_008f: Unknown result type (might be due to invalid IL or missing references) object held = ItemCheats.HeldItem; if (held == null) { Widgets.Note("Hold an item to see and apply its skins."); } else { List<SkinCheats.SkinEntry> list = SkinCheats.SkinsFor(held); GUILayout.Label($"{ItemCheats.ItemName(held)} — {list.Count} skins", Theme.Body, Array.Empty<GUILayoutOption>()); if (list.Count == 0) { Widgets.Note("This item has no skin preset."); } else { _scroll = GUILayout.BeginScrollView(_scroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(190f) }); foreach (SkinCheats.SkinEntry item in list) { SkinCheats.SkinEntry s = item; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); GUILayout.Label(s.Name, Theme.Body, Array.Empty<GUILayoutOption>()); GUILayout.FlexibleSpace(); if (!string.IsNullOrEmpty(s.Rarity)) { GUILayout.Label(s.Rarity, Theme.Muted, Array.Empty<GUILayoutOption>()); } Widgets.ActionButton("Unlock", () => SkinCheats.UnlockSkin(held, s.Index), "Unlocked " + s.Name, Theme.Btn, 62f); Widgets.ActionButton("Wear", () => ItemCheats.SetSkin(held, s.Index), "Applied " + s.Name, Theme.BtnAccent, 54f); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } } }); Widgets.Section("Boat skin", delegate { List<SkinCheats.SkinEntry> list = SkinCheats.BoatSkins(); if (list.Count == 0) { Widgets.Note("No boat in the scene, or it has no skin preset."); } else { GUILayout.Label("Current: " + list.FirstOrDefault((SkinCheats.SkinEntry skinEntry) => skinEntry.Index == SkinCheats.BoatSkin).Name, Theme.Body, Array.Empty<GUILayoutOption>()); int num = 0; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); foreach (SkinCheats.SkinEntry item2 in list) { SkinCheats.SkinEntry s = item2; Widgets.ActionButton(s.Name, () => SkinCheats.SetBoatSkin(s.Index), "Boat skin: " + s.Name, (s.Index == SkinCheats.BoatSkin) ? Theme.BtnAccent : Theme.Btn, 110f); if (++num % 3 == 0) { GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); } } GUILayout.EndHorizontal(); } }); Widgets.Section("Characters", delegate { CheatState.SkinFilter = Widgets.SearchBox(CheatState.SkinFilter, "Filter characters…"); string text = (CheatState.SkinFilter ?? "").Trim().ToLowerInvariant(); int num = 0; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); string[] charact