Decompiled source of KikisLootpoolRandomizer v3.3.7
plugins/KLP.dll
Decompiled a week 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.IO.Compression; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Peak; using Photon.Pun; using UnityEngine; using Zorro.Core; [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("KLP")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("KLP")] [assembly: AssemblyTitle("KLP")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace KikisLootpool { internal static class DefaultPreset { internal static readonly string Text = "[Format]\r\nVersion = 3\r\n[Vanilla]\r\nMesa Idol = 1\r\nWall Object Magic Bean = 1\r\nWall Object Warp Fungus = 1\r\nWall Object Puff Shroom = 1\r\nWall Object Shelf Shroom = 1\r\nWall Object = 1\r\nMesa Aloe Vera = 1\r\nMesa Dynamite = 1\r\nGloom Early Worm = 1\r\nShore Plane Crash Lantern = 1\r\nShore Plane Crash Guidebook = 1\r\nShore Plane Crash Frisbee = 1\r\nShore Plane Crash Flare = 1\r\nShore Plane Crash Compass = 1\r\nGloom Cattail = 1\r\nShore Plane Crash Bugle = 1\r\nCampfire Food = 1\r\nShore Plane Crash Binoculars = 1\r\nShore Plane Crash = 1\r\nGuidebook-Pages = 1\r\nGuidebook-Pages Beach = 1\r\nGuidebook-Pages Tropics = 1\r\nGuidebook-Pages Alpine = 1\r\nGuidebook-Pages Scroll = 1\r\n[Settings]\r\nSpotsWithLoot = 1\r\nGigaRandomize = 1\r\nSuperBeanMode = 0\r\nSuperBeanCount = 3\r\nBeanForce = 1600\r\nEnabled = 1\r\nRandomizePools = 1\r\nRandomizeVines = 1\r\nCleanup = 1\r\nCleanupRadius = 50\r\nCleanupBelow = 50\r\nCleanupPerFrame = 10\r\n[Global]\r\nMultiplier = 3\r\nSpots = 1\r\nAloeVera = 1\r\nAntiZooka = 0\r\nBackpack = 1\r\nBasketball = 1\r\nBeehive = 1\r\nBerrynana Peel Blue Variant = 1\r\nBerrynana Peel Brown Variant = 1\r\nBerrynana Peel Pink Variant = 1\r\nBingBong = 1\r\nBinoculars = 1\r\nBookOfBones = 0\r\nCactusBall = 1\r\nClusterberry_UNUSED = 1\r\nEarlyWorm = 1\r\nEgg = 1\r\nEggRaven = 1\r\nEggTurkey = 1\r\nFireWood = 1\r\nFrisbee = 1\r\nFrog = 1\r\nFrogLegs = 1\r\nGlizzy_CattailVariant = 1\r\nHealingPuffShroom = 1\r\nItem_Coconut_half = 1\r\nItem_Honeycomb = 1\r\nMagicBean = 1\r\nMushroom Glow = 1\r\nNapberry = 1\r\nNestEgg_Raven = 1\r\nParachute = 1\r\nScoutCookies_Vanilla = 1\r\nShell Big = 1\r\nShroomberry_Blue = 1\r\nShroomberry_Green = 1\r\nShroomberry_Purple = 1\r\nShroomberry_Red = 1\r\nShroomberry_Yellow = 1\r\nSnowball = 1\r\nStone = 1\r\nStrange Gem = 1\r\nTorch = 1\r\nWarpFungus = 1\r\nWarpsketball = 1\r\n[Trees]\r\nMultiplier = 1\r\n[Bushes]\r\nMultiplier = 1\r\n[Mushroom Clusters]\r\nMultiplier = 1\r\n[Vines]\r\nCactusBall = 0\r\nFrog = 0\r\n[Vines Jungle]\r\nMultiplier = 2\r\nSpots = 0.75\r\nMandrake_Hidden = 0\r\n[Vines Spiky]\r\nMultiplier = 2\r\nSpots = 3\r\n[Luggage]\r\nMultiplier = 3\r\n[Luggage Small]\r\nMultiplier = 4\r\n[Luggage Ancient]\r\nDefault = 0\r\nAnti-Rope Spool = 3\r\nAntiZooka = 1\r\nBalloonBunch = 3\r\nBookOfBones = 1\r\nBugle_Magic = 3\r\nBugle_Scoutmaster Variant = 3\r\nCure-All = 3\r\nCursed Skull = 3\r\nEggTurkey = 1\r\nLantern_Faerie = 3\r\nPandorasBox = 3\r\nRitualDagger = 3\r\nRopeShooterAnti = 3\r\nScoutEffigy = 3\r\n[Luggage Clown]\r\nMultiplier = 2.5\r\n[Flare Box]\r\nDefault = 0\r\nAirplane Food = 1\r\nAloeVera = 1\r\nAmulet_Clone = 1\r\nAmulet_Healing = 1\r\nAmulet_InfiniteStamina = 1\r\nEggTurkey = 1\r\nHealingDart Variant = 1\r\nRitualDagger = 1\r\n[Shore Conch]\r\nMultiplier = 1\r\n[Shore Plane Crash]\r\nDefault = 1\r\nAntiZooka = 0\r\nDynamite = 0\r\nGuidebookPage = 0\r\nGuidebookPage_0_Intro = 0\r\nGuidebookPage_10_Sleepy = 0\r\nGuidebookPage_11_Awake = 0\r\nGuidebookPage_1_Mushrooms = 0\r\nGuidebookPage_2_Campfire = 0\r\nGuidebookPage_3_Revival = 0\r\nGuidebookPage_4_Poison = 0\r\nGuidebookPage_5_Zombies = 0\r\nGuidebookPage_6_BodyHeat = 0\r\nGuidebookPage_7_BurningSun = 0\r\nGuidebookPage_8_Magma = 0\r\nGuidebookPage_9_Gloom = 0\r\nPirate Compass = 0\r\n[Shore Plane Crash Backpack]\r\nDefault = 0\r\nAirplane Food = 1\r\nBalloonBunch = 1\r\n[Shore Plane Crash Bing Bong]\r\nDefault = 0\r\nAirplane Food = 1\r\nWarpsketball = 1\r\n[Guidebook-Pages]\r\nDefault = 0\r\nAirplane Food = 1\r\nAmulet_Clone = 1\r\nEggTurkey = 1\r\n[Mesa Cactus]\r\nMultiplier = 2\r\n[Gloom Nest]\r\nMultiplier = 1\r\nSpots = 0.5\r\n[Campfire Food]\r\nDefault = 1\r\nAmulet_Clone = 0\r\nAmulet_Healing = 0\r\nAmulet_InfiniteStamina = 0\r\nAmulet_SuperJump = 0\r\nAncientIdol = 0\r\nAntiZooka = 0\r\nDynamite = 0\r\nGuidebookPage = 0\r\nGuidebookPage_0_Intro = 0\r\nGuidebookPage_10_Sleepy = 0\r\nGuidebookPage_11_Awake = 0\r\nGuidebookPage_1_Mushrooms = 0\r\nGuidebookPage_2_Campfire = 0\r\nGuidebookPage_3_Revival = 0\r\nGuidebookPage_4_Poison = 0\r\nGuidebookPage_5_Zombies = 0\r\nGuidebookPage_6_BodyHeat = 0\r\nGuidebookPage_7_BurningSun = 0\r\nGuidebookPage_8_Magma = 0\r\nGuidebookPage_9_Gloom = 0\r\nPirate Compass = 0\r\n[Campfire Backpack]\r\nDefault = 0\r\nAirplane Food = 1\r\nBalloonBunch = 1\r\n[Campfire Statue]\r\nMultiplier = 3\r\n[NestCaldera]\r\nMultiplier = 3\r\nSpots = 1\r\n"; internal static string[] Lines() { return Text.Split('\n'); } } [BepInPlugin("kikislootpool.peak.klp", "Kikis Lootpool Randomizer", "3.3.7")] public class Plugin : BaseUnityPlugin { public const string GUID = "kikislootpool.peak.klp"; public const string VERSION = "3.3.7"; internal static ManualLogSource Log; internal static Plugin Instance; internal static ConfigEntry<bool> Enabled; internal static ConfigEntry<bool> RandomizePools; internal static ConfigEntry<bool> RandomizeVines; internal static ConfigEntry<bool> Observe; internal static ConfigEntry<KeyCode> ToggleKey; internal static ConfigEntry<int> Theme; internal static ConfigEntry<bool> ShowIcons; internal static ConfigEntry<float> CountMul; internal static ConfigEntry<bool> Giga; internal static ConfigEntry<bool> SuperBean; internal static ConfigEntry<int> SuperBeanCount; internal static ConfigEntry<float> BeanForce; internal const float BEAN_FORCE_DEFAULT = 1300f; internal const float BEAN_FORCE_MAX = 3000f; internal static string _beanForceText; internal static ConfigEntry<bool> Cleanup; internal static ConfigEntry<float> CleanupKeepRadius; internal static ConfigEntry<float> CleanupDepth; internal static ConfigEntry<int> CleanupPerFrame; internal static ConfigEntry<string> LastPreset; private Harmony _harmony; private bool _show; private Rect _win = new Rect(70f, 60f, 1170f, 900f); private const float PAD = 8f; private const float LH = 22f; private const float TH = 26f; private Vector2 _scroll; private string _filter = ""; private string _status = ""; private string _cat = "Global"; private bool _stylesReady; private GUIStyle _sWin; private GUIStyle _sTitle; private GUIStyle _sLabel; private GUIStyle _sName; private GUIStyle _sNum; private GUIStyle _sBtn; private GUIStyle _sHead; private GUIStyle _sField; private GUIStyle _sRow; private GUIStyle _sRowAlt; private GUIStyle _sRowLoaded; private GUIStyle _sFieldDark; private static Color BgWindow = new Color(0.847f, 0.82f, 0.722f, 1f); private static Color BgTitle = new Color(0.36f, 0.53f, 0.37f, 1f); private static Color TxtTitle = new Color(0.94f, 0.93f, 0.85f, 1f); private static Color BgRow = new Color(0.9f, 0.88f, 0.79f, 1f); private static Color BgRowAlt = new Color(0.86f, 0.84f, 0.76f, 1f); private static Color TxtLabel = new Color(0.16f, 0.17f, 0.13f, 1f); private static Color TxtHeader = new Color(0.22f, 0.42f, 0.26f, 1f); private static Color TxtButton = new Color(0.97f, 0.97f, 0.95f, 1f); private static Color TxtDead = new Color(0.45f, 0.45f, 0.45f, 1f); private static Color ColOn = new Color(0.3f, 0.5f, 0.33f, 1f); private static Color ColOff = new Color(0.55f, 0.52f, 0.45f, 1f); private static Color ColClose = new Color(0.47f, 0.44f, 0.39f, 1f); private static Color BgFieldHi = new Color(0.28f, 0.29f, 0.26f, 1f); private static Color TxtFieldHi = new Color(0.97f, 0.97f, 0.94f, 1f); private static readonly Color ColZero = new Color(0.7f, 0.34f, 0.3f, 1f); private static readonly Color ColOrange = new Color(0.72f, 0.45f, 0.16f, 1f); internal static readonly string[] ThemeNames = new string[24] { "Classic", "Pink", "Black", "Ocean", "Forest", "Mocha", "Midnight", "Slate", "Plum", "Nord", "Crimson", "Sand", "Lavender", "Rose", "Teal", "Steel", "Olive", "Wine", "Denim", "Bronze", "Stone", "Fog", "Clay", "Moss" }; internal static int ThemeIndex; private const string FONT_NAME = "Trebuchet MS"; private float _nameColW; private int _nameColFor = -1; private const float SEARCH_ROW_END = 282f; internal static readonly Dictionary<string, Texture2D> _icons = new Dictionary<string, Texture2D>(StringComparer.Ordinal); private static readonly Dictionary<string, Texture2D> CustomIcons = new Dictionary<string, Texture2D>(StringComparer.Ordinal); internal static readonly Dictionary<string, Color> _iconTint = new Dictionary<string, Color>(StringComparer.Ordinal); internal static readonly Dictionary<string, bool> _poison = new Dictionary<string, bool>(StringComparer.Ordinal); private static readonly HashSet<string> _poisonMark = new HashSet<string>(StringComparer.Ordinal) { "Mushroom Cluster Poison" }; private GUIStyle _sDead; private int _wSum; private static readonly int[] QuickSteps = new int[6] { 0, 1, 5, 10, 15, -1 }; private const float QUICK_STEP = 30f; private const float QUICK_X = 103f; private bool _presetOpen; private bool _optionsOpen; private const float OPTBW = 220f; private string _presetName = ""; private Vector2 _presetScroll; private bool _needPresetName; internal static float Mul { get { try { return Mathf.Clamp(CountMul.Value, 1f, 10f); } catch { return 1f; } } } internal static bool Active { get { try { return Enabled.Value && PhotonNetwork.IsMasterClient; } catch { return false; } } } private static Color C(float r, float g, float b) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) return new Color(r, g, b, 1f); } private static void SetTheme(Color win, Color tit, Color titTxt, Color row, Color rowAlt, Color txt, Color head, Color btnTxt, Color dead, Color on, Color off, Color close) { //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_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) BgWindow = win; BgTitle = tit; TxtTitle = titTxt; BgRow = row; BgRowAlt = rowAlt; TxtLabel = txt; TxtHeader = head; TxtButton = btnTxt; TxtDead = dead; ColOn = on; ColOff = off; ColClose = close; if (0.299f * win.r + 0.587f * win.g + 0.114f * win.b > 0.5f) { BgFieldHi = C(win.r * 0.34f + 0.16f, win.g * 0.34f + 0.16f, win.b * 0.34f + 0.15f); TxtFieldHi = C(0.97f, 0.97f, 0.95f); } else { BgFieldHi = C(Mathf.Min(1f, win.r + 0.22f), Mathf.Min(1f, win.g + 0.22f), Mathf.Min(1f, win.b + 0.22f)); TxtFieldHi = C(0.97f, 0.97f, 0.96f); } } internal static void ApplyTheme(int t) { //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031c: 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_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_043a: 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_0468: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: 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_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0668: Unknown result type (might be due to invalid IL or missing references) //IL_067c: 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_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07ea: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08f4: Unknown result type (might be due to invalid IL or missing references) //IL_0908: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Unknown result type (might be due to invalid IL or missing references) //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0972: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09d6: Unknown result type (might be due to invalid IL or missing references) //IL_09ea: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a12: Unknown result type (might be due to invalid IL or missing references) //IL_0a2c: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Unknown result type (might be due to invalid IL or missing references) //IL_0a68: Unknown result type (might be due to invalid IL or missing references) //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0acc: Unknown result type (might be due to invalid IL or missing references) //IL_0ae0: Unknown result type (might be due to invalid IL or missing references) //IL_0af4: Unknown result type (might be due to invalid IL or missing references) //IL_0b08: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b4a: Unknown result type (might be due to invalid IL or missing references) //IL_0b5e: Unknown result type (might be due to invalid IL or missing references) //IL_0b72: Unknown result type (might be due to invalid IL or missing references) //IL_0b86: Unknown result type (might be due to invalid IL or missing references) //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bc2: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0bea: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c18: Unknown result type (might be due to invalid IL or missing references) //IL_0c2c: Unknown result type (might be due to invalid IL or missing references) //IL_0c40: Unknown result type (might be due to invalid IL or missing references) //IL_0c54: Unknown result type (might be due to invalid IL or missing references) //IL_0c68: Unknown result type (might be due to invalid IL or missing references) //IL_0c7c: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Unknown result type (might be due to invalid IL or missing references) //IL_0cb8: Unknown result type (might be due to invalid IL or missing references) //IL_0ccc: Unknown result type (might be due to invalid IL or missing references) //IL_0ce0: Unknown result type (might be due to invalid IL or missing references) //IL_0cf4: Unknown result type (might be due to invalid IL or missing references) //IL_0d0e: Unknown result type (might be due to invalid IL or missing references) //IL_0d22: Unknown result type (might be due to invalid IL or missing references) //IL_0d36: Unknown result type (might be due to invalid IL or missing references) //IL_0d4a: Unknown result type (might be due to invalid IL or missing references) //IL_0d5e: Unknown result type (might be due to invalid IL or missing references) //IL_0d72: Unknown result type (might be due to invalid IL or missing references) //IL_0d86: Unknown result type (might be due to invalid IL or missing references) //IL_0d9a: Unknown result type (might be due to invalid IL or missing references) //IL_0dae: Unknown result type (might be due to invalid IL or missing references) //IL_0dc2: Unknown result type (might be due to invalid IL or missing references) //IL_0dd6: Unknown result type (might be due to invalid IL or missing references) //IL_0dea: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Unknown result type (might be due to invalid IL or missing references) //IL_0e18: Unknown result type (might be due to invalid IL or missing references) //IL_0e2c: Unknown result type (might be due to invalid IL or missing references) //IL_0e40: Unknown result type (might be due to invalid IL or missing references) //IL_0e54: Unknown result type (might be due to invalid IL or missing references) //IL_0e68: Unknown result type (might be due to invalid IL or missing references) //IL_0e7c: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0ea4: Unknown result type (might be due to invalid IL or missing references) //IL_0eb8: Unknown result type (might be due to invalid IL or missing references) //IL_0ecc: Unknown result type (might be due to invalid IL or missing references) //IL_0ee0: Unknown result type (might be due to invalid IL or missing references) //IL_0efa: Unknown result type (might be due to invalid IL or missing references) //IL_0f0e: Unknown result type (might be due to invalid IL or missing references) //IL_0f22: Unknown result type (might be due to invalid IL or missing references) //IL_0f36: Unknown result type (might be due to invalid IL or missing references) //IL_0f4a: Unknown result type (might be due to invalid IL or missing references) //IL_0f5e: Unknown result type (might be due to invalid IL or missing references) //IL_0f72: Unknown result type (might be due to invalid IL or missing references) //IL_0f86: Unknown result type (might be due to invalid IL or missing references) //IL_0f9a: Unknown result type (might be due to invalid IL or missing references) //IL_0fae: Unknown result type (might be due to invalid IL or missing references) //IL_0fc2: Unknown result type (might be due to invalid IL or missing references) //IL_0fd6: Unknown result type (might be due to invalid IL or missing references) //IL_0ff0: Unknown result type (might be due to invalid IL or missing references) //IL_1004: Unknown result type (might be due to invalid IL or missing references) //IL_1018: Unknown result type (might be due to invalid IL or missing references) //IL_102c: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_1054: Unknown result type (might be due to invalid IL or missing references) //IL_1068: Unknown result type (might be due to invalid IL or missing references) //IL_107c: Unknown result type (might be due to invalid IL or missing references) //IL_1090: Unknown result type (might be due to invalid IL or missing references) //IL_10a4: Unknown result type (might be due to invalid IL or missing references) //IL_10b8: Unknown result type (might be due to invalid IL or missing references) //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10e6: Unknown result type (might be due to invalid IL or missing references) //IL_10fa: Unknown result type (might be due to invalid IL or missing references) //IL_110e: Unknown result type (might be due to invalid IL or missing references) //IL_1122: Unknown result type (might be due to invalid IL or missing references) //IL_1136: Unknown result type (might be due to invalid IL or missing references) //IL_114a: Unknown result type (might be due to invalid IL or missing references) //IL_115e: Unknown result type (might be due to invalid IL or missing references) //IL_1172: Unknown result type (might be due to invalid IL or missing references) //IL_1186: Unknown result type (might be due to invalid IL or missing references) //IL_119a: Unknown result type (might be due to invalid IL or missing references) //IL_11ae: Unknown result type (might be due to invalid IL or missing references) //IL_11c2: Unknown result type (might be due to invalid IL or missing references) //IL_11dc: Unknown result type (might be due to invalid IL or missing references) //IL_11f0: Unknown result type (might be due to invalid IL or missing references) //IL_1204: Unknown result type (might be due to invalid IL or missing references) //IL_1218: Unknown result type (might be due to invalid IL or missing references) //IL_122c: Unknown result type (might be due to invalid IL or missing references) //IL_1240: Unknown result type (might be due to invalid IL or missing references) //IL_1254: Unknown result type (might be due to invalid IL or missing references) //IL_1268: Unknown result type (might be due to invalid IL or missing references) //IL_127c: Unknown result type (might be due to invalid IL or missing references) //IL_1290: Unknown result type (might be due to invalid IL or missing references) //IL_12a4: Unknown result type (might be due to invalid IL or missing references) //IL_12b8: Unknown result type (might be due to invalid IL or missing references) //IL_12d2: Unknown result type (might be due to invalid IL or missing references) //IL_12e6: Unknown result type (might be due to invalid IL or missing references) //IL_12fa: Unknown result type (might be due to invalid IL or missing references) //IL_130e: Unknown result type (might be due to invalid IL or missing references) //IL_1322: Unknown result type (might be due to invalid IL or missing references) //IL_1336: Unknown result type (might be due to invalid IL or missing references) //IL_134a: Unknown result type (might be due to invalid IL or missing references) //IL_135e: Unknown result type (might be due to invalid IL or missing references) //IL_1372: Unknown result type (might be due to invalid IL or missing references) //IL_1386: Unknown result type (might be due to invalid IL or missing references) //IL_139a: Unknown result type (might be due to invalid IL or missing references) //IL_13ae: Unknown result type (might be due to invalid IL or missing references) //IL_13c8: Unknown result type (might be due to invalid IL or missing references) //IL_13dc: Unknown result type (might be due to invalid IL or missing references) //IL_13f0: Unknown result type (might be due to invalid IL or missing references) //IL_1404: Unknown result type (might be due to invalid IL or missing references) //IL_1418: Unknown result type (might be due to invalid IL or missing references) //IL_142c: Unknown result type (might be due to invalid IL or missing references) //IL_1440: Unknown result type (might be due to invalid IL or missing references) //IL_1454: Unknown result type (might be due to invalid IL or missing references) //IL_1468: Unknown result type (might be due to invalid IL or missing references) //IL_147c: Unknown result type (might be due to invalid IL or missing references) //IL_1490: Unknown result type (might be due to invalid IL or missing references) //IL_14a4: Unknown result type (might be due to invalid IL or missing references) //IL_14be: Unknown result type (might be due to invalid IL or missing references) //IL_14d2: Unknown result type (might be due to invalid IL or missing references) //IL_14e6: Unknown result type (might be due to invalid IL or missing references) //IL_14fa: Unknown result type (might be due to invalid IL or missing references) //IL_150e: Unknown result type (might be due to invalid IL or missing references) //IL_1522: Unknown result type (might be due to invalid IL or missing references) //IL_1536: Unknown result type (might be due to invalid IL or missing references) //IL_154a: Unknown result type (might be due to invalid IL or missing references) //IL_155e: Unknown result type (might be due to invalid IL or missing references) //IL_1572: Unknown result type (might be due to invalid IL or missing references) //IL_1586: Unknown result type (might be due to invalid IL or missing references) //IL_159a: Unknown result type (might be due to invalid IL or missing references) //IL_15b4: Unknown result type (might be due to invalid IL or missing references) //IL_15c8: Unknown result type (might be due to invalid IL or missing references) //IL_15dc: Unknown result type (might be due to invalid IL or missing references) //IL_15f0: Unknown result type (might be due to invalid IL or missing references) //IL_1604: Unknown result type (might be due to invalid IL or missing references) //IL_1618: Unknown result type (might be due to invalid IL or missing references) //IL_162c: Unknown result type (might be due to invalid IL or missing references) //IL_1640: Unknown result type (might be due to invalid IL or missing references) //IL_1654: Unknown result type (might be due to invalid IL or missing references) //IL_1668: Unknown result type (might be due to invalid IL or missing references) //IL_167c: Unknown result type (might be due to invalid IL or missing references) //IL_1690: Unknown result type (might be due to invalid IL or missing references) //IL_16aa: Unknown result type (might be due to invalid IL or missing references) //IL_16be: Unknown result type (might be due to invalid IL or missing references) //IL_16d2: Unknown result type (might be due to invalid IL or missing references) //IL_16e6: Unknown result type (might be due to invalid IL or missing references) //IL_16fa: Unknown result type (might be due to invalid IL or missing references) //IL_170e: Unknown result type (might be due to invalid IL or missing references) //IL_1722: Unknown result type (might be due to invalid IL or missing references) //IL_1736: Unknown result type (might be due to invalid IL or missing references) //IL_174a: Unknown result type (might be due to invalid IL or missing references) //IL_175e: Unknown result type (might be due to invalid IL or missing references) //IL_1772: Unknown result type (might be due to invalid IL or missing references) //IL_1786: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) ThemeIndex = ((t >= 0 && t < ThemeNames.Length) ? t : 0); switch (ThemeIndex) { default: SetTheme(C(0.847f, 0.82f, 0.722f), C(0.36f, 0.53f, 0.37f), C(0.94f, 0.93f, 0.85f), C(0.9f, 0.88f, 0.79f), C(0.86f, 0.84f, 0.76f), C(0.16f, 0.17f, 0.13f), C(0.22f, 0.42f, 0.26f), C(0.97f, 0.97f, 0.95f), C(0.45f, 0.45f, 0.45f), C(0.3f, 0.5f, 0.33f), C(0.55f, 0.52f, 0.45f), C(0.47f, 0.44f, 0.39f)); break; case 1: SetTheme(C(0.914f, 0.898f, 0.882f), C(0.741f, 0.482f, 0.573f), C(0.996f, 0.98f, 0.976f), C(0.945f, 0.933f, 0.925f), C(0.878f, 0.859f, 0.847f), C(0.216f, 0.184f, 0.196f), C(0.573f, 0.314f, 0.42f), C(0.996f, 0.984f, 0.98f), C(0.478f, 0.443f, 0.451f), C(0.729f, 0.463f, 0.557f), C(0.792f, 0.765f, 0.761f), C(0.612f, 0.573f, 0.573f)); break; case 2: SetTheme(C(0.106f, 0.114f, 0.129f), C(0.114f, 0.243f, 0.443f), C(0.902f, 0.941f, 1f), C(0.161f, 0.173f, 0.196f), C(0.196f, 0.212f, 0.243f), C(0.878f, 0.898f, 0.925f), C(0.451f, 0.686f, 0.949f), C(0.965f, 0.973f, 1f), C(0.573f, 0.612f, 0.663f), C(0.161f, 0.396f, 0.647f), C(0.243f, 0.267f, 0.31f), C(0.322f, 0.353f, 0.404f)); break; case 3: SetTheme(C(0.882f, 0.906f, 0.925f), C(0.196f, 0.412f, 0.478f), C(0.957f, 0.976f, 0.98f), C(0.933f, 0.949f, 0.961f), C(0.843f, 0.875f, 0.902f), C(0.129f, 0.176f, 0.204f), C(0.157f, 0.376f, 0.443f), C(0.976f, 0.984f, 0.988f), C(0.427f, 0.482f, 0.51f), C(0.231f, 0.451f, 0.514f), C(0.616f, 0.667f, 0.702f), C(0.518f, 0.565f, 0.6f)); break; case 4: SetTheme(C(0.098f, 0.129f, 0.114f), C(0.169f, 0.349f, 0.259f), C(0.91f, 0.949f, 0.925f), C(0.145f, 0.184f, 0.161f), C(0.18f, 0.224f, 0.196f), C(0.855f, 0.898f, 0.871f), C(0.514f, 0.769f, 0.612f), C(0.949f, 0.976f, 0.957f), C(0.549f, 0.612f, 0.573f), C(0.208f, 0.408f, 0.31f), C(0.243f, 0.29f, 0.263f), C(0.322f, 0.376f, 0.345f)); break; case 5: SetTheme(C(0.129f, 0.11f, 0.098f), C(0.4f, 0.278f, 0.192f), C(0.965f, 0.937f, 0.902f), C(0.184f, 0.157f, 0.141f), C(0.224f, 0.192f, 0.173f), C(0.906f, 0.878f, 0.847f), C(0.831f, 0.663f, 0.443f), C(0.976f, 0.957f, 0.937f), C(0.612f, 0.573f, 0.541f), C(0.451f, 0.322f, 0.224f), C(0.29f, 0.255f, 0.235f), C(0.376f, 0.341f, 0.318f)); break; case 6: SetTheme(C(0.078f, 0.082f, 0.129f), C(0.18f, 0.196f, 0.353f), C(0.902f, 0.914f, 0.973f), C(0.114f, 0.122f, 0.18f), C(0.149f, 0.161f, 0.231f), C(0.839f, 0.855f, 0.925f), C(0.514f, 0.573f, 0.878f), C(0.941f, 0.949f, 0.988f), C(0.51f, 0.529f, 0.596f), C(0.216f, 0.243f, 0.427f), C(0.18f, 0.192f, 0.259f), C(0.259f, 0.275f, 0.353f)); break; case 7: SetTheme(C(0.133f, 0.141f, 0.149f), C(0.286f, 0.31f, 0.333f), C(0.945f, 0.949f, 0.957f), C(0.188f, 0.2f, 0.212f), C(0.239f, 0.251f, 0.263f), C(0.878f, 0.886f, 0.894f), C(0.616f, 0.667f, 0.714f), C(0.957f, 0.961f, 0.969f), C(0.541f, 0.557f, 0.573f), C(0.318f, 0.345f, 0.373f), C(0.227f, 0.239f, 0.251f), C(0.31f, 0.325f, 0.341f)); break; case 8: SetTheme(C(0.114f, 0.078f, 0.129f), C(0.353f, 0.192f, 0.396f), C(0.965f, 0.925f, 0.973f), C(0.169f, 0.118f, 0.188f), C(0.216f, 0.153f, 0.239f), C(0.902f, 0.855f, 0.914f), C(0.784f, 0.549f, 0.859f), C(0.973f, 0.949f, 0.98f), C(0.573f, 0.51f, 0.596f), C(0.376f, 0.235f, 0.416f), C(0.235f, 0.192f, 0.251f), C(0.318f, 0.263f, 0.337f)); break; case 9: SetTheme(C(0.18f, 0.204f, 0.251f), C(0.298f, 0.376f, 0.459f), C(0.925f, 0.937f, 0.957f), C(0.231f, 0.259f, 0.322f), C(0.263f, 0.298f, 0.369f), C(0.851f, 0.871f, 0.902f), C(0.533f, 0.753f, 0.816f), C(0.937f, 0.949f, 0.965f), C(0.545f, 0.573f, 0.616f), C(0.31f, 0.396f, 0.475f), C(0.243f, 0.271f, 0.333f), C(0.302f, 0.333f, 0.396f)); break; case 10: SetTheme(C(0.114f, 0.071f, 0.078f), C(0.376f, 0.149f, 0.169f), C(0.973f, 0.925f, 0.925f), C(0.169f, 0.106f, 0.114f), C(0.216f, 0.137f, 0.145f), C(0.91f, 0.855f, 0.855f), C(0.855f, 0.518f, 0.529f), C(0.98f, 0.949f, 0.949f), C(0.596f, 0.51f, 0.514f), C(0.4f, 0.18f, 0.196f), C(0.243f, 0.176f, 0.184f), C(0.322f, 0.251f, 0.259f)); break; case 11: SetTheme(C(0.925f, 0.898f, 0.851f), C(0.545f, 0.451f, 0.325f), C(0.98f, 0.965f, 0.941f), C(0.957f, 0.937f, 0.898f), C(0.878f, 0.847f, 0.792f), C(0.204f, 0.18f, 0.149f), C(0.451f, 0.365f, 0.251f), C(0.98f, 0.973f, 0.961f), C(0.51f, 0.482f, 0.443f), C(0.588f, 0.494f, 0.365f), C(0.729f, 0.694f, 0.635f), C(0.639f, 0.608f, 0.557f)); break; case 12: SetTheme(C(0.918f, 0.906f, 0.949f), C(0.427f, 0.365f, 0.573f), C(0.973f, 0.969f, 0.988f), C(0.949f, 0.941f, 0.973f), C(0.867f, 0.851f, 0.918f), C(0.18f, 0.165f, 0.22f), C(0.404f, 0.337f, 0.545f), C(0.976f, 0.973f, 0.988f), C(0.494f, 0.482f, 0.529f), C(0.478f, 0.412f, 0.627f), C(0.706f, 0.686f, 0.769f), C(0.612f, 0.588f, 0.678f)); break; case 13: SetTheme(C(0.149f, 0.114f, 0.114f), C(0.51f, 0.31f, 0.286f), C(0.976f, 0.941f, 0.929f), C(0.208f, 0.157f, 0.157f), C(0.259f, 0.196f, 0.196f), C(0.925f, 0.878f, 0.871f), C(0.878f, 0.647f, 0.588f), C(0.98f, 0.961f, 0.957f), C(0.612f, 0.541f, 0.533f), C(0.529f, 0.337f, 0.31f), C(0.278f, 0.216f, 0.212f), C(0.361f, 0.29f, 0.286f)); break; case 14: SetTheme(C(0.063f, 0.137f, 0.161f), C(0.086f, 0.376f, 0.478f), C(0.906f, 0.961f, 0.976f), C(0.09f, 0.192f, 0.224f), C(0.118f, 0.243f, 0.282f), C(0.839f, 0.918f, 0.937f), C(0.325f, 0.769f, 0.855f), C(0.937f, 0.976f, 0.988f), C(0.475f, 0.561f, 0.588f), C(0.106f, 0.4f, 0.494f), C(0.141f, 0.235f, 0.267f), C(0.216f, 0.318f, 0.353f)); break; case 15: SetTheme(C(0.271f, 0.294f, 0.325f), C(0.161f, 0.22f, 0.298f), C(0.949f, 0.961f, 0.973f), C(0.337f, 0.365f, 0.4f), C(0.392f, 0.424f, 0.463f), C(0.914f, 0.929f, 0.945f), C(0.678f, 0.784f, 0.878f), C(0.965f, 0.973f, 0.98f), C(0.663f, 0.686f, 0.714f), C(0.208f, 0.302f, 0.408f), C(0.349f, 0.376f, 0.412f), C(0.412f, 0.443f, 0.478f)); break; case 16: SetTheme(C(0.271f, 0.29f, 0.212f), C(0.204f, 0.263f, 0.129f), C(0.957f, 0.965f, 0.933f), C(0.337f, 0.361f, 0.263f), C(0.392f, 0.42f, 0.31f), C(0.918f, 0.929f, 0.886f), C(0.741f, 0.831f, 0.573f), C(0.969f, 0.973f, 0.949f), C(0.663f, 0.678f, 0.612f), C(0.271f, 0.353f, 0.176f), C(0.341f, 0.361f, 0.278f), C(0.412f, 0.431f, 0.341f)); break; case 17: SetTheme(C(0.31f, 0.235f, 0.243f), C(0.267f, 0.145f, 0.157f), C(0.973f, 0.949f, 0.949f), C(0.384f, 0.294f, 0.302f), C(0.443f, 0.345f, 0.353f), C(0.941f, 0.91f, 0.91f), C(0.902f, 0.678f, 0.686f), C(0.98f, 0.965f, 0.965f), C(0.706f, 0.663f, 0.663f), C(0.353f, 0.196f, 0.212f), C(0.376f, 0.302f, 0.31f), C(0.447f, 0.376f, 0.384f)); break; case 18: SetTheme(C(0.212f, 0.271f, 0.353f), C(0.114f, 0.243f, 0.4f), C(0.941f, 0.957f, 0.976f), C(0.267f, 0.337f, 0.427f), C(0.31f, 0.392f, 0.494f), C(0.898f, 0.922f, 0.953f), C(0.588f, 0.749f, 0.918f), C(0.957f, 0.969f, 0.984f), C(0.643f, 0.678f, 0.729f), C(0.161f, 0.31f, 0.494f), C(0.278f, 0.337f, 0.416f), C(0.341f, 0.404f, 0.486f)); break; case 19: SetTheme(C(0.322f, 0.263f, 0.176f), C(0.298f, 0.204f, 0.098f), C(0.976f, 0.957f, 0.925f), C(0.396f, 0.325f, 0.22f), C(0.455f, 0.376f, 0.259f), C(0.945f, 0.918f, 0.871f), C(0.914f, 0.769f, 0.482f), C(0.98f, 0.969f, 0.949f), C(0.706f, 0.671f, 0.612f), C(0.4f, 0.29f, 0.145f), C(0.388f, 0.337f, 0.251f), C(0.463f, 0.408f, 0.318f)); break; case 20: SetTheme(C(0.678f, 0.659f, 0.627f), C(0.373f, 0.353f, 0.31f), C(0.965f, 0.957f, 0.941f), C(0.741f, 0.722f, 0.69f), C(0.612f, 0.592f, 0.561f), C(0.149f, 0.141f, 0.125f), C(0.29f, 0.271f, 0.235f), C(0.973f, 0.969f, 0.957f), C(0.4f, 0.392f, 0.373f), C(0.427f, 0.404f, 0.361f), C(0.573f, 0.557f, 0.529f), C(0.502f, 0.486f, 0.459f)); break; case 21: SetTheme(C(0.643f, 0.667f, 0.694f), C(0.318f, 0.345f, 0.388f), C(0.949f, 0.961f, 0.973f), C(0.706f, 0.729f, 0.757f), C(0.576f, 0.6f, 0.631f), C(0.118f, 0.133f, 0.153f), C(0.239f, 0.271f, 0.318f), C(0.961f, 0.969f, 0.98f), C(0.376f, 0.396f, 0.424f), C(0.365f, 0.4f, 0.451f), C(0.541f, 0.565f, 0.596f), C(0.463f, 0.49f, 0.522f)); break; case 22: SetTheme(C(0.741f, 0.647f, 0.596f), C(0.435f, 0.29f, 0.235f), C(0.973f, 0.949f, 0.937f), C(0.8f, 0.714f, 0.667f), C(0.678f, 0.58f, 0.529f), C(0.176f, 0.129f, 0.114f), C(0.365f, 0.235f, 0.184f), C(0.98f, 0.965f, 0.957f), C(0.435f, 0.388f, 0.369f), C(0.51f, 0.353f, 0.29f), C(0.639f, 0.549f, 0.506f), C(0.561f, 0.478f, 0.439f)); break; case 23: SetTheme(C(0.651f, 0.694f, 0.612f), C(0.286f, 0.361f, 0.243f), C(0.953f, 0.965f, 0.941f), C(0.714f, 0.757f, 0.678f), C(0.584f, 0.631f, 0.545f), C(0.114f, 0.141f, 0.098f), C(0.216f, 0.29f, 0.176f), C(0.965f, 0.973f, 0.957f), C(0.376f, 0.412f, 0.353f), C(0.333f, 0.427f, 0.278f), C(0.549f, 0.588f, 0.514f), C(0.471f, 0.51f, 0.435f)); break; } } private static Texture2D MakeTex(Color c) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown Texture2D val = new Texture2D(1, 1); val.SetPixel(0, 0, c); val.Apply(); ((Object)val).hideFlags = (HideFlags)61; return val; } internal bool MenuCapturesInput() { return _show; } private static ConfigDescription Hidden(string text, AcceptableValueBase range = null) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown return new ConfigDescription(text, range, new object[1] { "Hidden" }); } private void Awake() { //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Expected O, but got Unknown //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Expected O, but got Unknown //IL_03b7: Expected O, but got Unknown //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) Instance = this; Log = ((BaseUnityPlugin)this).Logger; Enabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Enabled", true, Hidden("Master switch. Off = the mod behaves as if it were not installed.")); RandomizePools = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "RandomizePools", true, Hidden("Luggage, chests, berry bushes, nests, cacti ... everything that uses the loot pools.")); RandomizeVines = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "RandomizeVines", true, Hidden("Vines and ground mushrooms. The game spawns these through an older system, so they need their own switch.")); Observe = ((BaseUnityPlugin)this).Config.Bind<bool>("Diagnostics", "Observe", false, Hidden("Writes down what gets rolled, to KikisLootpool_observe.log. For checking afterwards.")); ToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "ToggleKey", (KeyCode)287, "Key that opens the menu."); Giga = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "GigaRandomize", false, Hidden("Every spot on a bush/tree/cluster gets its OWN item, instead of the whole spawner carrying one kind. Much wilder than the game.")); SuperBean = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "SuperBeanMode", false, Hidden("Magic Beans from LUGGAGE grow into a vine. Without this switch they just lie on the ground.")); SuperBeanCount = ((BaseUnityPlugin)this).Config.Bind<int>("General", "SuperBeanCount", 2, Hidden("How many Magic Beans each piece of luggage drops.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5))); BeanForce = ((BaseUnityPlugin)this).Config.Bind<float>("General", "BeanForce", 1300f, Hidden("How hard Magic Beans are launched out of luggage. ~ force x 0.02 = m/s.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 3000f))); Cleanup = ((BaseUnityPlugin)this).Config.Bind<bool>("Cleanup", "CleanupOnCampfire", true, Hidden("When a campfire is lit, deletes the items lying on the ground in the previous biome. Against the lag from high multipliers. Protected: held items, backpack contents, backpacks, items the run needs, everything near the fire and everything near a player.")); CleanupKeepRadius = ((BaseUnityPlugin)this).Config.Bind<float>("Cleanup", "KeepRadius", 50f, Hidden("Radius in meters around the campfire AND around every living player in which nothing is deleted.")); CleanupPerFrame = ((BaseUnityPlugin)this).Config.Bind<int>("Cleanup", "DeletesPerFrame", 10, Hidden("How many items are deleted per frame. Lower = easier on all other players, but takes longer. At 10, 240 items take about 24 frames.")); CleanupDepth = ((BaseUnityPlugin)this).Config.Bind<float>("Cleanup", "BelowFire", 50f, Hidden("How many meters BELOW the campfire the cleanup starts. In PEAK you climb upward, so everything below is the previous biome.")); Theme = ((BaseUnityPlugin)this).Config.Bind<int>("Look", "Theme", 0, Hidden("Menu color scheme (0 = Classic). Can be switched in the 'Options' tab.")); ShowIcons = ((BaseUnityPlugin)this).Config.Bind<bool>("Look", "ShowIcons", false, Hidden("true = item icons instead of names in the list. Can be switched in the 'Options' tab.")); LastPreset = ((BaseUnityPlugin)this).Config.Bind<string>("General", "LastPreset", "", Hidden("Last used preset. Loaded at start. Empty = Default.")); CountMul = ((BaseUnityPlugin)this).Config.Bind<float>("General", "SpawnChanceMultiplier", 1f, Hidden("How many spawners place anything at all. 1 = normal, 10 = almost all. Affects EVERYTHING: bushes, trees, vines, clusters, luggage, chests. Meant for testing.")); Obs.Init(); Weights.Load(); CatFile.Load(); try { _harmony = new Harmony("kikislootpool.peak.klp"); _harmony.PatchAll(); MethodInfo methodInfo = AccessTools.Method(typeof(CursorHandler), "Update", (Type[])null, (Type[])null); if (methodInfo != null) { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(MenuCursorPatch).GetMethod("Postfix")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } else { ((BaseUnityPlugin)this).Logger.LogWarning((object)"[KLP] CursorHandler.Update nicht gefunden - Menue ohne Mauszeiger."); } MethodInfo methodInfo2 = AccessTools.Method(typeof(CharacterInput), "Sample", new Type[1] { typeof(bool) }, (Type[])null); if (methodInfo2 != null) { _harmony.Patch((MethodBase)methodInfo2, new HarmonyMethod(typeof(MenuInputPatch).GetMethod("Prefix")), new HarmonyMethod(typeof(MenuInputPatch).GetMethod("Postfix")), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } else { ((BaseUnityPlugin)this).Logger.LogWarning((object)"[KLP] CharacterInput.Sample nicht gefunden - Klicks im Menue koennen im Spiel ankommen."); } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Kikis Lootpool 3.3.7 loaded. enabled=" + Enabled.Value + " pools=" + RandomizePools.Value + " vines=" + RandomizeVines.Value + " menu=" + ((object)ToggleKey.Value/*cast due to .constrained prefix*/).ToString())); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Harmony patching failed: " + ex)); } } private void Update() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) try { if (Input.GetKeyDown(ToggleKey.Value)) { _show = !_show; } } catch { } } private void InitStyles() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0131: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Expected O, but got Unknown //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Expected O, but got Unknown //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Expected O, but got Unknown //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Expected O, but got Unknown //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Expected O, but got Unknown //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Expected O, but got Unknown //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Expected O, but got Unknown //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) Texture2D background = MakeTex(Color.white); Font val = null; try { val = Font.CreateDynamicFontFromOSFont("Trebuchet MS", 14); } catch (Exception ex) { Log.LogWarning((object)("[KLP] font 'Trebuchet MS': " + ex.Message)); } _sWin = new GUIStyle(GUI.skin.window); _sWin.normal.background = MakeTex(BgWindow); _sWin.onNormal.background = _sWin.normal.background; _sWin.border = new RectOffset(8, 8, 8, 8); _sWin.padding = new RectOffset(10, 24, 8, 10); _sTitle = new GUIStyle(GUI.skin.label); _sTitle.normal.background = MakeTex(BgTitle); _sTitle.normal.textColor = TxtTitle; _sTitle.fontStyle = (FontStyle)1; _sTitle.fontSize = 15; _sTitle.alignment = (TextAnchor)4; _sLabel = new GUIStyle(GUI.skin.label); _sLabel.normal.textColor = TxtLabel; _sLabel.fontStyle = (FontStyle)1; _sLabel.alignment = (TextAnchor)3; _sLabel.clipping = (TextClipping)1; _sLabel.wordWrap = false; _sName = new GUIStyle(_sLabel); _sName.fontStyle = (FontStyle)0; _sName.padding = new RectOffset(6, 2, 0, 0); _sNum = new GUIStyle(_sLabel); _sNum.alignment = (TextAnchor)4; _sHead = new GUIStyle(_sLabel); _sHead.normal.textColor = TxtHeader; _sBtn = new GUIStyle(GUI.skin.button); _sBtn.normal.background = background; _sBtn.hover.background = background; _sBtn.active.background = background; _sBtn.focused.background = background; _sBtn.normal.textColor = TxtButton; _sBtn.hover.textColor = TxtButton; _sBtn.active.textColor = TxtButton; _sBtn.focused.textColor = TxtButton; _sBtn.fontStyle = (FontStyle)1; _sBtn.fontSize = 12; _sBtn.alignment = (TextAnchor)4; _sBtn.margin = new RectOffset(3, 3, 2, 2); _sBtn.padding = new RectOffset(4, 4, 4, 4); _sField = new GUIStyle(GUI.skin.textField); _sField.normal.background = MakeTex(BgRowAlt); _sField.focused.background = _sField.normal.background; _sField.normal.textColor = TxtLabel; _sField.focused.textColor = TxtLabel; _sField.padding = new RectOffset(5, 5, 3, 3); _sFieldDark = new GUIStyle(_sField); _sFieldDark.normal.background = MakeTex(BgFieldHi); _sFieldDark.focused.background = MakeTex(new Color(Mathf.Clamp01(BgFieldHi.r + 0.07f), Mathf.Clamp01(BgFieldHi.g + 0.07f), Mathf.Clamp01(BgFieldHi.b + 0.07f), 1f)); _sFieldDark.normal.textColor = TxtFieldHi; _sFieldDark.focused.textColor = TxtFieldHi; _sRow = new GUIStyle(GUI.skin.box); _sRow.normal.background = MakeTex(BgRow); _sRow.margin = new RectOffset(0, 0, 1, 1); _sRow.padding = new RectOffset(0, 0, 0, 0); _sRowAlt = new GUIStyle(_sRow); _sRowAlt.normal.background = MakeTex(BgRowAlt); _sRowLoaded = new GUIStyle(_sRow); _sRowLoaded.normal.background = MakeTex(Color.Lerp(BgRow, ColOn, 0.45f)); if ((Object)(object)val != (Object)null) { GUIStyle[] array = (GUIStyle[])(object)new GUIStyle[11] { _sWin, _sTitle, _sLabel, _sName, _sNum, _sHead, _sBtn, _sField, _sRow, _sRowAlt, _sRowLoaded }; for (int i = 0; i < array.Length; i++) { array[i].font = val; } } _stylesReady = true; } private bool TintBtn(Rect r, string text, Color tint) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) Color backgroundColor = GUI.backgroundColor; GUI.backgroundColor = tint; bool result = GUI.Button(r, text, _sBtn); GUI.backgroundColor = backgroundColor; return result; } private float NameColW() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (_nameColFor == Core.UiNames.Count && _nameColW > 0f) { return _nameColW; } float num = 80f; try { for (int i = 0; i < Core.UiNames.Count; i++) { float x = _sName.CalcSize(new GUIContent(RowLabel(Core.UiNames[i]))).x; if (x > num) { num = x; } } } catch { } _nameColW = Mathf.Min(num, 320f); _nameColFor = Core.UiNames.Count; return _nameColW; } private float ColX() { return Mathf.Max(NameColW() + 24f, 282f); } private static Texture2D ReadableCopy(Texture src) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown if ((Object)(object)src == (Object)null || src.width <= 0 || src.height <= 0) { return null; } RenderTexture active = RenderTexture.active; RenderTexture temporary = RenderTexture.GetTemporary(src.width, src.height, 0, (RenderTextureFormat)0, (RenderTextureReadWrite)0); try { Graphics.Blit(src, temporary); RenderTexture.active = temporary; Texture2D val = new Texture2D(src.width, src.height, (TextureFormat)4, false) { hideFlags = (HideFlags)61 }; val.ReadPixels(new Rect(0f, 0f, (float)src.width, (float)src.height), 0, 0); val.Apply(); return val; } catch { return null; } finally { RenderTexture.active = active; RenderTexture.ReleaseTemporary(temporary); } } private static Texture2D WarpBallFromBasketball(Texture src) { //IL_0122: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_020f: 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_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) Texture2D val = ReadableCopy(src); if ((Object)(object)val == (Object)null) { return null; } try { int width = ((Texture)val).width; int height = ((Texture)val).height; Color[] pixels = val.GetPixels(); float num = 1f; float num2 = 0f; int num3 = 0; for (int i = 0; i < pixels.Length; i++) { if (!(pixels[i].a < 0.5f)) { float num4 = pixels[i].r * 0.299f + pixels[i].g * 0.587f + pixels[i].b * 0.114f; if (num4 < num) { num = num4; } if (num4 > num2) { num2 = num4; } num3++; } } if (num3 < 16 || num2 - num < 0.05f) { return null; } Color val2 = default(Color); ((Color)(ref val2))..ctor(0.09f, 0.11f, 0.38f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.2f, 0.27f, 0.68f, 1f); Color[] array = (Color[])(object)new Color[3] { new Color(0.45f, 1f, 0.95f, 1f), new Color(1f, 0.55f, 0.95f, 1f), new Color(0.85f, 1f, 0.5f, 1f) }; Color[] array2 = (Color[])(object)new Color[pixels.Length]; for (int j = 0; j < height; j++) { for (int k = 0; k < width; k++) { int num5 = j * width + k; Color val4 = pixels[num5]; if (val4.a <= 0f) { array2[num5] = new Color(0f, 0f, 0f, 0f); continue; } float num6 = Mathf.Clamp01((val4.r * 0.299f + val4.g * 0.587f + val4.b * 0.114f - num) / (num2 - num)); Color val5 = Color.Lerp(val2, val3, num6); float num7 = (float)j / (float)Mathf.Max(1, height - 1) * (float)array.Length; int num8 = Mathf.Clamp((int)num7, 0, array.Length - 1); Color val6 = Color.Lerp(array[num8], array[(num8 + 1) % array.Length], num7 - (float)num8); float num9 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((0.72f - num6) / 0.45f)); Color val7 = Color.Lerp(val5, val6, num9); val7.a = val4.a; array2[num5] = val7; } } Texture2D val8 = new Texture2D(width, height, (TextureFormat)4, false) { hideFlags = (HideFlags)61, filterMode = (FilterMode)1, wrapMode = (TextureWrapMode)1 }; val8.SetPixels(array2); val8.Apply(); return val8; } catch { return null; } finally { Object.Destroy((Object)(object)val); } } private static Texture2D WarpBall() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(48, 48, (TextureFormat)4, false); ((Object)val).hideFlags = (HideFlags)61; ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; float num = 23.5f; float num2 = num - 1.5f; Color val2 = default(Color); ((Color)(ref val2))..ctor(0f, 0f, 0f, 0f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.1f, 0.13f, 0.42f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.22f, 0.3f, 0.72f, 1f); Color[] array = (Color[])(object)new Color[3] { new Color(0.45f, 1f, 0.95f, 1f), new Color(1f, 0.55f, 0.95f, 1f), new Color(0.85f, 1f, 0.5f, 1f) }; float[] array2 = new float[3] { -0.62f, 0f, 0.62f }; for (int i = 0; i < 48; i++) { for (int j = 0; j < 48; j++) { float num3 = (float)j - num; float num4 = (float)i - num; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4); if (num5 > num2) { val.SetPixel(j, i, val2); continue; } Color val5 = Color.Lerp(val3, val4, Mathf.Clamp01(0.5f + 0.5f * (num4 / num2))); val5 = Color.Lerp(val5, val3 * 0.6f, Mathf.Pow(num5 / num2, 6f)); float num6 = Mathf.Sqrt(Mathf.Max(0f, num2 * num2 - num4 * num4)); for (int k = 0; k < array2.Length; k++) { float num7 = array2[k] * num6; float num8 = Mathf.Abs(num3 - num7); if (num8 < 1.6f) { val5 = Color.Lerp(array[k], val5, num8 / 1.6f); } } val.SetPixel(j, i, val5); } } val.Apply(); return val; } private static Color IconTintOf(string name) { //IL_0015: 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) if (!_iconTint.TryGetValue(name, out var value)) { return Color.white; } return value; } internal static bool IsPoisonous(string name) { if (_poison.TryGetValue(name, out var value)) { return value; } value = false; try { Item val = default(Item); if (Core.IdOfName.TryGetValue(name, out var value2) && ItemDatabase.TryGetItem(value2, ref val) && (Object)(object)val != (Object)null) { value = (Object)(object)((Component)val).GetComponentInChildren<Action_InflictPoison>(true) != (Object)null; } } catch { value = false; } _poison[name] = value; return value; } internal static string RowLabel(string name) { return Weights.Display(name); } internal static string PoisonTag(string name) { if (!_poisonMark.Contains(name) || !IsPoisonous(name)) { return ""; } return "(Poison)"; } internal static Texture2D IconOf(string name) { if (_icons.TryGetValue(name, out var value)) { return value; } value = null; try { if (string.Equals(name, "Warpsketball", StringComparison.Ordinal)) { if (!CustomIcons.TryGetValue(name, out var value2) || (Object)(object)value2 == (Object)null) { Texture val = null; try { Item val2 = default(Item); if (Core.IdOfName.TryGetValue(name, out var value3) && ItemDatabase.TryGetItem(value3, ref val2) && (Object)(object)val2 != (Object)null && val2.UIData != null) { try { val = (Texture)(object)val2.UIData.GetIcon(); } catch { val = null; } if ((Object)(object)val == (Object)null) { val = (Texture)(object)val2.UIData.icon; } } } catch { val = null; } value2 = WarpBallFromBasketball(val); if ((Object)(object)value2 == (Object)null) { value2 = WarpBall(); } CustomIcons[name] = value2; } _icons[name] = value2; return value2; } Item val3 = default(Item); if (Core.IdOfName.TryGetValue(name, out var value4) && ItemDatabase.TryGetItem(value4, ref val3) && (Object)(object)val3 != (Object)null && val3.UIData != null) { try { value = val3.UIData.GetIcon(); } catch { value = null; } if ((Object)(object)value == (Object)null) { value = val3.UIData.icon; } } } catch { value = null; } _icons[name] = value; return value; } private void StrikeIfVanilla(Rect btn, string label, string cat) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) try { if (cat != null && Cats.StateOf(cat) == Cats.VanState.Off) { float num = Mathf.Min(_sBtn.CalcSize(new GUIContent(label)).x, ((Rect)(ref btn)).width - 6f); if (!(num <= 1f)) { Color color = GUI.color; GUI.color = TxtButton; GUI.DrawTexture(new Rect(((Rect)(ref btn)).x + (((Rect)(ref btn)).width - num) * 0.5f, ((Rect)(ref btn)).y + ((Rect)(ref btn)).height * 0.5f - 1f, num, 1.5f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; } } } catch { } } private void OnGUI() { //IL_0050: 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_0071: Expected O, but got Unknown //IL_006c: 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) try { if (_show) { if (Theme != null && Theme.Value != ThemeIndex) { ApplyTheme(Theme.Value); _stylesReady = false; } if (!_stylesReady) { InitStyles(); } _win = GUI.Window(4934736, _win, new WindowFunction(DrawWindow), GUIContent.none, _sWin); } } catch (Exception ex) { Log.LogError((object)("[KLP] OnGUI: " + ex)); } } private void DrawWindow(int id) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //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_0260: 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_0652: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_0703: 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_0676: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0712: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a33: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07a4: 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_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0c96: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_0cce: Unknown result type (might be due to invalid IL or missing references) //IL_0860: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_07c5: Unknown result type (might be due to invalid IL or missing references) //IL_0d2f: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d06: Unknown result type (might be due to invalid IL or missing references) //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_0d98: Unknown result type (might be due to invalid IL or missing references) //IL_0af2: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0ba0: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: 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_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Unknown result type (might be due to invalid IL or missing references) //IL_0f07: Unknown result type (might be due to invalid IL or missing references) //IL_0f2d: Unknown result type (might be due to invalid IL or missing references) //IL_0f56: Unknown result type (might be due to invalid IL or missing references) //IL_0f60: Unknown result type (might be due to invalid IL or missing references) //IL_0faf: Unknown result type (might be due to invalid IL or missing references) //IL_106b: Unknown result type (might be due to invalid IL or missing references) //IL_106e: Unknown result type (might be due to invalid IL or missing references) //IL_1073: Unknown result type (might be due to invalid IL or missing references) //IL_1075: Unknown result type (might be due to invalid IL or missing references) //IL_107a: Unknown result type (might be due to invalid IL or missing references) //IL_0fd3: Unknown result type (might be due to invalid IL or missing references) //IL_0fcc: Unknown result type (might be due to invalid IL or missing references) //IL_0fc5: Unknown result type (might be due to invalid IL or missing references) //IL_1445: Unknown result type (might be due to invalid IL or missing references) //IL_10e9: Unknown result type (might be due to invalid IL or missing references) //IL_1261: Unknown result type (might be due to invalid IL or missing references) //IL_122a: Unknown result type (might be due to invalid IL or missing references) //IL_116f: Unknown result type (might be due to invalid IL or missing references) //IL_1176: Unknown result type (might be due to invalid IL or missing references) //IL_117b: Unknown result type (might be due to invalid IL or missing references) //IL_1192: Unknown result type (might be due to invalid IL or missing references) //IL_11b9: Unknown result type (might be due to invalid IL or missing references) //IL_1294: Unknown result type (might be due to invalid IL or missing references) //IL_129e: Unknown result type (might be due to invalid IL or missing references) //IL_11f8: Unknown result type (might be due to invalid IL or missing references) //IL_12c7: Unknown result type (might be due to invalid IL or missing references) //IL_12f3: Unknown result type (might be due to invalid IL or missing references) //IL_12fd: Unknown result type (might be due to invalid IL or missing references) //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_1352: Unknown result type (might be due to invalid IL or missing references) //IL_1376: Unknown result type (might be due to invalid IL or missing references) //IL_136f: Unknown result type (might be due to invalid IL or missing references) //IL_1368: Unknown result type (might be due to invalid IL or missing references) try { float num = ((Rect)(ref _win)).width - 16f; float num2 = 8f; float num3 = 4f; GUI.Label(new Rect(num2, num3, num, 26f), "Kikis Lootpool · 3.3.7", _sTitle); if (TintBtn(new Rect(num2 + num - 24f, num3 + 3f, 21f, 20f), "X", ColClose)) { _show = false; return; } num3 += 32f; float num4 = (num - 15f) / 4f; if (TintBtn(new Rect(num2, num3, num4, 22f), "Options" + (_optionsOpen ? " ▾" : ""), _optionsOpen ? ColOn : ColOff)) { _optionsOpen = !_optionsOpen; if (_optionsOpen) { _presetOpen = false; } } if (TintBtn(new Rect(num2 + num4 + 5f, num3, num4, 22f), "Presets" + (_presetOpen ? " ▾" : ""), _presetOpen ? ColOn : ColOff)) { _presetOpen = !_presetOpen; if (_presetOpen) { _optionsOpen = false; } } num3 += 28f; if (!Cleanup.Value) { Cleanup.Value = true; } if (_presetOpen) { DrawPresets(num2, ref num3, num); GUI.Label(new Rect(num2, ((Rect)(ref _win)).height - 26f, num, 22f), _status ?? "", _sHead); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _win)).width - 30f, 30f)); return; } if (_optionsOpen) { DrawOptions(num2, ref num3, num); GUI.Label(new Rect(num2, ((Rect)(ref _win)).height - 26f, num, 22f), _status ?? "", _sHead); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _win)).width - 30f, 30f)); return; } string[] array = new string[8] { "Global", "Luggage", "Campfire", "Trees", "Bushes", "Vines", "Mushroom Clusters", "Shore" }; string[] array2 = new string[8] { "Global", "Luggages", "Campfire", "Trees", "Bushes", "Vines", "Clusters", "Shore" }; string[] array3 = new string[8] { "Mesa", "Gloom", "Wall Object", "Beehive", "Capybara", "NestCaldera", "Guidebook-Pages", "Flare Box" }; string[] array4 = new string[8] { "Mesa", "Gloom", "Wall Object", "Beehive", "Capybara", "NestCaldera", "Guide Pages", "Flare Box" }; if (string.Equals(_cat, "Other", StringComparison.OrdinalIgnoreCase)) { _cat = "Global"; _scroll = Vector2.zero; } string[] array5 = new string[0]; int num5 = Mathf.Max(array.Length, Mathf.Max(array3.Length, array5.Length)); float num6 = (num - (float)(num5 - 1) * 3f) / (float)num5; string text = null; for (int i = 0; i < Cats.GroupNames.Length; i++) { if (string.Equals(_cat, Cats.GroupNames[i], StringComparison.OrdinalIgnoreCase)) { text = Cats.GroupNames[i]; break; } } if (text == null) { string a = Cats.Parent(_cat); for (int j = 0; j < Cats.GroupNames.Length; j++) { if (string.Equals(a, Cats.GroupNames[j], StringComparison.OrdinalIgnoreCase)) { text = Cats.GroupNames[j]; break; } } } if (text != null) { string[] array6 = Cats.KindsOf(text); if (array6 == null) { array6 = new string[0]; } int num7 = array6.Length + 2; float num8 = Mathf.Min(num6, (num - (float)(num7 - 1) * 3f) / (float)num7); string text2 = Cats.Parent(text); bool flag = text2 != null && Cats.KindsOf(text2) != null; if (TintBtn(new Rect(num2, num3, num8, 22f), flag ? ("◀ " + text2) : "◀ All tabs", ColClose)) { _cat = (flag ? text2 : "Global"); _scroll = Vector2.zero; } Rect val = default(Rect); for (int k = 0; k <= array6.Length; k++) { string text3 = ((k == 0) ? text : (text + " " + array6[k - 1])); string text4 = ((k == 0) ? Cats.GroupAllLabel(text) : array6[k - 1]); if (k > 0 && Cats.KindsOf(text3) != null) { text4 += " ▸"; } bool flag2 = string.Equals(text3, _cat, StringComparison.OrdinalIgnoreCase); ((Rect)(ref val))..ctor(num2 + (float)(k + 1) * (num8 + 3f), num3, num8, 22f); if (TintBtn(val, text4, flag2 ? ColOn : ColOff)) { _cat = text3; _scroll = Vector2.zero; } StrikeIfVanilla(val, text4, text3); } num3 += 25f; } else { Rect val2 = default(Rect); for (int l = 0; l < array.Length; l++) { string text5 = array[l]; bool flag3 = string.Equals(text5, _cat, StringComparison.OrdinalIgnoreCase); string text6 = ((Cats.KindsOf(text5) != null) ? (array2[l] + " ▸") : array2[l]); ((Rect)(ref val2))..ctor(num2 + (float)l * (num6 + 3f), num3, num6, 22f); if (TintBtn(val2, text6, flag3 ? ColOn : ColOff)) { _cat = text5; _scroll = Vector2.zero; } StrikeIfVanilla(val2, text6, text5); } num3 += 25f; Rect val3 = default(Rect); for (int m = 0; m < array3.Length; m++) { string text7 = array3[m]; bool flag4 = string.Equals(text7, _cat, StringComparison.OrdinalIgnoreCase); string text8 = ((Cats.KindsOf(text7) != null) ? (array4[m] + " ▸") : array4[m]); ((Rect)(ref val3))..ctor(num2 + (float)m * (num6 + 3f), num3, num6, 22f); if (TintBtn(val3, text8, flag4 ? ColOn : ColOff)) { _cat = text7; _scroll = Vector2.zero; } StrikeIfVanilla(val3, text8, text7); } num3 += 25f; if (array5.Length != 0) { float num9 = num6; Rect val4 = default(Rect); for (int n = 0; n < array5.Length; n++) { string text9 = array5[n]; bool flag5 = string.Equals(text9, _cat, StringComparison.OrdinalIgnoreCase); ((Rect)(ref val4))..ctor(num2 + (float)n * (num9 + 3f), num3, num9, 22f); if (TintBtn(val4, text9, flag5 ? ColOn : ColOff)) { _cat = text9; _scroll = Vector2.zero; } StrikeIfVanilla(val4, text9, text9); } num3 += 25f; } } num3 += 1f; if (!string.Equals(_cat, "Global", StringComparison.OrdinalIgnoreCase)) { bool flag6 = Cats.IsVanilla(_cat); Cats.VanState vanState = Cats.StateOf(_cat); string text10 = vanState switch { Cats.VanState.Partial => "Randomize: PARTIALLY", Cats.VanState.Off => "Randomize: OFF (vanilla)", _ => "Randomize: ON", }; Color tint = (Color)(vanState switch { Cats.VanState.Partial => ColOrange, Cats.VanState.Off => ColZero, _ => ColOn, }); if (TintBtn(new Rect(num2, num3, 200f, 22f), text10, tint)) { bool vanilla = vanState != Cats.VanState.Partial && !flag6; Cats.SetVanilla(_cat, vanilla); _status = _cat + (Cats.IsVanilla(_cat) ? ": left untouched, like the game" : ": randomized again") + " (press Apply Changes)"; } num3 += 28f; if (flag6) { GUI.Label(new Rect(num2, num3, num, 22f), "this tab is left as the game has it", _sLabel); DrawFooter(num2, ((Rect)(ref _win)).height - 62f, num); GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _win)).width - 30f, 30f)); return; } } if (!Cats.IsSingleItemTab(_cat)) { float num10 = Cats.AmountOf(_cat); GUI.Label(new Rect(num2, num3, 150f, 22f), "Multiplier x" + num10.ToString("0.#", CultureInfo.InvariantCulture), _sHead); if (TintBtn(new Rect(num2 + 152f, num3, 24f, 22f), "−", ColOff)) { Cats.SetAmount(_cat, num10 - 0.5f); _status = _cat + ": multiplier x" + Cats.AmountOf(_cat) + ((_cat == "Global") ? " (applied to every tab)" : ""); } if (TintBtn(new Rect(num2 + 180f, num3, 24f, 22f), "+", ColOn)) { Cats.SetAmount(_cat, num10 + 0.5f); _status = _cat + ": multiplier x" + Cats.AmountOf(_cat) + ((_cat == "Global") ? " (applied to every tab)" : ""); } num3 += 26f; bool flag7 = _cat == "NestCaldera" || _cat == "Gloom Nest"; if (Cats.HasSpots(_cat)) { float v = Cats.SpotsOf(_cat); GUI.Label(new Rect(num2, num3, 150f, 22f), "Spots x" + v.ToString("0.##", CultureInfo.InvariantCulture), _sHead); if (TintBtn(new Rect(num2 + 152f, num3, 24f, 22f), "−", ColOff)) { Cats.SetSpots(_cat, Cats.SpotsStep(v, -1)); _status = _cat + ": spots x" + Cats.SpotsOf(_cat).ToString("0.##", CultureInfo.InvariantCulture); } if (TintBtn(new Rect(num2 + 180f, num3, 24f, 22f), "+", ColOn)) { Cats.SetSpots(_cat, Cats.SpotsStep(v, 1)); _status = _cat + ": spots x" + Cats.SpotsOf(_cat).ToString("0.##", CultureInfo.InvariantCulture); } GUI.Label(new Rect(num2 + 210f, num3, num - 210f, 22f), flag7 ? "how often a nest actually holds an egg" : "how many trees/bushes carry anything (not luggage)", _sLabel); num3 += 28f; } } string text11 = Cats.Describe(_cat); if (!string.IsNullOrEmpty(text11)) { GUI.Label(new Rect(num2, num3, num, 22f), "> " + text11, _sLabel); num3 += 26f; } if (string.Equals(_cat, "Campfire Statue", StringComparison.OrdinalIgnoreCase)) { GUI.Label(new Rect(num2, num3, num, 22f), "Only gives items when nobody is dead - otherwise it revives.", _sLabel); num3 += 26f; } if (string.Equals(_cat, "Mesa Idol", StringComparison.OrdinalIgnoreCase)) { GUI.Label(new Rect(num2, num3, num, 22f), "A replacement lacks the GoldenIdol tag - no kiln sacrifice.", _sLabel); num3 += 26f; } if (string.Equals(_cat, "Flare Box", StringComparison.OrdinalIgnoreCase)) { GUI.Label(new Rect(num2, num3, num, 22f), "No flare, no way to end the run.", _sLabel); num3 += 26f; } GUI.Label(new Rect(num2, num3, 44f, 22f), "Search", _sLabel); _filter = GUI.TextField(new Rect(num2 + 46f, num3, 200f, 22f), _filter ?? "", _sField); if (TintBtn(new Rect(num2 + 250f, num3, 24f, 22f), "x", ColOff)) { _filter = ""; } List<string> list = new List<string>(); string text12 = (_filter ?? "").Trim(); bool flag8 = text12.Length > 0; for (int num11 = 0; num11 < text12.Length; num11++) { if (text12[num11] < '0' || text12[num11] > '9') { flag8 = false; break; } } int result = 0; if (flag8) { flag8 = int.TryParse(text12, out result); } for (int num12 = 0; num12 < Core.UiNames.Count; num12++) { string text13 = Core.UiNames[num12]; if (text12.Length == 0 || ((!flag8) ? (text13.IndexOf(text12, StringComparison.OrdinalIgnoreCase) >= 0 || RowLabel(text13).IndexOf(text12, StringComparison.OrdinalIgnoreCase) >= 0) : (Cats.Of(_cat, text13) == result))) { list.Add(text13); } } _wSum = 0; for (int num13 = 0; num13 < Core.UiNames.Count; num13++) { _wSum += Cats.Of(_cat, Core.UiNames[num13]); } float num14 = num2 + ColX(); if (TintBtn(new Rect(num14, num3, 22f, 22f), "−", ColOff)) { StepAll(-1); } GUI.Label(new Rect(num14 + 24f, num3, 38f, 22f), "ALL", _sNum); if (TintBtn(new Rect(num14 + 64f, num3, 22f, 22f), "+", ColOn)) { StepAll(1); } for (int num15 = 0; num15 < QuickSteps.Length; num15++) { int num16 = ((QuickSteps[num15] < 0) ? 20 : QuickSteps[num15]); if (TintBtn(new Rect(num14 + 103f + (float)num15 * 30f, num3, 28f, 22f), num16.ToString(), (num16 == 0) ? ColZero : ((num16 >= 20) ? ColOn : ColOff))) { DoAll(num16); } } num3 += 39f; float num17 = (ShowIcons.Value ? 35f : 22f); float num18 = ((Rect)(ref _win)).height - num3 - 68f; Rect val5 = default(Rect); ((Rect)(ref val5))..ctor(num2, num3, num, num18); Rect val6 = default(Rect); ((Rect)(ref val6))..ctor(0f, 0f, ((Rect)(ref val5)).width - 18f, (float)list.Count * num17 + 2f); _scroll = GUI.BeginScrollView(val5, _scroll, val6); for (int num19 = 0; num19 < list.Count; num19++) { float num20 = (float)num19 * num17; if (num20 + num17 < _scroll.y || num20 > _scroll.y + num18) { continue; } string text14 = list[num19]; int num21 = Cats.Of(_cat, text14); GUI.Box(new Rect(0f, num20, ((Rect)(ref val6)).width, num17 - 1f), GUIContent.none, ((num19 & 1) == 0) ? _sRow : _sRowAlt); float num22 = num20 + (num17 - 19f) * 0.5f; float num23 = ((_wSum > 0) ? (100f * (float)num21 / (float)_wSum) : 0f); float num24 = ColX(); if (ShowIcons.Value) { Texture2D val7 = IconOf(text14); if ((Object)(object)val7 != (Object)null) { Color color = GUI.color; Color color2 = IconTintOf(text14); if (num21 <= 0) { color2.a *= 0.35f; } GUI.color = color2; GUI.DrawTexture(new Rect(6f, num20 + (num17 - 29f) * 0.5f, 29f, 29f), (Texture)(object)val7, (ScaleMode)2); GUI.color = color; string text15 = PoisonTag(text14); if (text15.Length > 0) { GUI.Label(new Rect(39f, num20, num24 - 29f - 14f, num17), text15, (num21 > 0) ? _sName : DeadName()); } } else { GUI.Label(new Rect(0f, num20, num24 - 4f, num17), RowLabel(text14), (num21 > 0) ? _sName : DeadName()); } } else { GUI.Label(new Rect(0f, num20, num24 - 4f, num17), RowLabel(text14), (num21 > 0) ? _sName : DeadName()); } if (TintBtn(new Rect(num24, num22, 22f, 19f), "−", ColOff)) { SetWeight(text14, num21 - 1); } GUI.Label(new Rect(num24 + 24f, num20, 38f, num17), num21.ToString(), _sNum); if (TintBtn(new Rect(num24 + 64f, num22, 22f, 19f), "+", ColOn)) { SetWeight(text14, num21 + 1); } for (int num25 = 0; num25 < QuickSteps.Length; num25++) { int num26 = ((QuickSteps[num25] < 0) ? 20 : QuickSteps[num25]); if (TintBtn(new Rect(num24 + 103f + (float)num25 * 30f, num22, 28f, 19f), num26.ToString(), (num26 == 0) ? ColZero : ((num26 >= 20) ? ColOn : ColOff))) { SetWeight(text14, num26); } } GUI.Label(new Rect(num24 + 103f + (float)QuickSteps.Length * 30f + 8f, num20, 68f, num17), (num21 <= 0) ? "-" : (num23.ToString("0.0") + "%"), _s