Decompiled source of Stat Menu Ui v1.0.0

plugins/Stat Menu.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Stat Menu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Stat Menu")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("b7947eb3-6a18-4927-929e-0faebf0295d2")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("com.recks.playerstatscanvas", "Player Stats Canvas GUI", "5.0.2")]
[BepInProcess("Erenshor.exe")]
public class PlayerStatsCanvasPlugin : BaseUnityPlugin
{
	[CompilerGenerated]
	private sealed class <FadeIn>d__23 : IEnumerator<object>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private object <>2__current;

		public PlayerStatsCanvasPlugin <>4__this;

		private float <t>5__1;

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

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

		[DebuggerHidden]
		public <FadeIn>d__23(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>4__this.windowPanel.SetActive(true);
				<>4__this.panelGroup.interactable = false;
				<>4__this.panelGroup.blocksRaycasts = false;
				<t>5__1 = 0f;
				break;
			case 1:
				<>1__state = -1;
				<t>5__1 += Time.deltaTime * 2f;
				break;
			}
			if (<t>5__1 < 1f)
			{
				<>4__this.panelGroup.alpha = <t>5__1;
				<>2__current = null;
				<>1__state = 1;
				return true;
			}
			<>4__this.panelGroup.alpha = 1f;
			<>4__this.panelGroup.interactable = true;
			<>4__this.panelGroup.blocksRaycasts = true;
			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 <FadeOut>d__24 : IEnumerator<object>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private object <>2__current;

		public PlayerStatsCanvasPlugin <>4__this;

		private float <t>5__1;

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

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

		[DebuggerHidden]
		public <FadeOut>d__24(int <>1__state)
		{
			this.<>1__state = <>1__state;
		}

		[DebuggerHidden]
		void IDisposable.Dispose()
		{
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>4__this.panelGroup.interactable = false;
				<>4__this.panelGroup.blocksRaycasts = false;
				<t>5__1 = 1f;
				break;
			case 1:
				<>1__state = -1;
				<t>5__1 -= Time.deltaTime * 2f;
				break;
			}
			if (<t>5__1 > 0f)
			{
				<>4__this.panelGroup.alpha = <t>5__1;
				<>2__current = null;
				<>1__state = 1;
				return true;
			}
			<>4__this.panelGroup.alpha = 0f;
			<>4__this.windowPanel.SetActive(false);
			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 Canvas statsCanvas;

	private RectTransform panelRect;

	private GameObject windowPanel;

	private GameObject headerObject;

	private GameObject tabContainer;

	private GameObject contentObject;

	private GameObject dragHandle;

	private Button statsTab;

	private Button repTab;

	private Image statsTabImage;

	private Image repTabImage;

	private CanvasGroup panelGroup;

	private bool isLoaded;

	private bool dragging;

	private Vector2 dragOffset;

	private ConfigEntry<KeyCode> toggleKey;

	private ConfigEntry<Color> activeTabColor;

	private ConfigEntry<Color> inactiveTabColor;

	private void Awake()
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		toggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Controls", "ToggleKey", (KeyCode)112, "Key to open/close the stats window");
		activeTabColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Appearance", "ActiveTabColor", new Color(0.35f, 0.59f, 1f), "Color for active tab");
		inactiveTabColor = ((BaseUnityPlugin)this).Config.Bind<Color>("Appearance", "InactiveTabColor", new Color(0.7f, 0.7f, 0.7f), "Color for inactive tab");
	}

	private void Update()
	{
		//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_00db: Unknown result type (might be due to invalid IL or missing references)
		Scene activeScene = SceneManager.GetActiveScene();
		string name = ((Scene)(ref activeScene)).name;
		if (name == "Menu" || name == "LoadScene")
		{
			if ((Object)(object)windowPanel != (Object)null && windowPanel.activeSelf)
			{
				panelGroup.alpha = 0f;
				panelGroup.interactable = false;
				panelGroup.blocksRaycasts = false;
				windowPanel.SetActive(false);
			}
			return;
		}
		if (!isLoaded && (Object)(object)GameData.PlayerControl != (Object)null && (Object)(object)GameData.PlayerStats != (Object)null)
		{
			isLoaded = true;
			InitializeUI();
		}
		if (isLoaded && Input.GetKeyDown(toggleKey.Value))
		{
			TogglePanel();
		}
	}

	private void InitializeUI()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Expected O, but got Unknown
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: 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_012e: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Expected O, but got Unknown
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_022a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0257: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_027a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0284: Expected O, but got Unknown
		//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_02df: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_030d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0338: Unknown result type (might be due to invalid IL or missing references)
		//IL_033d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0362: Unknown result type (might be due to invalid IL or missing references)
		//IL_0385: Unknown result type (might be due to invalid IL or missing references)
		//IL_038f: Expected O, but got Unknown
		//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_040a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0421: Unknown result type (might be due to invalid IL or missing references)
		//IL_0472: Unknown result type (might be due to invalid IL or missing references)
		//IL_047c: Expected O, but got Unknown
		//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04bb: Expected O, but got Unknown
		//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_04dd: Expected O, but got Unknown
		//IL_0513: Unknown result type (might be due to invalid IL or missing references)
		//IL_052a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0541: Unknown result type (might be due to invalid IL or missing references)
		//IL_0558: Unknown result type (might be due to invalid IL or missing references)
		//IL_058c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0596: Expected O, but got Unknown
		GameObject val = new GameObject("PlayerStatsCanvas");
		statsCanvas = val.AddComponent<Canvas>();
		statsCanvas.renderMode = (RenderMode)0;
		CanvasScaler val2 = val.AddComponent<CanvasScaler>();
		val2.uiScaleMode = (ScaleMode)1;
		val2.referenceResolution = new Vector2(1920f, 1080f);
		val.AddComponent<GraphicRaycaster>();
		Object.DontDestroyOnLoad((Object)(object)val);
		windowPanel = new GameObject("WindowPanel");
		windowPanel.transform.SetParent(val.transform, false);
		panelRect = windowPanel.AddComponent<RectTransform>();
		panelRect.sizeDelta = new Vector2(420f, 620f);
		panelRect.anchoredPosition = Vector2.zero;
		Image val3 = windowPanel.AddComponent<Image>();
		Sprite builtinResource = Resources.GetBuiltinResource<Sprite>("UI/Skin/UISprite.psd");
		if ((Object)(object)builtinResource != (Object)null)
		{
			val3.sprite = builtinResource;
			val3.type = (Type)1;
		}
		((Graphic)val3).color = Color32.op_Implicit(new Color32((byte)20, (byte)30, (byte)45, (byte)230));
		windowPanel.AddComponent<Shadow>().effectColor = new Color(0f, 0f, 0f, 0.5f);
		panelGroup = windowPanel.AddComponent<CanvasGroup>();
		panelGroup.alpha = 0f;
		panelGroup.interactable = false;
		panelGroup.blocksRaycasts = false;
		headerObject = new GameObject("Header");
		headerObject.transform.SetParent(windowPanel.transform, false);
		RectTransform val4 = headerObject.AddComponent<RectTransform>();
		val4.anchorMin = new Vector2(0f, 1f);
		val4.anchorMax = new Vector2(1f, 1f);
		val4.pivot = new Vector2(0.5f, 1f);
		val4.sizeDelta = new Vector2(0f, 40f);
		Image val5 = headerObject.AddComponent<Image>();
		((Graphic)val5).color = Color32.op_Implicit(new Color32((byte)18, (byte)30, (byte)45, byte.MaxValue));
		Text val6 = CreateText(headerObject.transform, "Player Stats & Reputation", 22, (TextAnchor)4);
		((Graphic)val6).rectTransform.anchorMin = Vector2.zero;
		((Graphic)val6).rectTransform.anchorMax = Vector2.one;
		dragHandle = new GameObject("DragHandle");
		dragHandle.transform.SetParent(headerObject.transform, false);
		RectTransform val7 = dragHandle.AddComponent<RectTransform>();
		Vector2 val8 = default(Vector2);
		((Vector2)(ref val8))..ctor(1f, 1f);
		val7.anchorMax = val8;
		val7.anchorMin = val8;
		val7.pivot = new Vector2(1f, 1f);
		val7.anchoredPosition = new Vector2(-20f, -10f);
		val7.sizeDelta = new Vector2(16f, 16f);
		Image val9 = dragHandle.AddComponent<Image>();
		((Graphic)val9).color = Color32.op_Implicit(new Color32((byte)108, (byte)194, byte.MaxValue, byte.MaxValue));
		dragHandle.transform.rotation = Quaternion.Euler(0f, 0f, 45f);
		AddDragEvents(dragHandle.AddComponent<EventTrigger>());
		tabContainer = new GameObject("Tabs");
		tabContainer.transform.SetParent(windowPanel.transform, false);
		RectTransform val10 = tabContainer.AddComponent<RectTransform>();
		val10.anchorMin = new Vector2(0f, 1f);
		val10.anchorMax = new Vector2(1f, 1f);
		val10.pivot = new Vector2(0.5f, 1f);
		val10.anchoredPosition = new Vector2(0f, -40f);
		val10.sizeDelta = new Vector2(0f, 32f);
		HorizontalLayoutGroup val11 = tabContainer.AddComponent<HorizontalLayoutGroup>();
		((LayoutGroup)val11).childAlignment = (TextAnchor)4;
		((HorizontalOrVerticalLayoutGroup)val11).spacing = 12f;
		statsTab = CreateTabButton("Stats");
		((UnityEvent)statsTab.onClick).AddListener((UnityAction)delegate
		{
			ShowStats(showStats: true);
		});
		statsTabImage = ((Component)statsTab).GetComponent<Image>();
		repTab = CreateTabButton("Reputation");
		((UnityEvent)repTab.onClick).AddListener((UnityAction)delegate
		{
			ShowStats(showStats: false);
		});
		repTabImage = ((Component)repTab).GetComponent<Image>();
		contentObject = new GameObject("Content");
		contentObject.transform.SetParent(windowPanel.transform, false);
		RectTransform val12 = contentObject.AddComponent<RectTransform>();
		val12.anchorMin = new Vector2(0f, 0f);
		val12.anchorMax = new Vector2(1f, 1f);
		val12.offsetMin = new Vector2(12f, 12f);
		val12.offsetMax = new Vector2(-12f, -84f);
		VerticalLayoutGroup val13 = contentObject.AddComponent<VerticalLayoutGroup>();
		((LayoutGroup)val13).childAlignment = (TextAnchor)0;
		((HorizontalOrVerticalLayoutGroup)val13).spacing = 6f;
		((LayoutGroup)val13).padding = new RectOffset(8, 8, 8, 8);
		((HorizontalOrVerticalLayoutGroup)val13).childForceExpandWidth = true;
		((HorizontalOrVerticalLayoutGroup)val13).childForceExpandHeight = false;
		ShowStats(showStats: true);
		HighlightTab(statsActive: true);
		windowPanel.SetActive(false);
	}

	private Button CreateTabButton(string label)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_003c: 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_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b0: 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_00cd: 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)
		GameObject val = new GameObject(label + "Tab");
		val.transform.SetParent(tabContainer.transform, false);
		RectTransform val2 = val.AddComponent<RectTransform>();
		val2.sizeDelta = new Vector2(120f, 32f);
		Image val3 = val.AddComponent<Image>();
		((Graphic)val3).color = inactiveTabColor.Value;
		Button val4 = val.AddComponent<Button>();
		((Selectable)val4).transition = (Transition)1;
		ColorBlock colors = default(ColorBlock);
		((ColorBlock)(ref colors)).normalColor = inactiveTabColor.Value;
		((ColorBlock)(ref colors)).highlightedColor = inactiveTabColor.Value * 1.2f;
		((ColorBlock)(ref colors)).pressedColor = inactiveTabColor.Value * 0.9f;
		((ColorBlock)(ref colors)).selectedColor = inactiveTabColor.Value;
		((ColorBlock)(ref colors)).colorMultiplier = 1f;
		((ColorBlock)(ref colors)).fadeDuration = 0.1f;
		((Selectable)val4).colors = colors;
		CreateText(val.transform, label, 18, (TextAnchor)4);
		return val4;
	}

	private Text CreateText(Transform parent, string text, int size, TextAnchor align)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0043: 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)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject("Text");
		val.transform.SetParent(parent, false);
		Text val2 = val.AddComponent<Text>();
		val2.text = text;
		val2.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
		val2.fontSize = size;
		val2.alignment = align;
		((Graphic)val2).color = Color.white;
		val.AddComponent<Shadow>().effectColor = new Color(0f, 0f, 0f, 0.5f);
		return val2;
	}

	[IteratorStateMachine(typeof(<FadeIn>d__23))]
	private IEnumerator FadeIn()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <FadeIn>d__23(0)
		{
			<>4__this = this
		};
	}

	[IteratorStateMachine(typeof(<FadeOut>d__24))]
	private IEnumerator FadeOut()
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <FadeOut>d__24(0)
		{
			<>4__this = this
		};
	}

	private void TogglePanel()
	{
		if (!windowPanel.activeSelf)
		{
			((MonoBehaviour)this).StartCoroutine(FadeIn());
		}
		else
		{
			((MonoBehaviour)this).StartCoroutine(FadeOut());
		}
	}

	private void ShowStats(bool showStats)
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Expected O, but got Unknown
		foreach (Transform item in contentObject.transform)
		{
			Transform val = item;
			Object.Destroy((Object)(object)((Component)val).gameObject);
		}
		if (showStats)
		{
			RefreshStats();
		}
		else
		{
			RefreshReputation();
		}
		HighlightTab(showStats);
	}

	private void HighlightTab(bool statsActive)
	{
		//IL_001d: 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_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		((Graphic)statsTabImage).color = (statsActive ? activeTabColor.Value : inactiveTabColor.Value);
		((Graphic)repTabImage).color = (statsActive ? inactiveTabColor.Value : activeTabColor.Value);
	}

	private void AddDragEvents(EventTrigger et)
	{
		//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_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Expected O, but got Unknown
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: 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_0041: Expected O, but got Unknown
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: 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_0074: Expected O, but got Unknown
		Entry val = new Entry
		{
			eventID = (EventTriggerType)13
		};
		((UnityEvent<BaseEventData>)(object)val.callback).AddListener((UnityAction<BaseEventData>)delegate(BaseEventData data)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			dragging = true;
			PointerEventData val6 = (PointerEventData)data;
			RectTransformUtility.ScreenPointToLocalPointInRectangle(panelRect, val6.position, (Camera)null, ref dragOffset);
		});
		et.triggers.Add(val);
		Entry val2 = new Entry
		{
			eventID = (EventTriggerType)5
		};
		((UnityEvent<BaseEventData>)(object)val2.callback).AddListener((UnityAction<BaseEventData>)delegate(BaseEventData data)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Expected O, but got Unknown
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			if (dragging)
			{
				PointerEventData val4 = (PointerEventData)data;
				Vector2 val5 = default(Vector2);
				RectTransformUtility.ScreenPointToLocalPointInRectangle((RectTransform)((Component)statsCanvas).transform, val4.position, (Camera)null, ref val5);
				panelRect.anchoredPosition = val5 - dragOffset;
			}
		});
		et.triggers.Add(val2);
		Entry val3 = new Entry
		{
			eventID = (EventTriggerType)14
		};
		((UnityEvent<BaseEventData>)(object)val3.callback).AddListener((UnityAction<BaseEventData>)delegate
		{
			dragging = false;
		});
		et.triggers.Add(val3);
	}

	private void AddLine(string text)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0036: 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)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject("Line");
		val.transform.SetParent(contentObject.transform, false);
		RectTransform val2 = val.AddComponent<RectTransform>();
		val2.anchorMin = new Vector2(0f, 1f);
		val2.anchorMax = new Vector2(1f, 1f);
		val2.pivot = new Vector2(0.5f, 1f);
		val2.sizeDelta = new Vector2(0f, 24f);
		Text val3 = val.AddComponent<Text>();
		val3.text = text;
		val3.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
		val3.fontSize = 16;
		val3.alignment = (TextAnchor)3;
		((Graphic)val3).color = Color.white;
		val.AddComponent<Shadow>().effectColor = new Color(0f, 0f, 0f, 0.5f);
	}

	private void RefreshStats()
	{
		Stats playerStats = GameData.PlayerStats;
		float num = Mathf.Min((float)playerStats.GetCurrentDex() * 0.25f, 100f);
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Crit Chance:", num));
		float num2 = Mathf.Min((float)playerStats.GetCurrentAgi() * 0.2f, 100f);
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Dodge Chance:", num2));
		AddLine(string.Format("{0,-20}{1,8}", "Level:", playerStats.Level));
		AddLine(string.Format("{0,-20}{1,8}", "Ascension Level:", playerStats.Myself.MySkills.GetPointsSpent()));
		AddLine(string.Format("{0,-20}{1,8} / {2,-8}", "Exp:", playerStats.CurrentExperience, playerStats.ExperienceToLevelUp));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Strength:", playerStats.GetCurrentStr(), playerStats.MyInv.ItemStr));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Dexterity:", playerStats.GetCurrentDex(), playerStats.MyInv.ItemDex));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Endurance:", playerStats.GetCurrentEnd(), playerStats.MyInv.ItemEnd));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Agility:", playerStats.GetCurrentAgi(), playerStats.MyInv.ItemAgi));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Intelligence:", playerStats.GetCurrentInt(), playerStats.MyInv.ItemInt));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Wisdom:", playerStats.GetCurrentWis(), playerStats.MyInv.ItemWis));
		AddLine(string.Format("{0,-20}{1,4}  (+{2,3})", "Charisma:", playerStats.GetCurrentCha(), playerStats.MyInv.ItemCha));
		AddLine(string.Format("{0,-20}{1,8:F1}", "Physical Attack:", playerStats.AttackAbility));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Spell Dmg Bonus:", (float)playerStats.GetCurrentInt() * ((float)playerStats.CharacterClass.IntBenefit / 100f)));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Healing Bonus:", (float)playerStats.GetCurrentWis() * ((float)playerStats.CharacterClass.WisBenefit / 100f)));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Life Steal:", playerStats.PercentLifesteal));
		AddLine(string.Format("{0,-20}{1,8}", "Damage Shield:", playerStats.GetCurrentDS()));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Attack Speed Bonus:", (float)playerStats.GetCurrentDex() * ((float)playerStats.CharacterClass.DexBenefit / 100f)));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Move Speed Bonus:", (playerStats.actualRunSpeed - playerStats.RunSpeed) / playerStats.RunSpeed * 100f));
		AddLine(string.Format("{0,-20}{1,8:F1}%", "Resonance Proc Chance:", (float)playerStats.GetCurrentDex() * ((float)playerStats.CharacterClass.DexBenefit / 100f)));
	}

	private void RefreshReputation()
	{
		foreach (NPCFaction allFaction in GlobalFactionManager.AllFactions)
		{
			AddLine($"{allFaction.Desc}: {allFaction.Value:F1}");
		}
	}
}