The BepInEx console will not appear when launching like it does for other games on Thunderstore (you can turn it back on in your BepInEx.cfg file). If your PEAK crashes on startup, add -dx12 to your launch parameters.
Decompiled source of OneQuickPeak v0.9.0
plugins/com.github.Kirshoo.OneQuickPeak.dll
Decompiled a day agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using OneQuickPeak.Config; using OneQuickPeak.Patches; using Photon.Pun; using UnityEngine; using UnityEngine.SceneManagement; using Zorro.Core; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.github.Kirshoo.OneQuickPeak")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.9.0.0")] [assembly: AssemblyInformationalVersion("0.9.0")] [assembly: AssemblyProduct("com.github.Kirshoo.OneQuickPeak")] [assembly: AssemblyTitle("OneQuickPeak")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.9.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace OneQuickPeak { [BepInPlugin("com.github.Kirshoo.OneQuickPeak", "OneQuickPeak", "0.9.0")] public class Plugin : BaseUnityPlugin { private Harmony _harmony; public const string Id = "com.github.Kirshoo.OneQuickPeak"; internal static ManualLogSource Log { get; private set; } public static string Name => "OneQuickPeak"; public static string Version => "0.9.0"; private void Awake() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; BindConfig(); _harmony = new Harmony("com.github.Kirshoo.OneQuickPeak"); _harmony.PatchAll(typeof(CampfirePatch)); _harmony.PatchAll(typeof(EndScreenPatch)); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } private void BindConfig() { Configuration.BindConfig(((BaseUnityPlugin)this).Config); } private void Start() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown GameObject val = new GameObject("QuickPeakManager"); val.AddComponent<QuickPeakManager>(); Object.DontDestroyOnLoad((Object)(object)val); } } internal class QuickPeakManager : MonoBehaviour { [CompilerGenerated] private sealed class <WaitUntilAllActive>d__14 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public List<string> GO_names; public float timeout; private float <elapsed>5__2; private List<GameObject> <objects>5__3; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitUntilAllActive>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <objects>5__3 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <elapsed>5__2 = 0f; <objects>5__3 = ((IEnumerable<string>)GO_names).Select((Func<string, GameObject>)GameObject.Find).ToList(); break; case 1: <>1__state = -1; <elapsed>5__2 += Time.deltaTime; break; } if (<elapsed>5__2 < timeout) { for (int i = 0; i < <objects>5__3.Count; i++) { if ((Object)(object)<objects>5__3[i] == (Object)null) { <objects>5__3[i] = GameObject.Find(GO_names[i]); } } if (<objects>5__3.TrueForAll((GameObject go) => (Object)(object)go != (Object)null && go.activeInHierarchy)) { return false; } <>2__current = null; <>1__state = 1; return true; } Plugin.Log.LogWarning((object)string.Format("Unable to find a [{0}] GameObject(s) after {1}s. Giving control back...", string.Join(", ", GO_names), timeout)); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <WarpPlayersSequence>d__13 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public QuickPeakManager <>4__this; public Segment segmentToWarpTo; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WarpPlayersSequence>d__13(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Invalid comparison between Unknown and I4 //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; QuickPeakManager quickPeakManager = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = quickPeakManager.WaitUntilAllActive(new List<string>(1) { "FogSphereSystem" }); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = null; <>1__state = 3; return true; case 3: <>1__state = -1; if ((int)segmentToWarpTo == 4) { Singleton<MapHandler>.Instance.GoToSegment(segmentToWarpTo); } MapHandler.JumpToSegment(segmentToWarpTo); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string FallbackIsland = "WillIsland"; public const string LevelSceneStartInvariant = "level"; private int BiomesLeftToClimb = 1; public static QuickPeakManager Instance { get; private set; } public QuickPeakManager() { if ((Object)(object)Instance != (Object)null) { Object.Destroy((Object)(object)this); return; } Instance = this; SceneManager.sceneLoaded += WarpOnLevelLoaded; SetBiomesToClimb(Configuration.BiomeAmount.Value); } private void SetBiomesToClimb(int newValue) { if (newValue < 0) { BiomesLeftToClimb = 0; } else { BiomesLeftToClimb = newValue; } } public void IncrementBiomesClimbed() { if (BiomesLeftToClimb > 0) { BiomesLeftToClimb--; } } public bool IsFinishedClimbing() { return BiomesLeftToClimb <= 0; } public void ForceEndgame() { Character.localCharacter.EndGame(); } public void WarpOnLevelLoaded(Scene scene, LoadSceneMode _) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) if (IsMapLevelName(((Scene)(ref scene)).name)) { if (!PhotonNetwork.IsMasterClient) { Plugin.Log.LogWarning((object)"Ignoring attempt to warp players: Only host is allowed to do so."); return; } if ((int)Configuration.StartBiome.Value == 0) { Plugin.Log.LogDebug((object)"Starting biome is set to beach. There is no need to warp players."); return; } Plugin.Log.LogInfo((object)$"Requesting MasterClient to jump to {Configuration.StartBiome.Value}"); ((MonoBehaviour)this).StartCoroutine(WarpPlayersSequence(Configuration.StartBiome.Value)); } } [IteratorStateMachine(typeof(<WarpPlayersSequence>d__13))] private IEnumerator WarpPlayersSequence(Segment segmentToWarpTo) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WarpPlayersSequence>d__13(0) { <>4__this = this, segmentToWarpTo = segmentToWarpTo }; } [IteratorStateMachine(typeof(<WaitUntilAllActive>d__14))] private IEnumerator WaitUntilAllActive(List<string> GO_names, float timeout = 10f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitUntilAllActive>d__14(0) { GO_names = GO_names, timeout = timeout }; } private static bool IsMapLevelName(string name) { if (!name.ToLowerInvariant().StartsWith("level")) { return name == "WillIsland"; } return true; } } } namespace OneQuickPeak.Patches { internal class CampfirePatch { [HarmonyPatch(typeof(Campfire), "Light_Rpc")] [HarmonyPostfix] private static void CheckClimbFinished(Campfire __instance) { //IL_0009: 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) if (!PhotonNetwork.IsMasterClient) { return; } if (__instance.advanceToSegment == Configuration.StartBiome.Value) { Plugin.Log.LogDebug((object)"Campfire of the start biome has been lit"); return; } QuickPeakManager.Instance.IncrementBiomesClimbed(); if (QuickPeakManager.Instance.IsFinishedClimbing()) { QuickPeakManager.Instance.ForceEndgame(); } } } internal class EndScreenPatch { private static string BiomeToEndscreenText(BiomeType type) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected I4, but got Unknown return (int)type switch { 0 => "This time SHORELY!", 1 => "That was TROPICOOL", 7 => "I was ROOTING for you!", 2 => "Go get that ALPTITUDE", 6 => "You got MESAFIED!", 3 => "You were VOLCANOPED", _ => "LOC: You are bad D:", }; } [HarmonyPatch(typeof(EndScreen), "Start")] [HarmonyPostfix] private static void UpdateText() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) Transform val = ((Component)EndScreen.instance).gameObject.transform.Find("Panel/Banner/BannerLose/Text"); if ((Object)(object)val == (Object)null) { Plugin.Log.LogError((object)"Unable to find BannerLose text transform."); return; } LocalizedText component = ((Component)val).gameObject.GetComponent<LocalizedText>(); if ((Object)(object)component == (Object)null) { Plugin.Log.LogError((object)"Text doesn't have LocalizedText components?! this might be bad..."); } else if (QuickPeakManager.Instance.IsFinishedClimbing()) { component.SetText(BiomeToEndscreenText(Singleton<MapHandler>.Instance.segments[Configuration.StartBiome.Value + Configuration.BiomeAmount.Value - 1].biome)); } } } } namespace OneQuickPeak.Config { public static class Configuration { public static ConfigEntry<Segment> StartBiome; public static ConfigEntry<int> BiomeAmount; public static void BindConfig(ConfigFile config) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) ConfigEntry<Segment> val = config.Bind<Segment>("OneQuickPeak", "StartBiome", (Segment)0, "Pick which biome will be a starting point of your PEAK expedition!\r\nNOTE: although it says only one alternative for biomes, the actual biome will depend on the seed you are playing. \r\nEx. if Tropics is selected, but according to map seed its Roots, you will start in Roots."); Segment value = val.Value; val.Value = ClampStartBiome(val.Value); ConfigEntry<int> val2 = config.Bind<int>("OneQuickPeak", "BiomesToClimb", 6, "Denotes how many biomes are to be climbed during the expedition.\r\nRanges is from 1 to how many biomes is required to reach the PEAK."); int value2 = val2.Value; val2.Value = ClampBiomeAmount(value2, val.Value, (Segment)5); Plugin.Log.LogDebug((object)$"[Config] Setting StartBiome to {val.Value} (Initial={value})"); Plugin.Log.LogDebug((object)$"[Config] Setting BiomeAmount to {val2.Value} (InitialAmount={value2}, Start={val.Value})"); StartBiome = val; BiomeAmount = val2; } public static Segment ClampStartBiome(Segment current) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0006: Unknown result type (might be due to invalid IL or missing references) if ((int)current > 4) { return (Segment)4; } return current; } public static int ClampBiomeAmount(int current, Segment start, Segment peak, int min = 1) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) if (current > (byte)(peak - start)) { return Math.Max(min, (byte)(peak - start) + 1); } return current; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }