Decompiled source of ScoreAlways v1.0.30

ScoreAlways.dll

Decompiled 20 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace HowToFish.ScoreAlways
{
	public enum ModLanguage
	{
		English,
		Russian
	}
	public class TrickshotDef
	{
		public string Id;

		public string NameEn;

		public string NameRu;

		public string DescEn;

		public string DescRu;

		public float DefaultMultiplier;

		public ConfigEntry<bool> ForceConfig;

		public ConfigEntry<float> MultiplierConfig;

		public TrickshotDef(string id, string nameEn, string nameRu, string descEn, string descRu, float defMult)
		{
			Id = id;
			NameEn = nameEn;
			NameRu = nameRu;
			DescEn = descEn;
			DescRu = descRu;
			DefaultMultiplier = defMult;
		}
	}
	[BepInPlugin("com.howToFish.scorealways", "ScoreAlways", "1.0.10")]
	[BepInProcess("How to Fish.exe")]
	public sealed class ScoreAlwaysPlugin : BaseUnityPlugin
	{
		public const string PluginGuid = "com.howToFish.scorealways";

		public const string PluginName = "ScoreAlways";

		public const string PluginVersion = "1.0.10";

		public static List<TrickshotDef> Definitions = new List<TrickshotDef>();

		private static bool _showMenu = false;

		private Rect _windowRect = new Rect(60f, 60f, 620f, 640f);

		private int _currentTab;

		private Vector2 _scrollPos;

		private Texture2D _modIcon;

		private bool _isResizing;

		private Vector2 _resizeStartMouse;

		private Vector2 _resizeStartSize;

		private Texture2D _winBgTex;

		private Texture2D _cardBgTex;

		private Texture2D _btnNormalTex;

		private Texture2D _btnHoverTex;

		private Texture2D _btnActiveTex;

		private Texture2D _tabNormalTex;

		private Texture2D _tabActiveTex;

		private Texture2D _accentBadgeTex;

		private Texture2D _switchOnTex;

		private Texture2D _switchTrackOnTex;

		private Texture2D _switchTrackOffTex;

		private Texture2D _switchKnobOnTex;

		private Texture2D _switchKnobOffTex;

		private Texture2D _switchOffTex;

		private Texture2D _scrollBgTex;

		private Texture2D _scrollThumbTex;

		private Texture2D _scrollThumbHoverTex;

		private GUIStyle _winStyle;

		private GUIStyle _cardStyle;

		private GUIStyle _titleStyle;

		private GUIStyle _subTitleStyle;

		private GUIStyle _tabStyle;

		private GUIStyle _tabActiveStyle;

		private GUIStyle _labelStyle;

		private GUIStyle _sectionHeaderStyle;

		private GUIStyle _btnStyle;

		private GUIStyle _switchOnStyle;

		private GUIStyle _switchOffStyle;

		private GUIStyle _badgeStyle;

		private GUIStyle _goldBadgeStyle;

		private GUIStyle _gripStyle;

		private GUIStyle _scrollBarStyle;

		private GUIStyle _scrollThumbStyle;

		private Harmony _harmony;

		private float _lastToggleTime;

		public static ScoreAlwaysPlugin Instance { get; private set; }

		public static ConfigEntry<bool> ModEnabled { get; private set; }

		public static ConfigEntry<KeyCode> MenuKey { get; private set; }

		public static ConfigEntry<ModLanguage> SelectedLanguage { get; private set; }

		public static ConfigEntry<float> MasterMultiplier { get; private set; }

		public static ConfigEntry<bool> ForceAllBonuses { get; private set; }

		public static bool IsMenuOpen => _showMenu;

		public static bool IsRussian => SelectedLanguage.Value == ModLanguage.Russian;

		public static string T(string en, string ru)
		{
			if (!IsRussian)
			{
				return en;
			}
			return ru;
		}

		private void Awake()
		{
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Expected O, but got Unknown
			Instance = this;
			ModEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("1. General", "Enabled", true, "Master toggle for ScoreAlways mod.");
			MenuKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("1. General", "MenuKey", (KeyCode)288, "Hotkey to toggle the in-game ScoreAlways studio.");
			SelectedLanguage = ((BaseUnityPlugin)this).Config.Bind<ModLanguage>("1. General", "Language", ModLanguage.Russian, "Interface language.");
			MasterMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("1. General", "MasterMultiplier", 1f, new ConfigDescription("Master multiplier applied to total style score.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 100f), Array.Empty<object>()));
			ForceAllBonuses = ((BaseUnityPlugin)this).Config.Bind<bool>("1. General", "ForceAllBonuses", false, "Force all 17 trickshot bonuses simultaneously.");
			RegisterTrickshots();
			try
			{
				_harmony = new Harmony("com.howToFish.scorealways");
				_harmony.PatchAll();
				((BaseUnityPlugin)this).Logger.LogInfo((object)"ScoreAlways Harmony patches applied cleanly.");
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("ScoreAlways Harmony error: " + ex));
			}
			LoadIcon();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"ScoreAlways v1.0.10 initialized! Press [F7] for studio.");
		}

		private void RegisterTrickshots()
		{
			Definitions.Clear();
			AddDef("ThreeSixty", "360 Spin", "Разворот 360°", "Full 360 rotation before kill", "Полный оборот на 360 градусов перед выстрелом", 1.5f);
			AddDef("NoScope", "No-Scope", "Без прицела", "Kill without aiming down sights", "Убийство от бедра без использования прицела", 1.2f);
			AddDef("QuickScope", "Quick-Scope", "Квик-скоуп", "Kill immediately upon scoping in", "Мгновенный выстрел сразу после входа в прицел", 1.1f);
			AddDef("Dogfight", "Dogfight", "Воздушный бой", "Both player and creature airborne", "И стрелок, и добыча находятся в воздухе", 1.5f);
			AddDef("Aerial", "Aerial Kill", "Убийство в воздухе", "Player is airborne/jumping", "Выстрел совершен во время прыжка или падения", 1.25f);
			AddDef("FlyFishing", "Fly Fishing", "Летающая рыба", "Creature is airborne", "Существо находится высоко в воздухе", 1.25f);
			AddDef("Longshot", "Longshot", "Дальний выстрел", "Kill distance > 25 meters", "Дистанция попадания превышает 25 метров", 1.3f);
			AddDef("PointBlank", "Point Blank", "В упор", "Kill distance < 2 meters", "Выстрел в упор на расстоянии менее 2 метров", 1.1f);
			AddDef("Headshot", "Headshot", "В голову", "Precision critical head hit", "Точное критическое попадание в голову", 1.25f);
			AddDef("OneShotOneKill", "One Shot, One Kill", "Один выстрел", "Instantly kill 100% full-HP prey", "Мгновенное уничтожение цели с полным здоровьем", 1.25f);
			AddDef("LastBullet", "Last Bullet", "Последний патрон", "Kill with the final round in clip", "Убийство самым последним патроном в обойме", 1.25f);
			AddDef("Overkill", "Overkill", "Оверкилл", "Deal 70+ excess overkill damage", "Нанесение более 70 единиц избыточного урона", 1.25f);
			AddDef("Killsteal", "Killsteal", "Добивание", "Finish off prey wounded by others", "Добивание раненого существа с низким здоровьем", 1.3f);
			AddDef("Endangered", "Endangered", "Редкий вид", "Kill rare/endangered species", "Убийство редкого или вымирающего вида", 1.25f);
			AddDef("Finally", "Finally!", "Наконец-то!", "Hit target after repeated misses", "Попадание в цель после череды долгих промахов", 1.1f);
			AddDef("Multikill", "Multikill", "Мульти-убийство", "Rapid streak of consecutive kills", "Серия быстрых последовательных убийств", 1.5f);
			AddDef("Impressive", "Impressive!", "Впечатляюще!", "Triggered when 5+ bonuses stack", "Награда за сбор 5 и более трюков одновременно", 2f);
		}

		private void AddDef(string id, string nameEn, string nameRu, string descEn, string descRu, float defMult)
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			TrickshotDef trickshotDef = new TrickshotDef(id, nameEn, nameRu, descEn, descRu, defMult);
			trickshotDef.ForceConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Trickshots", "Force_" + id, false, "Always force " + nameEn + " on every kill.");
			trickshotDef.MultiplierConfig = ((BaseUnityPlugin)this).Config.Bind<float>("3. Multipliers", "Multiplier_" + id, defMult, new ConfigDescription("Multiplier for " + nameEn, (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>()));
			Definitions.Add(trickshotDef);
		}

		private void LoadIcon()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			try
			{
				string path = Path.Combine(Paths.PluginPath, "ScoreAlways", "icon.png");
				if (File.Exists(path))
				{
					byte[] array = File.ReadAllBytes(path);
					_modIcon = new Texture2D(2, 2);
					ImageConversion.LoadImage(_modIcon, array);
				}
			}
			catch
			{
			}
		}

		private void Update()
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			if (_showMenu)
			{
				Cursor.visible = true;
				Cursor.lockState = (CursorLockMode)0;
			}
			if (!(Time.unscaledTime - _lastToggleTime > 0.22f))
			{
				return;
			}
			bool flag = false;
			try
			{
				Keyboard current = Keyboard.current;
				if (current != null && ((ButtonControl)current.f7Key).wasPressedThisFrame)
				{
					flag = true;
				}
			}
			catch
			{
			}
			try
			{
				if (!flag && Input.GetKeyDown(MenuKey.Value))
				{
					flag = true;
				}
			}
			catch
			{
			}
			if (flag)
			{
				_lastToggleTime = Time.unscaledTime;
				_showMenu = !_showMenu;
				Cursor.visible = _showMenu;
				Cursor.lockState = (CursorLockMode)(!_showMenu);
			}
		}

		public static float CalculateConfiguredMultiplier(out int activeCount)
		{
			float num = MasterMultiplier.Value;
			activeCount = 0;
			if (!ModEnabled.Value)
			{
				return 1f;
			}
			foreach (TrickshotDef definition in Definitions)
			{
				if (ForceAllBonuses.Value || definition.ForceConfig.Value)
				{
					num *= definition.MultiplierConfig.Value;
					activeCount++;
				}
			}
			if (activeCount >= 5 && !ForceAllBonuses.Value)
			{
				TrickshotDef trickshotDef = Definitions.FirstOrDefault((TrickshotDef d) => d.Id == "Impressive");
				if (trickshotDef != null && !trickshotDef.ForceConfig.Value)
				{
					num *= trickshotDef.MultiplierConfig.Value;
					activeCount++;
				}
			}
			return num;
		}

		public static List<Bonus> ProcessBonuses(List<Bonus> original)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			if (!ModEnabled.Value)
			{
				return original;
			}
			List<Bonus> list = new List<Bonus>();
			HashSet<string> hashSet = new HashSet<string>();
			if (original != null)
			{
				for (int i = 0; i < original.Count; i++)
				{
					Bonus b = original[i];
					TrickshotDef trickshotDef = Definitions.FirstOrDefault((TrickshotDef d) => d.Id == b.Name || d.NameEn == b.Name || d.NameRu == b.Name);
					if (trickshotDef != null)
					{
						b.Worth = trickshotDef.MultiplierConfig.Value;
						hashSet.Add(trickshotDef.Id);
					}
					list.Add(b);
				}
			}
			foreach (TrickshotDef definition in Definitions)
			{
				if (!(definition.Id == "Impressive") && (ForceAllBonuses.Value || definition.ForceConfig.Value) && !hashSet.Contains(definition.Id))
				{
					string text = (IsRussian ? definition.NameRu : definition.NameEn);
					list.Add(new Bonus(text, definition.MultiplierConfig.Value));
					hashSet.Add(definition.Id);
				}
			}
			if (list.Count >= 5 || ForceAllBonuses.Value)
			{
				TrickshotDef trickshotDef2 = Definitions.FirstOrDefault((TrickshotDef d) => d.Id == "Impressive");
				if (trickshotDef2 != null && !hashSet.Contains("Impressive"))
				{
					string text2 = (IsRussian ? trickshotDef2.NameRu : trickshotDef2.NameEn);
					list.Add(new Bonus(text2, trickshotDef2.MultiplierConfig.Value));
				}
			}
			if (MasterMultiplier.Value > 1.01f)
			{
				list.Add(new Bonus(T("Score Master", "Мастер Стиля"), MasterMultiplier.Value));
			}
			return list.OrderByDescending((Bonus val) => val.Worth).ToList();
		}

		private Texture2D MakePillTexture(int width, int height, Color bg, Color border, float borderThickness)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: 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_00c8: 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_00e3: 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)
			Texture2D val = new Texture2D(width, height, (TextureFormat)4, false);
			Color[] array = (Color[])(object)new Color[width * height];
			float num = (float)height / 2f;
			for (int i = 0; i < height; i++)
			{
				for (int j = 0; j < width; j++)
				{
					float num2 = Mathf.Clamp((float)j + 0.5f, num, (float)width - num);
					float num3 = num;
					float num4 = (float)j + 0.5f - num2;
					float num5 = (float)i + 0.5f - num3;
					float num6 = Mathf.Sqrt(num4 * num4 + num5 * num5);
					if (num6 <= num - 0.5f)
					{
						if (num6 > num - borderThickness - 0.5f)
						{
							array[i * width + j] = border;
						}
						else
						{
							array[i * width + j] = bg;
						}
					}
					else if (num6 <= num + 0.5f)
					{
						float num7 = Mathf.Clamp01(num + 0.5f - num6);
						Color val2 = ((borderThickness > 0.1f) ? border : bg);
						val2.a *= num7;
						array[i * width + j] = val2;
					}
					else
					{
						array[i * width + j] = Color.clear;
					}
				}
			}
			val.SetPixels(array);
			((Texture)val).wrapMode = (TextureWrapMode)1;
			val.Apply();
			return val;
		}

		private Texture2D MakeCircleTexture(int size, Color color)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(size, size, (TextureFormat)4, false);
			Color[] array = (Color[])(object)new Color[size * size];
			float num = (float)size / 2f;
			for (int i = 0; i < size; i++)
			{
				for (int j = 0; j < size; j++)
				{
					float num2 = (float)j + 0.5f - num;
					float num3 = (float)i + 0.5f - num;
					float num4 = Mathf.Sqrt(num2 * num2 + num3 * num3);
					if (num4 <= num - 0.5f)
					{
						array[i * size + j] = color;
					}
					else if (num4 <= num + 0.5f)
					{
						float num5 = Mathf.Clamp01(num + 0.5f - num4);
						Color val2 = color;
						val2.a *= num5;
						array[i * size + j] = val2;
					}
					else
					{
						array[i * size + j] = Color.clear;
					}
				}
			}
			val.SetPixels(array);
			((Texture)val).wrapMode = (TextureWrapMode)1;
			val.Apply();
			return val;
		}

		private Texture2D MakeMonochromeBox(int width, int height, Color bg, Color border, Color topHighlight, int borderThickness)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Expected O, but got Unknown
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: 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)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			Texture2D val = new Texture2D(width, height, (TextureFormat)4, false);
			Color[] array = (Color[])(object)new Color[width * height];
			for (int i = 0; i < height; i++)
			{
				for (int j = 0; j < width; j++)
				{
					bool num = j < borderThickness || j >= width - borderThickness || i < borderThickness || i >= height - borderThickness;
					bool flag = i >= height - borderThickness - 1 && i < height - borderThickness && j >= borderThickness && j < width - borderThickness;
					if (num)
					{
						array[i * width + j] = border;
						continue;
					}
					if (flag)
					{
						array[i * width + j] = Color.Lerp(bg, topHighlight, 0.6f);
						continue;
					}
					float num2 = (float)i / (float)height;
					Color val2 = Color.Lerp(bg * 0.94f, bg * 1.08f, num2);
					array[i * width + j] = val2;
				}
			}
			val.SetPixels(array);
			((Texture)val).wrapMode = (TextureWrapMode)1;
			val.Apply();
			return val;
		}

		private void InitStyles()
		{
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: 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_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_037e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_039c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: 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_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Unknown result type (might be due to invalid IL or missing references)
			//IL_0424: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Expected O, but got Unknown
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Expected O, but got Unknown
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0467: Expected O, but got Unknown
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_0522: Expected O, but got Unknown
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Expected O, but got Unknown
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_054e: Expected O, but got Unknown
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			//IL_0562: Expected O, but got Unknown
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: Expected O, but got Unknown
			//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c4: Expected O, but got Unknown
			//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0602: Unknown result type (might be due to invalid IL or missing references)
			//IL_060c: Expected O, but got Unknown
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0645: Expected O, but got Unknown
			//IL_064f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Expected O, but got Unknown
			//IL_0689: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cb: Expected O, but got Unknown
			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0706: Unknown result type (might be due to invalid IL or missing references)
			//IL_0710: Expected O, but got Unknown
			//IL_0743: Unknown result type (might be due to invalid IL or missing references)
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Expected O, but got Unknown
			//IL_077b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0785: Expected O, but got Unknown
			//IL_0790: Unknown result type (might be due to invalid IL or missing references)
			//IL_0797: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a1: Expected O, but got Unknown
			//IL_07d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dc: Expected O, but got Unknown
			//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f0: Expected O, but got Unknown
			//IL_084c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0861: Unknown result type (might be due to invalid IL or missing references)
			//IL_0881: Unknown result type (might be due to invalid IL or missing references)
			//IL_088c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0896: Expected O, but got Unknown
			//IL_08c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cf: Expected O, but got Unknown
			//IL_08d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e3: Expected O, but got Unknown
			//IL_0913: Unknown result type (might be due to invalid IL or missing references)
			//IL_091e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0928: Expected O, but got Unknown
			//IL_0957: Unknown result type (might be due to invalid IL or missing references)
			//IL_0961: Expected O, but got Unknown
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0975: Expected O, but got Unknown
			//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ba: Expected O, but got Unknown
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Expected O, but got Unknown
			//IL_09fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a07: Expected O, but got Unknown
			//IL_0a28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3f: Expected O, but got Unknown
			//IL_0a6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a84: Expected O, but got Unknown
			//IL_0ab7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ace: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad8: Expected O, but got Unknown
			//IL_0aff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b09: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			if ((Object)(object)_winBgTex != (Object)null)
			{
				return;
			}
			try
			{
				if ((Object)(object)GUI.skin != (Object)null && GUI.skin.FindStyle("upbutton") == null)
				{
					GUIStyle item = new GUIStyle(GUIStyle.none)
					{
						name = "upbutton"
					};
					GUIStyle item2 = new GUIStyle(GUIStyle.none)
					{
						name = "downbutton"
					};
					List<GUIStyle> list = new List<GUIStyle>(GUI.skin.customStyles);
					list.Add(item);
					list.Add(item2);
					GUI.skin.customStyles = list.ToArray();
				}
			}
			catch
			{
			}
			LoadIcon();
			Color bg = default(Color);
			((Color)(ref bg))..ctor(0.04f, 0.04f, 0.06f, 0.96f);
			Color bg2 = default(Color);
			((Color)(ref bg2))..ctor(0.09f, 0.09f, 0.12f, 0.92f);
			Color border = default(Color);
			((Color)(ref border))..ctor(0.4f, 0.42f, 0.48f, 0.45f);
			Color white = Color.white;
			Color topHighlight = default(Color);
			((Color)(ref topHighlight))..ctor(0.85f, 0.85f, 0.9f, 0.6f);
			_winBgTex = MakeMonochromeBox(16, 16, bg, border, topHighlight, 1);
			_cardBgTex = MakeMonochromeBox(16, 16, bg2, new Color(0.25f, 0.26f, 0.32f, 0.35f), new Color(0.6f, 0.6f, 0.7f, 0.25f), 1);
			_btnNormalTex = MakeMonochromeBox(16, 16, new Color(0.12f, 0.12f, 0.16f, 0.9f), new Color(0.3f, 0.32f, 0.38f, 0.5f), topHighlight, 1);
			_btnHoverTex = MakeMonochromeBox(16, 16, new Color(0.22f, 0.22f, 0.28f, 0.95f), white, white, 1);
			_btnActiveTex = MakeMonochromeBox(16, 16, white, white, white, 1);
			_tabNormalTex = MakeMonochromeBox(16, 16, new Color(0.07f, 0.07f, 0.1f, 0.8f), new Color(0.2f, 0.22f, 0.28f, 0.4f), topHighlight, 1);
			_tabActiveTex = MakeMonochromeBox(16, 16, new Color(0.95f, 0.95f, 0.98f, 1f), white, white, 1);
			_accentBadgeTex = MakeMonochromeBox(16, 16, new Color(0.2f, 0.22f, 0.28f, 0.9f), border, white, 1);
			_switchTrackOnTex = MakePillTexture(50, 24, new Color(0.92f, 0.94f, 0.98f, 1f), Color.white, 1f);
			_switchTrackOffTex = MakePillTexture(50, 24, new Color(0.1f, 0.1f, 0.14f, 0.95f), new Color(0.35f, 0.38f, 0.45f, 0.8f), 1.5f);
			_switchKnobOnTex = MakeCircleTexture(18, new Color(0.06f, 0.06f, 0.08f, 1f));
			_switchKnobOffTex = MakeCircleTexture(18, new Color(0.9f, 0.92f, 0.96f, 1f));
			_switchOnTex = MakeMonochromeBox(16, 16, white, white, white, 1);
			_switchOffTex = MakeMonochromeBox(16, 16, new Color(0.12f, 0.12f, 0.16f, 0.9f), new Color(0.35f, 0.38f, 0.45f, 0.6f), topHighlight, 1);
			_scrollBgTex = MakeMonochromeBox(8, 8, new Color(0.02f, 0.02f, 0.04f, 0.6f), Color.clear, Color.clear, 0);
			_scrollThumbTex = MakeMonochromeBox(8, 8, new Color(0.3f, 0.32f, 0.38f, 0.8f), new Color(0.5f, 0.52f, 0.6f, 0.85f), topHighlight, 1);
			_scrollThumbHoverTex = MakeMonochromeBox(8, 8, white, white, white, 1);
			_winStyle = new GUIStyle();
			_winStyle.border = new RectOffset(4, 4, 4, 4);
			_winStyle.padding = new RectOffset(16, 16, 14, 14);
			_winStyle.normal.background = _winBgTex;
			_winStyle.hover.background = _winBgTex;
			_winStyle.active.background = _winBgTex;
			_winStyle.focused.background = _winBgTex;
			_winStyle.onNormal.background = _winBgTex;
			_winStyle.onHover.background = _winBgTex;
			_winStyle.onActive.background = _winBgTex;
			_winStyle.onFocused.background = _winBgTex;
			_cardStyle = new GUIStyle();
			_cardStyle.border = new RectOffset(4, 4, 4, 4);
			_cardStyle.padding = new RectOffset(14, 14, 12, 12);
			_cardStyle.margin = new RectOffset(0, 0, 6, 8);
			_cardStyle.normal.background = _cardBgTex;
			_titleStyle = new GUIStyle();
			_titleStyle.fontSize = 16;
			_titleStyle.fontStyle = (FontStyle)1;
			_titleStyle.alignment = (TextAnchor)3;
			_titleStyle.normal.textColor = white;
			_subTitleStyle = new GUIStyle();
			_subTitleStyle.fontSize = 10;
			_subTitleStyle.alignment = (TextAnchor)3;
			_subTitleStyle.normal.textColor = new Color(0.7f, 0.72f, 0.78f);
			_tabStyle = new GUIStyle();
			_tabStyle.fontSize = 12;
			_tabStyle.fontStyle = (FontStyle)1;
			_tabStyle.alignment = (TextAnchor)4;
			_tabStyle.border = new RectOffset(4, 4, 4, 4);
			_tabStyle.padding = new RectOffset(8, 8, 6, 6);
			_tabStyle.normal.background = _tabNormalTex;
			_tabStyle.normal.textColor = new Color(0.75f, 0.78f, 0.85f);
			_tabStyle.hover.background = _btnHoverTex;
			_tabStyle.hover.textColor = white;
			_tabActiveStyle = new GUIStyle(_tabStyle);
			_tabActiveStyle.normal.background = _tabActiveTex;
			_tabActiveStyle.normal.textColor = new Color(0.05f, 0.05f, 0.08f);
			_labelStyle = new GUIStyle();
			_labelStyle.fontSize = 12;
			_labelStyle.alignment = (TextAnchor)3;
			_labelStyle.normal.textColor = new Color(0.92f, 0.94f, 0.98f);
			_sectionHeaderStyle = new GUIStyle();
			_sectionHeaderStyle.fontSize = 12;
			_sectionHeaderStyle.fontStyle = (FontStyle)1;
			_sectionHeaderStyle.margin = new RectOffset(0, 0, 4, 6);
			_sectionHeaderStyle.normal.textColor = white;
			_btnStyle = new GUIStyle();
			_btnStyle.fontSize = 12;
			_btnStyle.fontStyle = (FontStyle)1;
			_btnStyle.alignment = (TextAnchor)4;
			_btnStyle.padding = new RectOffset(10, 10, 6, 6);
			_btnStyle.border = new RectOffset(4, 4, 4, 4);
			_btnStyle.normal.background = _btnNormalTex;
			_btnStyle.hover.background = _btnHoverTex;
			_btnStyle.active.background = _btnActiveTex;
			_btnStyle.normal.textColor = new Color(0.92f, 0.94f, 0.98f);
			_btnStyle.hover.textColor = white;
			_btnStyle.active.textColor = new Color(0.05f, 0.05f, 0.08f);
			_switchOnStyle = new GUIStyle();
			_switchOnStyle.fontSize = 11;
			_switchOnStyle.fontStyle = (FontStyle)1;
			_switchOnStyle.alignment = (TextAnchor)4;
			_switchOnStyle.border = new RectOffset(4, 4, 4, 4);
			_switchOnStyle.padding = new RectOffset(6, 6, 3, 3);
			_switchOnStyle.normal.background = _switchOnTex;
			_switchOnStyle.normal.textColor = new Color(0.05f, 0.05f, 0.08f);
			_switchOffStyle = new GUIStyle();
			_switchOffStyle.fontSize = 11;
			_switchOffStyle.fontStyle = (FontStyle)1;
			_switchOffStyle.alignment = (TextAnchor)4;
			_switchOffStyle.border = new RectOffset(4, 4, 4, 4);
			_switchOffStyle.padding = new RectOffset(6, 6, 3, 3);
			_switchOffStyle.normal.background = _switchOffTex;
			_switchOffStyle.normal.textColor = new Color(0.65f, 0.68f, 0.75f);
			_badgeStyle = new GUIStyle();
			_badgeStyle.fontStyle = (FontStyle)1;
			_badgeStyle.fontSize = 11;
			_badgeStyle.alignment = (TextAnchor)4;
			_badgeStyle.border = new RectOffset(4, 4, 4, 4);
			_badgeStyle.padding = new RectOffset(6, 6, 2, 2);
			_badgeStyle.normal.background = _accentBadgeTex;
			_badgeStyle.normal.textColor = white;
			_goldBadgeStyle = new GUIStyle(_badgeStyle);
			_goldBadgeStyle.normal.background = _tabActiveTex;
			_goldBadgeStyle.normal.textColor = new Color(0.05f, 0.05f, 0.08f);
			_gripStyle = new GUIStyle();
			_gripStyle.fontSize = 14;
			_gripStyle.fontStyle = (FontStyle)1;
			_gripStyle.normal.textColor = new Color(0.5f, 0.52f, 0.6f);
			_gripStyle.alignment = (TextAnchor)8;
			_scrollBarStyle = new GUIStyle();
			_scrollBarStyle.normal.background = _scrollBgTex;
			_scrollBarStyle.fixedWidth = 6f;
			_scrollThumbStyle = new GUIStyle();
			_scrollThumbStyle.normal.background = _scrollThumbTex;
			_scrollThumbStyle.hover.background = _scrollThumbHoverTex;
			_scrollThumbStyle.fixedWidth = 6f;
		}

		private bool DrawToggleSwitch(string label, bool currentValue)
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
			GUILayout.Space(3f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(label, _labelStyle, Array.Empty<GUILayoutOption>());
			GUILayout.FlexibleSpace();
			Rect rect = GUILayoutUtility.GetRect(50f, 24f, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(50f),
				GUILayout.Height(24f)
			});
			Event current = Event.current;
			if ((int)current.type == 0 && ((Rect)(ref rect)).Contains(current.mousePosition))
			{
				currentValue = !currentValue;
				current.Use();
			}
			GUI.DrawTexture(rect, (Texture)(object)(currentValue ? _switchTrackOnTex : _switchTrackOffTex));
			float num = 18f;
			float num2 = ((Rect)(ref rect)).y + (((Rect)(ref rect)).height - num) / 2f;
			float num3 = (currentValue ? (((Rect)(ref rect)).x + ((Rect)(ref rect)).width - num - 3f) : (((Rect)(ref rect)).x + 3f));
			GUI.DrawTexture(new Rect(num3, num2, num, num), (Texture)(object)(currentValue ? _switchKnobOnTex : _switchKnobOffTex));
			GUILayout.EndHorizontal();
			return currentValue;
		}

		private float DrawSlider(string label, float value, float min, float max, string format = "{0:F2}x")
		{
			GUILayout.Space(3f);
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(label, _labelStyle, Array.Empty<GUILayoutOption>());
			GUILayout.FlexibleSpace();
			GUILayout.Box(string.Format(format, value), _badgeStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(66f),
				GUILayout.Height(22f)
			});
			GUILayout.EndHorizontal();
			return GUILayout.HorizontalSlider(value, min, max, Array.Empty<GUILayoutOption>());
		}

		private void OnGUI()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			InitStyles();
			if (_showMenu)
			{
				GUI.depth = -9999;
				_windowRect = GUI.Window(99214, _windowRect, new WindowFunction(DrawMenuWindow), "", _winStyle);
				HandleResize();
			}
		}

		private void HandleResize()
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Invalid comparison between Unknown and I4
			//IL_005c: 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)
			//IL_00c9: Invalid comparison between Unknown and I4
			//IL_0071: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			Event current = Event.current;
			Rect val = default(Rect);
			((Rect)(ref val))..ctor(((Rect)(ref _windowRect)).x + ((Rect)(ref _windowRect)).width - 24f, ((Rect)(ref _windowRect)).y + ((Rect)(ref _windowRect)).height - 24f, 24f, 24f);
			if ((int)current.type == 0 && ((Rect)(ref val)).Contains(current.mousePosition))
			{
				_isResizing = true;
				_resizeStartMouse = current.mousePosition;
				_resizeStartSize = new Vector2(((Rect)(ref _windowRect)).width, ((Rect)(ref _windowRect)).height);
				current.Use();
			}
			else if ((int)current.type == 1 && _isResizing)
			{
				_isResizing = false;
				current.Use();
			}
			else if ((int)current.type == 3 && _isResizing)
			{
				float width = Mathf.Clamp(_resizeStartSize.x + (current.mousePosition.x - _resizeStartMouse.x), 520f, 1100f);
				float height = Mathf.Clamp(_resizeStartSize.y + (current.mousePosition.y - _resizeStartMouse.y), 450f, 1000f);
				((Rect)(ref _windowRect)).width = width;
				((Rect)(ref _windowRect)).height = height;
				current.Use();
			}
		}

		private void DrawMenuWindow(int id)
		{
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			if ((Object)(object)_modIcon != (Object)null)
			{
				GUILayout.Label((Texture)(object)_modIcon, (GUILayoutOption[])(object)new GUILayoutOption[2]
				{
					GUILayout.Width(34f),
					GUILayout.Height(34f)
				});
				GUILayout.Space(6f);
			}
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
			GUILayout.Label("SCORE ALWAYS", _titleStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label("v1.0.10", _subTitleStyle, Array.Empty<GUILayoutOption>());
			GUILayout.EndVertical();
			GUILayout.FlexibleSpace();
			if (GUILayout.Button(IsRussian ? "RU" : "EN", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(44f),
				GUILayout.Height(26f)
			}))
			{
				SelectedLanguage.Value = ((!IsRussian) ? ModLanguage.Russian : ModLanguage.English);
			}
			if (GUILayout.Button("X", _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(30f),
				GUILayout.Height(26f)
			}))
			{
				_showMenu = false;
				Cursor.visible = false;
				Cursor.lockState = (CursorLockMode)1;
			}
			GUILayout.EndHorizontal();
			GUILayout.Space(8f);
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			int activeCount;
			float num = CalculateConfiguredMultiplier(out activeCount);
			float num2 = (num - 1f) * 100f;
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(string.Format(T("TOTAL MULTIPLIER: x{0:F2} (+{1:F0}%)", "ИТОГОВЫЙ МНОЖИТЕЛЬ: x{0:F2} (+{1:F0}%)"), num, num2), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.FlexibleSpace();
			GUILayout.Box(string.Format(T("{0} BONUSES ACTIVE", "{0} БОНУСОВ"), activeCount), _goldBadgeStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) });
			GUILayout.EndHorizontal();
			GUILayout.EndVertical();
			string[] array = new string[4]
			{
				T("[Trickshots]", "[Трюкшоты]"),
				T("[Multipliers]", "[Множители]"),
				T("[Presets]", "[Пресеты]"),
				T("[Settings]", "[Настройки]")
			};
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			for (int i = 0; i < array.Length; i++)
			{
				if (GUILayout.Button(array[i], (_currentTab == i) ? _tabActiveStyle : _tabStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }))
				{
					_currentTab = i;
				}
			}
			GUILayout.EndHorizontal();
			GUILayout.Space(6f);
			_scrollPos = GUILayout.BeginScrollView(_scrollPos, Array.Empty<GUILayoutOption>());
			if (_currentTab == 0)
			{
				DrawTrickshotsTab();
			}
			else if (_currentTab == 1)
			{
				DrawMultipliersTab();
			}
			else if (_currentTab == 2)
			{
				DrawPresetsTab();
			}
			else if (_currentTab == 3)
			{
				DrawSettingsTab();
			}
			GUILayout.EndScrollView();
			GUI.Label(new Rect(((Rect)(ref _windowRect)).width - 24f, ((Rect)(ref _windowRect)).height - 20f, 20f, 20f), "//", _gripStyle);
			GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref _windowRect)).width - 90f, 42f));
		}

		private void DrawTrickshotsTab()
		{
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("PERMANENT TRICKSHOT ACTIVATION", "ПОСТОЯННЫЕ ТРЮКШОТЫ"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("Enable any bonus to force it automatically on every kill, regardless of how you shoot.", "Включите любой бонус, чтобы он начислялся при каждом обычном выстреле."), _subTitleStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(6f);
			ForceAllBonuses.Value = DrawToggleSwitch(T("FORCE ALL 17 BONUSES AT ONCE", "ВКЛЮЧИТЬ ВСЕ 17 БОНУСОВ СРАЗУ"), ForceAllBonuses.Value);
			GUILayout.EndVertical();
			if (ForceAllBonuses.Value)
			{
				return;
			}
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("INDIVIDUAL TRICKSHOT TOGGLES", "ВЫБОР КОНКРЕТНЫХ ТРЮКОВ"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(4f);
			foreach (TrickshotDef definition in Definitions)
			{
				string label = $"{(IsRussian ? definition.NameRu : definition.NameEn)} ({definition.MultiplierConfig.Value:F2}x)";
				definition.ForceConfig.Value = DrawToggleSwitch(label, definition.ForceConfig.Value);
			}
			GUILayout.EndVertical();
		}

		private void DrawMultipliersTab()
		{
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("CUSTOM MULTIPLIER OVERRIDES", "НАСТРОЙКА СИЛЫ МНОЖИТЕЛЕЙ"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("Adjust the exact payout multiplier boost for each trickshot (1.0x to 10.0x).", "Настройте множитель выплаты за каждый отдельный трюк (от 1.0x до 10.0x)."), _subTitleStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(6f);
			MasterMultiplier.Value = DrawSlider(T("Master Style Multiplier (Global)", "Мастер-множитель стиля (Глобальный)"), MasterMultiplier.Value, 1f, 20f, "x{0:F2}");
			GUILayout.EndVertical();
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("INDIVIDUAL BONUS MULTIPLIERS", "МНОЖИТЕЛИ ПО ТРЮКАМ"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(4f);
			foreach (TrickshotDef definition in Definitions)
			{
				string label = $"{(IsRussian ? definition.NameRu : definition.NameEn)} [{(IsRussian ? definition.DescRu : definition.DescEn)}]";
				definition.MultiplierConfig.Value = DrawSlider(label, definition.MultiplierConfig.Value, 1f, 10f, "x{0:F2}");
			}
			GUILayout.EndVertical();
		}

		private void DrawPresetsTab()
		{
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("INSTANT TRICKSHOT PRESETS", "БЫСТРЫЕ ПРЕСЕТЫ В 1 КЛИК"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("Click any preset to apply curated modifier combinations instantly.", "Нажмите на пресет для мгновенного применения набора модификаторов."), _subTitleStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(8f);
			if (GUILayout.Button(T("[FORCE ALL BONUSES (x50+ MEME COMBO)]", "[ВКЛЮЧИТЬ ВСЕ 17 БОНУСОВ (МЕГА-КОМБО)]"), _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) }))
			{
				ForceAllBonuses.Value = true;
			}
			GUILayout.Space(4f);
			if (GUILayout.Button(T("[TRICKSHOT KING (360 + NoScope + Dogfight + Headshot)]", "[КОРОЛЬ ТРЮКШОТОВ (360 + NoScope + Dogfight + Headshot)]"), _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) }))
			{
				ForceAllBonuses.Value = false;
				ResetAllToggles(val: false);
				SetToggle("ThreeSixty", val: true);
				SetToggle("NoScope", val: true);
				SetToggle("Dogfight", val: true);
				SetToggle("Headshot", val: true);
				SetToggle("Longshot", val: true);
				SetToggle("Impressive", val: true);
			}
			GUILayout.Space(4f);
			if (GUILayout.Button(T("[SNIPER ELITE (NoScope + Headshot + OneShot + Longshot)]", "[ЭЛИТНЫЙ СНАЙПЕР (NoScope + Headshot + OneShot + Longshot)]"), _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) }))
			{
				ForceAllBonuses.Value = false;
				ResetAllToggles(val: false);
				SetToggle("NoScope", val: true);
				SetToggle("Headshot", val: true);
				SetToggle("OneShotOneKill", val: true);
				SetToggle("Longshot", val: true);
			}
			GUILayout.Space(4f);
			if (GUILayout.Button(T("[VANILLA RESET (Default Game Multipliers)]", "[СБРОС ДО СТАНДАРТА (Оригинальная игра)]"), _btnStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(34f) }))
			{
				ForceAllBonuses.Value = false;
				ResetAllToggles(val: false);
				MasterMultiplier.Value = 1f;
				foreach (TrickshotDef definition in Definitions)
				{
					definition.MultiplierConfig.Value = definition.DefaultMultiplier;
				}
			}
			GUILayout.EndVertical();
		}

		private void DrawSettingsTab()
		{
			GUILayout.BeginVertical(_cardStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Label(T("GENERAL SETTINGS", "ОСНОВНЫЕ НАСТРОЙКИ"), _sectionHeaderStyle, Array.Empty<GUILayoutOption>());
			GUILayout.Space(6f);
			ModEnabled.Value = DrawToggleSwitch(T("ScoreAlways Enabled", "Мод ScoreAlways активен"), ModEnabled.Value);
			GUILayout.EndVertical();
		}

		private void SetToggle(string id, bool val)
		{
			TrickshotDef trickshotDef = Definitions.FirstOrDefault((TrickshotDef x) => x.Id == id);
			if (trickshotDef != null)
			{
				trickshotDef.ForceConfig.Value = val;
			}
		}

		private void ResetAllToggles(bool val)
		{
			foreach (TrickshotDef definition in Definitions)
			{
				definition.ForceConfig.Value = val;
			}
		}
	}
	[HarmonyPatch(typeof(KillScoreCalculator), "GetRangedBonuses")]
	public static class KSC_GetRangedBonuses_Patch
	{
		public static void Postfix(ref List<Bonus> __result)
		{
			__result = ScoreAlwaysPlugin.ProcessBonuses(__result);
		}
	}
	[HarmonyPatch(typeof(KillScoreCalculator), "GetMeleeBonuses")]
	public static class KSC_GetMeleeBonuses_Patch
	{
		public static void Postfix(ref List<Bonus> __result)
		{
			__result = ScoreAlwaysPlugin.ProcessBonuses(__result);
		}
	}
	[HarmonyPatch(typeof(KillScoreCalculator), "GetExplosionBonuses")]
	public static class KSC_GetExplosionBonuses_Patch
	{
		public static void Postfix(ref List<Bonus> __result)
		{
			__result = ScoreAlwaysPlugin.ProcessBonuses(__result);
		}
	}
	[HarmonyPatch(typeof(KillScoreCalculator), "GetRangedPlayerBonuses")]
	public static class KSC_GetRangedPlayerBonuses_Patch
	{
		public static void Postfix(ref List<Bonus> __result)
		{
			__result = ScoreAlwaysPlugin.ProcessBonuses(__result);
		}
	}
	[HarmonyPatch(typeof(KillScoreCalculator), "GetMeleePlayerBonuses")]
	public static class KSC_GetMeleePlayerBonuses_Patch
	{
		public static void Postfix(ref List<Bonus> __result)
		{
			__result = ScoreAlwaysPlugin.ProcessBonuses(__result);
		}
	}
	[HarmonyPatch(typeof(PlayerCamera), "Update")]
	public static class SA_PlayerCamera_Update_Patch
	{
		public static void Postfix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				Cursor.visible = true;
				Cursor.lockState = (CursorLockMode)0;
			}
		}
	}
	[HarmonyPatch(typeof(PlayerCamera), "ToggleMouse")]
	public static class SA_PlayerCamera_ToggleMouse_Patch
	{
		public static bool Prefix(ref bool unlock)
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				unlock = true;
				Cursor.visible = true;
				Cursor.lockState = (CursorLockMode)0;
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerCamera), "MouseInput")]
	public static class SA_PlayerCamera_MouseInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerInventory), "ScrollSlotInput")]
	public static class SA_PlayerInventory_ScrollSlotInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerHolding), "PrimaryInput")]
	public static class SA_PlayerHolding_PrimaryInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerHolding), "SecondaryInput")]
	public static class SA_PlayerHolding_SecondaryInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(PlayerPunching), "PunchInput")]
	public static class SA_PlayerPunching_PunchInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(FishingRod), "PrimaryInput")]
	public static class SA_FishingRod_PrimaryInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(FishingRod), "SecondaryInput")]
	public static class SA_FishingRod_SecondaryInput_Patch
	{
		public static bool Prefix()
		{
			if (ScoreAlwaysPlugin.IsMenuOpen)
			{
				return false;
			}
			return true;
		}
	}
}