Decompiled source of BetterScoutReport v0.1.5

plugins/com.atomic.details.dll

Decompiled 16 hours ago
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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
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.1.5.0")]
[assembly: AssemblyInformationalVersion("0.1.5+67951d819435e33f94d9227e40bf67b88cacaacc")]
[assembly: AssemblyProduct("com.atomic.details")]
[assembly: AssemblyTitle("MoreRunDetails")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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
{
	[BepInPlugin("com.atomic.details", "MoreRunDetails", "0.1.5")]
	public class Plugin : BaseUnityPlugin
	{
		private Harmony harmony;

		public static List<SegmentInfo> sectionTimes = new List<SegmentInfo>();

		public ConfigEntry<KeyCode> toggleKeybind;

		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.1.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!"));
			toggleKeybind = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "Toggle Keybind", (KeyCode)103, "Click this button to toggle the UI into view. (ONLY VISIBLE ON THE SCOUT REPORT)");
		}

		private void Update()
		{
			//IL_0006: 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<MapHandler>.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_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_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			Segment advanceToSegment = __instance.advanceToSegment;
			Segment val = (Segment)(byte)(advanceToSegment - 1);
			float timeSinceRunStarted = RunManager.Instance.timeSinceRunStarted;
			float num = Plugin.sectionTimes.Sum((SegmentInfo s) => s.duration);
			float num2 = timeSinceRunStarted - num;
			Plugin.sectionTimes.Add(new SegmentInfo
			{
				segment = val,
				time = timeSinceRunStarted,
				duration = num2,
				died = false
			});
			Plugin.Log.LogInfo((object)$"{val} 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<MapHandler>.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 <TweenIndividualParts>d__13 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			private float <elapsed>5__2;

			private float <duration>5__3;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <TweenIndividualParts>d__13(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;
					<elapsed>5__2 = 0f;
					<duration>5__3 = 1f;
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (<elapsed>5__2 < <duration>5__3)
				{
					<elapsed>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<GameObject> uiParts = new List<GameObject>();

		private static Dictionary<GameObject, Vector3> originalPositions = new Dictionary<GameObject, Vector3>();

		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;
		}

		public static void CreateOrUpdate(EndScreen __instance)
		{
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: 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_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: 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");
			GameObject val = Object.Instantiate<GameObject>(gameObject, gameObject.transform.parent);
			((Object)val).name = "MoreDetailsHolePunch";
			val.transform.localPosition = new Vector3(221.4f, 0.1225f, 0f);
			val.transform.localScale = new Vector3(0.99f, 0.99f, 0.99f);
			TrackObject(val);
			GameObject val2 = Object.Instantiate<GameObject>(gameObject2, gameObject2.transform.parent);
			((Object)val2).name = "MoreDetailsKeybindFrame";
			val2.transform.localPosition = new Vector3(256.6f, 0f, 0f);
			val2.transform.localScale = new Vector3(0.12f, 0.11f, 0.1f);
			GameObject val3 = Object.Instantiate<GameObject>(gameObject3, val2.transform);
			((Object)val3).name = "MoreDetailsKeybind";
			val3.transform.localPosition = Vector3.zero;
			val3.transform.localScale = Vector3.one;
			Object.Destroy((Object)(object)val3.GetComponent<LocalizedText>());
			TextMeshProUGUI component = val3.GetComponent<TextMeshProUGUI>();
			KeyCode value = Plugin.Instance.toggleKeybind.Value;
			((TMP_Text)component).text = ((object)(KeyCode)(ref value)).ToString();
			((TMP_Text)component).fontSizeMin = 250f;
			((TMP_Text)component).fontSizeMax = 250f;
			((TMP_Text)component).fontSize = 250f;
			GameObject val4 = Object.Instantiate<GameObject>(gameObject3, gameObject3.transform.parent);
			((Object)val4).name = "MoreDetailsAscent";
			val4.transform.localPosition = gameObject3.transform.localPosition - new Vector3(0f, 15f, 0f);
			val4.transform.localScale = gameObject3.transform.localScale;
			Object.Destroy((Object)(object)val4.GetComponent<LocalizedText>());
			TextMeshProUGUI component2 = val4.GetComponent<TextMeshProUGUI>();
			string text = "PEAK (ASCENT 0)";
			if (Ascents.currentAscent < 0)
			{
				text = "TENDERFOOT";
			}
			else if (Ascents.currentAscent > 0)
			{
				text = $"ASCENT {Ascents.currentAscent}";
			}
			((TMP_Text)component2).text = text;
			((TMP_Text)component2).fontSizeMin = 16f;
			((TMP_Text)component2).fontSizeMax = 16f;
			((TMP_Text)component2).fontSize = 16f;
			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;
		}

		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(<TweenIndividualParts>d__13))]
		private static IEnumerator TweenIndividualParts()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <TweenIndividualParts>d__13(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<GameObject>(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<GameObject>(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<LocalizedText>(ref val4))
			{
				Object.Destroy((Object)(object)val4);
			}
			TextMeshProUGUI component = val3.GetComponent<TextMeshProUGUI>();
			((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<MapHandler>.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<GameObject>(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<TextMeshProUGUI>();
				((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 ? ("<s>" + text + " [X]: " + text2 + "</s>") : (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)
		{
		}
	}
}