using 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.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using TerrainRandomiser; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; 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.atomic.details")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.2.5.0")] [assembly: AssemblyInformationalVersion("0.2.5+8c93d979adc8584c71063eedc39df12d230de046")] [assembly: AssemblyProduct("com.atomic.details")] [assembly: AssemblyTitle("MoreRunDetails")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.5.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 MoreRunDetails { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.atomic.details", "MoreRunDetails", "0.2.5")] public class Plugin : BaseUnityPlugin { private Harmony harmony; public static List sectionTimes = new List(); public static ConfigEntry toggleKeybind; public static ConfigEntry showDayAndLevel; public static ConfigEntry showCurrentAscent; public static ConfigEntry autoOpen; public static ConfigEntry terrainRandomiserSeed; public static bool hasTerrainRandomiser = false; public const string Id = "com.atomic.details"; internal static ManualLogSource Log { get; private set; } = null; public static Plugin Instance { get; private set; } = null; public static string Name => "MoreRunDetails"; public static string Version => "0.2.5"; 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; Instance = this; harmony = new Harmony("com.atomic.details"); harmony.PatchAll(); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); autoOpen = ((BaseUnityPlugin)this).Config.Bind("General", "Auto Open UI", false, "Automatically open the UI when the end screen is shown."); toggleKeybind = ((BaseUnityPlugin)this).Config.Bind("General", "Toggle Keybind", (KeyCode)103, "Click this button to toggle the UI into view. (ONLY VISIBLE ON THE SCOUT REPORT)"); showDayAndLevel = ((BaseUnityPlugin)this).Config.Bind("General", "Show Day and Level", true, "Show the current Day and Level on the UI, this is shown next to the timeline title."); showCurrentAscent = ((BaseUnityPlugin)this).Config.Bind("General", "Show Current Ascent", true, "Show the current Ascent on the UI, this is shown just below the scout report."); terrainRandomiserSeed = ((BaseUnityPlugin)this).Config.Bind("General", "Show Terrain Randomiser Seed", true, "Show the Terrain Randomiser Seed on the UI, if Terrain Randomiser is installed."); hasTerrainRandomiser = Chainloader.PluginInfos.ContainsKey("com.snosz.terrainrandomiser"); } private void Update() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(toggleKeybind.Value)) { UICreator.ToggleUI(); } } } public class SegmentInfo { public Segment segment; public float time; public float duration; public bool died; } [HarmonyPatch] public static class Patches { [HarmonyPostfix] [HarmonyPatch(typeof(EndScreen), "Awake")] public static void EndScreenShown(EndScreen __instance) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_007e: 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_00c4: Unknown result type (might be due to invalid IL or missing references) int currentSegment2 = Singleton.Instance.currentSegment; Segment currentSegment = (Segment)(byte)currentSegment2; if (!Plugin.sectionTimes.Any((SegmentInfo s) => s.segment == currentSegment)) { float timeSinceRunStarted = RunManager.Instance.timeSinceRunStarted; float num = Plugin.sectionTimes.Sum((SegmentInfo s) => s.duration); float duration = timeSinceRunStarted - num; Plugin.sectionTimes.Add(new SegmentInfo { segment = currentSegment, time = timeSinceRunStarted, duration = duration, died = !Character.localCharacter.refs.stats.won }); Plugin.Log.LogInfo((object)$"{currentSegment} tracking the stats."); } UICreator.CreateOrUpdate(__instance); } [HarmonyPostfix] [HarmonyPatch(typeof(Campfire), "Light_Rpc")] public static void OnCampfireLight(Campfire __instance) { //IL_0008: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) Segment nextSegment = __instance.advanceToSegment; Segment currentSegment = (Segment)(byte)(nextSegment - 1); float timeSinceRunStarted = RunManager.Instance.timeSinceRunStarted; if (!Plugin.sectionTimes.Any((SegmentInfo s) => s.segment == currentSegment || s.segment == nextSegment)) { float num = Plugin.sectionTimes.Sum((SegmentInfo s) => s.duration); float num2 = timeSinceRunStarted - num; if (!RunSettings.isMiniRun) { Plugin.sectionTimes.Add(new SegmentInfo { segment = currentSegment, time = timeSinceRunStarted, duration = num2, died = false }); Plugin.Log.LogInfo((object)$"{currentSegment} recorded: {num2}s (Total: {timeSinceRunStarted:F2}s)"); } } } [HarmonyPostfix] [HarmonyPatch(typeof(RunManager), "StartRun")] public static void OnRunStart(RunManager __instance) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) Plugin.sectionTimes.Clear(); UICreator.ResetUI(); Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name.Contains("Level")) { MapSegment[] segments = Singleton.Instance.segments; foreach (MapSegment val in segments) { ManualLogSource log = Plugin.Log; BiomeType biome = val.biome; log.LogInfo((object)("Segment available: " + ((object)(BiomeType)(ref biome)).ToString())); } } } } internal class UICreator { [CompilerGenerated] private sealed class d__15 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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_0095: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_016e: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__2 = 0f; 5__3 = 1f; break; case 1: <>1__state = -1; break; } if (5__2 < 5__3) { 5__2 += Time.deltaTime; foreach (GameObject uiPart in uiParts) { if (!((Object)(object)uiPart == (Object)null)) { Vector3 val = originalPositions[uiPart] + new Vector3(slideDistance, 0f, 0f); Vector3 val2 = originalPositions[uiPart]; Vector3 val3 = (isVisible ? val2 : val); uiPart.transform.localPosition = Vector3.Lerp(uiPart.transform.localPosition, val3, Time.deltaTime * lerpSpeed); } } <>2__current = null; <>1__state = 1; return true; } foreach (GameObject uiPart2 in uiParts) { if (!((Object)(object)uiPart2 == (Object)null)) { uiPart2.transform.localPosition = (isVisible ? originalPositions[uiPart2] : (originalPositions[uiPart2] + new Vector3(slideDistance, 0f, 0f))); } } animationRoutine = null; 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(); } } private static List uiParts = new List(); private static Dictionary originalPositions = new Dictionary(); private static bool isVisible = false; private static Coroutine animationRoutine; private static float slideDistance = 700f; private static float lerpSpeed = 8f; private static Vector3 baseOffset = new Vector3(425f, 115f, 0f); private static Vector3 verticalPageOffset = new Vector3(0f, -230f, 0f); private static Vector3 entrySpacing = new Vector3(0f, -25f, 0f); private static Vector3 entryStartOffset = new Vector3(0f, -35f, 0f); public static void ResetUI() { uiParts.Clear(); originalPositions.Clear(); isVisible = false; } [MethodImpl(MethodImplOptions.NoInlining)] private static bool CheckRandomiserSettings() { if (Object.op_Implicit((Object)(object)Plugin.Instance)) { return Plugin.Instance.mapSettings.enableRandomiser; } return false; } [MethodImpl(MethodImplOptions.NoInlining)] private static string GetRandomiserText() { if (Plugin.terrainRandomiserSeed.Value) { return $"TIMELINE (DAY: {DayNightManager.instance.dayCount}) (TERRAIN RANDOMISER SEED: {Plugin.Instance.mapSettings.seed})"; } return $"TIMELINE (DAY: {DayNightManager.instance.dayCount}) (TERRAIN RANDOMISER)"; } public static void CreateOrUpdate(EndScreen __instance) { //IL_0133: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: 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_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) Plugin.Log.LogInfo((object)"Creating custom end screen UI."); uiParts.Clear(); originalPositions.Clear(); GameObject gameObject = ((Component)((Component)__instance).transform.Find("Panel/HolePunch")).gameObject; GameObject gameObject2 = ((Component)((Component)__instance).transform.Find("Panel/BG")).gameObject; GameObject gameObject3 = ((Component)((Component)__instance).transform.Find("Panel/Margin/SCOUTING_REPORT")).gameObject; Transform panel = ((Component)__instance).transform.Find("Panel"); if (Plugin.showDayAndLevel.Value) { GameObject gameObject4 = ((Component)((Component)__instance).transform.Find("Panel/Margin/Layout/Window_TIMELINE/Title")).gameObject; Object.Destroy((Object)(object)gameObject4.GetComponent()); TextMeshProUGUI component = gameObject4.GetComponent(); if (Plugin.hasTerrainRandomiser && CheckRandomiserSettings()) { ((TMP_Text)component).text = GetRandomiserText(); } else { object arg = DayNightManager.instance.dayCount; Scene activeScene = SceneManager.GetActiveScene(); ((TMP_Text)component).text = $"TIMELINE (DAY: {arg}) ({((Scene)(ref activeScene)).name})"; } } if (Plugin.showCurrentAscent.Value) { GameObject val = Object.Instantiate(gameObject3, gameObject3.transform.parent); ((Object)val).name = "MoreDetailsAscent"; val.transform.localPosition = gameObject3.transform.localPosition - new Vector3(0f, 15f, 0f); val.transform.localScale = gameObject3.transform.localScale; Object.Destroy((Object)(object)val.GetComponent()); TextMeshProUGUI component2 = val.GetComponent(); string text = "PEAK (ASCENT 0)"; if (Ascents.currentAscent < 0) { text = "TENDERFOOT"; } else if (Ascents.currentAscent > 0) { text = $"ASCENT {Ascents.currentAscent}"; } if (RunSettings.isMiniRun) { text = "MINI RUN"; } else if (RunSettings._isCustomRun) { text = "CUSTOM RUN"; } ((TMP_Text)component2).text = text; ((TMP_Text)component2).fontSizeMin = 16f; ((TMP_Text)component2).fontSizeMax = 16f; ((TMP_Text)component2).fontSize = 16f; } if (RunSettings.isMiniRun) { return; } GameObject val2 = Object.Instantiate(gameObject, gameObject.transform.parent); ((Object)val2).name = "MoreDetailsHolePunch"; val2.transform.localPosition = new Vector3(221.4f, 0.1225f, 0f); val2.transform.localScale = new Vector3(0.99f, 0.99f, 0.99f); TrackObject(val2); GameObject val3 = Object.Instantiate(gameObject2, gameObject2.transform.parent); ((Object)val3).name = "MoreDetailsKeybindFrame"; val3.transform.localPosition = new Vector3(256.6f, 0f, 0f); val3.transform.localScale = new Vector3(0.12f, 0.11f, 0.1f); GameObject val4 = Object.Instantiate(gameObject3, val3.transform); ((Object)val4).name = "MoreDetailsKeybind"; val4.transform.localPosition = Vector3.zero; val4.transform.localScale = Vector3.one; Object.Destroy((Object)(object)val4.GetComponent()); TextMeshProUGUI component3 = val4.GetComponent(); KeyCode value = Plugin.toggleKeybind.Value; ((TMP_Text)component3).text = ((object)(KeyCode)(ref value)).ToString(); ((TMP_Text)component3).fontSizeMin = 250f; ((TMP_Text)component3).fontSizeMax = 250f; ((TMP_Text)component3).fontSize = 250f; GameObject titleTemplate = CreatePage(__instance, "Exited", baseOffset, "CAMPFIRE", gameObject2, panel, gameObject3); PopulateEntries(titleTemplate, useTotalTime: true); GameObject titleTemplate2 = CreatePage(__instance, "Spent", baseOffset + verticalPageOffset, "TIME SPENT", gameObject2, panel, gameObject3); PopulateEntries(titleTemplate2, useTotalTime: false); foreach (GameObject uiPart in uiParts) { if ((Object)(object)uiPart != (Object)null) { uiPart.transform.localPosition = originalPositions[uiPart] + new Vector3(slideDistance, 0f, 0f); } } isVisible = false; if (Plugin.autoOpen.Value) { ToggleUI(); } } public static void ToggleUI() { if (uiParts.Count != 0) { isVisible = !isVisible; if (animationRoutine != null) { ((MonoBehaviour)Plugin.Instance).StopCoroutine(animationRoutine); } animationRoutine = ((MonoBehaviour)Plugin.Instance).StartCoroutine(TweenIndividualParts()); } } [IteratorStateMachine(typeof(d__15))] private static IEnumerator TweenIndividualParts() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0); } private static GameObject CreatePage(EndScreen __instance, string suffix, Vector3 offset, string title, GameObject BG, Transform panel, GameObject SCOUTING_REPORT) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) Vector3 val = new Vector3(-105f, 0f, 0f) + offset; GameObject val2 = Object.Instantiate(BG, panel); ((Object)val2).name = "MoreDetailsBG_" + suffix; val2.transform.localPosition = BG.transform.localPosition + val; val2.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); TrackObject(val2); GameObject val3 = Object.Instantiate(SCOUTING_REPORT, panel); ((Object)val3).name = "MoreDetailsTitle_" + suffix; val3.transform.localPosition = SCOUTING_REPORT.transform.localPosition + offset + new Vector3(-95f, -90f, 0f); val3.transform.localScale = Vector3.one; TrackObject(val3); LocalizedText val4 = default(LocalizedText); if (val3.TryGetComponent(ref val4)) { Object.Destroy((Object)(object)val4); } TextMeshProUGUI component = val3.GetComponent(); ((TMP_Text)component).fontSizeMin = 32f; ((TMP_Text)component).fontSizeMax = 32f; ((TMP_Text)component).text = title; return val3; } private static void PopulateEntries(GameObject titleTemplate, bool useTotalTime) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Invalid comparison between Unknown and I4 //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Invalid comparison between Unknown and I4 //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Invalid comparison between Unknown and I4 //IL_0163: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_01ce: 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) MapSegment[] segments = Singleton.Instance.segments; int num = 0; foreach (SegmentInfo sectionTime in Plugin.sectionTimes) { string text = ((object)(Segment)(ref sectionTime.segment)).ToString(); if ((int)sectionTime.segment == 0) { text = "Shore"; } else if ((int)sectionTime.segment == 1 && segments.Any(delegate(MapSegment s) { //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) BiomeType biome3 = s.biome; return ((object)(BiomeType)(ref biome3)).ToString() == "Roots"; })) { text = "Roots"; } else if ((int)sectionTime.segment == 2 && segments.Any(delegate(MapSegment s) { //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) BiomeType biome2 = s.biome; return ((object)(BiomeType)(ref biome2)).ToString() == "Mesa"; })) { text = "Mesa"; } else if ((int)sectionTime.segment == 4 && segments.Any(delegate(MapSegment s) { //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) BiomeType biome = s.biome; return ((object)(BiomeType)(ref biome)).ToString() == "Volcano"; })) { text = "The Kiln"; } float num2 = (useTotalTime ? sectionTime.time : sectionTime.duration); TimeSpan timeSpan = TimeSpan.FromSeconds(num2); string text2 = $"{(int)timeSpan.TotalHours:D1}:{timeSpan.Minutes:D2}:{timeSpan.Seconds:D2}"; GameObject val = Object.Instantiate(titleTemplate, titleTemplate.transform.parent); val.transform.localPosition = titleTemplate.transform.localPosition + entryStartOffset + entrySpacing * (float)num; val.transform.localScale = Vector3.one; ((Object)val).name = text; TrackObject(val); TextMeshProUGUI component = val.GetComponent(); ((Graphic)component).color = new Color(((Graphic)component).color.r, ((Graphic)component).color.g, ((Graphic)component).color.b, 0.7f); ((TMP_Text)component).fontSize = 20f; ((TMP_Text)component).fontSizeMin = 20f; ((TMP_Text)component).fontSizeMax = 20f; ((TMP_Text)component).text = (sectionTime.died ? ("" + text + " [X]: " + text2 + "") : (text + ": " + text2)); num++; } } private static void TrackObject(GameObject obj) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)obj == (Object)null)) { uiParts.Add(obj); originalPositions[obj] = obj.transform.localPosition; } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }