Decompiled source of NexusRoles v5.0.0

plugins/NexusRoles.Plugin.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using ExitGames.Client.Photon;
using HarmonyLib;
using MenuLib;
using Microsoft.CodeAnalysis;
using NexusRoles.API;
using NexusRoles.Roles;
using NexusRoles.Roles.Patches;
using Photon.Pun;
using Photon.Realtime;
using REPOLib;
using REPOLib.Modules;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NexusRoles")]
[assembly: AssemblyDescription("Role mod for R.E.P.O., maintained as NexusRoles.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Stanis12; Théo Hay; GangDesNuages")]
[assembly: AssemblyProduct("NexusRoles")]
[assembly: AssemblyCopyright("")]
[assembly: ComVisible(false)]
[assembly: Guid("b55829e7-8346-4258-b5db-23566f7af06b")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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]
	[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;
		}
	}
}
namespace NexusRoles
{
	internal static class NexusLocalization
	{
		private enum Language
		{
			English,
			Russian,
			Ukrainian
		}

		private static Language CurrentLanguage
		{
			get
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				//IL_0005: 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: Invalid comparison between Unknown and I4
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Invalid comparison between Unknown and I4
				SystemLanguage systemLanguage = Application.systemLanguage;
				if ((int)systemLanguage != 30)
				{
					if ((int)systemLanguage == 38)
					{
						return Language.Ukrainian;
					}
					return Language.English;
				}
				return Language.Russian;
			}
		}

		public static string ReviveNoTarget => Text("Hold a fallen ally's head to revive them.", "Возьми в руки голову павшего союзника, чтобы воскресить его.", "Візьми в руки голову загиблого союзника, щоб воскресити його.");

		public static string ReviveNotEnoughHealth => Text("Not enough health to make the sacrifice.", "Недостаточно здоровья для жертвы.", "Недостатньо здоров’я для жертви.");

		public static string ReviveCooldown => Text("The revive ability is recharging.", "Способность воскрешения перезаряжается.", "Здібність воскресіння перезаряджається.");

		public static string ReviveSuccess => Text("Ally revived. You sacrificed ", "Союзник воскрешён. Пожертвовано здоровья: ", "Союзника воскресили. Пожертвувано здоров’я: ");

		public static string ReviveSuccessSuffix => Text(" health.", " HP.", " HP.");

		public static string Text(string english, string russian, string ukrainian)
		{
			return CurrentLanguage switch
			{
				Language.Russian => russian, 
				Language.Ukrainian => ukrainian, 
				_ => english, 
			};
		}

		public static string RoleName(int roleId)
		{
			return roleId switch
			{
				0 => Text("Random", "Случайная", "Випадкова"), 
				1 => Text("Runner", "Бегун", "Бігун"), 
				2 => Text("Tank", "Танк", "Танк"), 
				3 => Text("Gambler", "Игрок", "Гравець"), 
				4 => Text("Strongman", "Силач", "Силач"), 
				5 => Text("Ranged Looter", "Дальнобойщик", "Далекобійник"), 
				6 => Text("Athletic", "Атлет", "Атлет"), 
				7 => Text("Mage", "Маг", "Маг"), 
				8 => Text("Reaper", "Жнец", "Жнець"), 
				9 => Text("Scout", "Разведчик", "Розвідник"), 
				10 => Text("Regular", "Обычный", "Звичайний"), 
				11 => Text("Engineer", "Инженер", "Інженер"), 
				12 => Text("Acrobat", "Акробат", "Акробат"), 
				13 => Text("Savior", "Спаситель", "Рятівник"), 
				_ => Text("Random", "Случайная", "Випадкова"), 
			};
		}

		public static bool IsDefaultRoleName(int roleId, string value)
		{
			if (string.IsNullOrWhiteSpace(value))
			{
				return true;
			}
			if (!(value == RoleNameInLanguage(roleId, Language.English)) && !(value == RoleNameInLanguage(roleId, Language.Russian)))
			{
				return value == RoleNameInLanguage(roleId, Language.Ukrainian);
			}
			return true;
		}

		public static bool TryGetRoleId(string? value, out int roleId)
		{
			if (!string.IsNullOrWhiteSpace(value))
			{
				string a = value.Trim();
				for (int i = 0; i <= 13; i++)
				{
					if (string.Equals(a, RoleNameInLanguage(i, Language.English), StringComparison.OrdinalIgnoreCase) || string.Equals(a, RoleNameInLanguage(i, Language.Russian), StringComparison.OrdinalIgnoreCase) || string.Equals(a, RoleNameInLanguage(i, Language.Ukrainian), StringComparison.OrdinalIgnoreCase))
					{
						roleId = i;
						return true;
					}
				}
			}
			roleId = -1;
			return false;
		}

		public static string RoleDescription(int roleId)
		{
			return roleId switch
			{
				1 => Text("You have more stamina and run much faster than everyone else!", "У тебя больше выносливости, и ты бегаешь значительно быстрее остальных!", "Маєш більше витривалості й бігаєш значно швидше за інших!"), 
				2 => Text("You move slower, but have double health!", "Ты двигаешься медленнее, зато у тебя вдвое больше здоровья!", "Ти рухаєшся повільніше, зате маєш удвічі більше здоров’я!"), 
				3 => Text("You rolled random effects:", "Тебе выпали случайные эффекты:", "Випали випадкові ефекти:"), 
				4 => Text("You're incredibly strong!", "Ты невероятно силён!", "Ти неймовірно сильний!"), 
				5 => Text("You can reach objects from far away!", "Ты можешь доставать предметы издалека!", "Ти можеш діставати предмети здалеку!"), 
				6 => Text("You have more stamina and strength, and can jump higher!", "У тебя больше выносливости и силы, и ты выше прыгаешь!", "У тебе більше витривалості й сили, а стрибаєш ти вище!"), 
				7 => Text("Use mana to become incredibly powerful!", "Используй ману, чтобы обрести невероятную силу!", "Використовуй ману, щоб отримати неймовірну силу!"), 
				8 => Text("You grow stronger for every enemy you and your friends kill!", "За каждого врага, убитого тобой или твоими друзьями, ты становишься сильнее!", "За кожного ворога, якого вбиваєш ти або друзі, ти стаєш сильнішим!"), 
				9 => Text("Your stamina is more efficient. Press [G] to reveal nearby enemies.", "Трать выносливость эффективнее. Нажми [G], чтобы увидеть врагов поблизости.", "Витривалість витрачається ефективніше. Натисни [G], щоб побачити ворогів поблизу."), 
				10 => Text("You're just a regular Semibot. Nothing special.", "Ты обычный полубот. Ничего особенного.", "Ти звичайний напівбот. Нічого особливого."), 
				11 => Text("Recharge items by spending stamina.", "Заряжай предметы ценой выносливости.", "Заряджай предмети ціною витривалості."), 
				12 => Text("Move faster and jump higher, but have less health and strength!", "Ты быстрее и выше прыгаешь, но у тебя меньше здоровья и силы!", "Рухайся швидше й стрибай вище, але маєш менше здоров’я та сили!"), 
				13 => Text("Hold a fallen ally's head and sacrifice part or all of your health to revive them. Cooldown: 120 seconds.", "Держи голову павшего союзника и пожертвуй частью или всем здоровьем, чтобы воскресить его. Перезарядка: 120 секунд.", "Тримай голову загиблого союзника та пожертвуй частиною або всім здоров’ям, щоб воскресити його. Перезарядка: 120 секунд."), 
				_ => string.Empty, 
			};
		}

		public static bool IsDefaultRoleDescription(int roleId, string value)
		{
			if (string.IsNullOrWhiteSpace(value))
			{
				return true;
			}
			string text = RoleDescriptionInLanguage(roleId, Language.English);
			string text2 = RoleDescriptionInLanguage(roleId, Language.Russian);
			string text3 = RoleDescriptionInLanguage(roleId, Language.Ukrainian);
			if (!(value == text) && !(value == text2) && !(value == text3) && (roleId != 2 || !(value == "You walk slower but your hp is doubled!")) && (roleId != 6 || !(value == "You have more stamina, strength and can jump higher")) && (roleId != 9 || !(value == "Your stamina is more efficient and by pressing [G] you can see all enemies around you.")))
			{
				if (roleId == 11)
				{
					return value == "You can recharge Items with on charge but you lose Stamina";
				}
				return false;
			}
			return true;
		}

		public unsafe static string ContinuePrompt(KeyCode key)
		{
			return Text("Press [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "] to continue", "Нажми [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], чтобы продолжить", "Натисни [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], щоб продовжити");
		}

		public unsafe static string SaviorPrompt(KeyCode key, bool sacrificeAll, int partialPercent)
		{
			if (sacrificeAll)
			{
				return Text("Hold a fallen ally's head and press [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "] to sacrifice all your health and revive them. Cooldown: 120 seconds.", "Держи голову павшего союзника и нажми [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], чтобы пожертвовать всем здоровьем и воскресить его. Перезарядка: 120 секунд.", "Тримай голову загиблого союзника й натисни [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], щоб пожертвувати всім здоров’ям і воскресити його. Перезарядка: 120 секунд.");
			}
			return Text("Hold a fallen ally's head and press [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "] to sacrifice " + partialPercent + "% of your health and revive them. Cooldown: 120 seconds.", "Держи голову павшего союзника и нажми [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], чтобы пожертвовать " + partialPercent + "% здоровья и воскресить его. Перезарядка: 120 секунд.", "Тримай голову загиблого союзника й натисни [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "], щоб пожертвувати " + partialPercent + "% здоров’я та воскресити його. Перезарядка: 120 секунд.");
		}

		public static bool IsAllSacrifice(string value)
		{
			if (!string.Equals(value, "All", StringComparison.OrdinalIgnoreCase) && !string.Equals(value, "Всё", StringComparison.OrdinalIgnoreCase))
			{
				return string.Equals(value, "Усе", StringComparison.OrdinalIgnoreCase);
			}
			return true;
		}

		public static string ReviveCooldownRemaining(int seconds)
		{
			return Text("Revive · " + seconds + "s", "Возрождение · " + seconds + " с", "Воскресіння · " + seconds + " с");
		}

		public static string ScoutCooldownRemaining(int seconds)
		{
			return Text("Scout · " + seconds + "s", "Разведчик · " + seconds + " с", "Розвідник · " + seconds + " с");
		}

		public static string ScoutAbilityActive(int seconds)
		{
			return Text("Scout active · " + seconds + "s", "Активно · " + seconds + " с", "Активно · " + seconds + " с");
		}

		public unsafe static string ScoutReady(KeyCode key)
		{
			return Text("Scout ready · [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "]", "Разведчик готов · [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "]", "Розвідник готовий · [" + ((object)(*(KeyCode*)(&key))/*cast due to .constrained prefix*/).ToString() + "]");
		}

		public static string ReaperCooldownRemaining(int percent)
		{
			return Text("Reaper · " + percent + "%", "Жнец · " + percent + "%", "Жнець · " + percent + "%");
		}

		public static string GamblerEffect(int index, bool positive)
		{
			if (positive)
			{
				return index switch
				{
					0 => Text("you move faster", "ты двигаешься быстрее", "ти рухаєшся швидше"), 
					1 => Text("you have more stamina", "у тебя больше выносливости", "у тебе більше витривалості"), 
					2 => Text("you have more health", "у тебя больше здоровья", "у тебе більше здоров’я"), 
					3 => Text("you are stronger", "ты сильнее", "ти сильніший"), 
					_ => Text("you jump higher", "ты выше прыгаешь", "ти стрибаєш вище"), 
				};
			}
			return index switch
			{
				0 => Text("you move slower", "ты двигаешься медленнее", "ти рухаєшся повільніше"), 
				1 => Text("you have less stamina", "у тебя меньше выносливости", "у тебе менше витривалості"), 
				2 => Text("you have less health", "у тебя меньше здоровья", "у тебе менше здоров’я"), 
				3 => Text("you are weaker", "ты слабее", "ти слабший"), 
				_ => Text("you jump lower", "ты ниже прыгаешь", "ти стрибаєш нижче"), 
			};
		}

		private static string RoleNameInLanguage(int roleId, Language language)
		{
			return roleId switch
			{
				0 => Select(language, "Random", "Случайная", "Випадкова"), 
				1 => Select(language, "Runner", "Бегун", "Бігун"), 
				2 => Select(language, "Tank", "Танк", "Танк"), 
				3 => Select(language, "Gambler", "Игрок", "Гравець"), 
				4 => Select(language, "Strongman", "Силач", "Силач"), 
				5 => Select(language, "Ranged Looter", "Дальнобойщик", "Далекобійник"), 
				6 => Select(language, "Athletic", "Атлет", "Атлет"), 
				7 => Select(language, "Mage", "Маг", "Маг"), 
				8 => Select(language, "Reaper", "Жнец", "Жнець"), 
				9 => Select(language, "Scout", "Разведчик", "Розвідник"), 
				10 => Select(language, "Regular", "Обычный", "Звичайний"), 
				11 => Select(language, "Engineer", "Инженер", "Інженер"), 
				12 => Select(language, "Acrobat", "Акробат", "Акробат"), 
				13 => Select(language, "Savior", "Спаситель", "Рятівник"), 
				_ => Select(language, "Random", "Случайная", "Випадкова"), 
			};
		}

		private static string RoleDescriptionInLanguage(int roleId, Language language)
		{
			return roleId switch
			{
				1 => Select(language, "You have more stamina and run much faster than everyone else!", "У тебя больше выносливости, и ты бегаешь значительно быстрее остальных!", "Маєш більше витривалості й бігаєш значно швидше за інших!"), 
				2 => Select(language, "You move slower, but have double health!", "Ты двигаешься медленнее, зато у тебя вдвое больше здоровья!", "Ти рухаєшся повільніше, зате маєш удвічі більше здоров’я!"), 
				3 => Select(language, "You rolled random effects:", "Тебе выпали случайные эффекты:", "Випали випадкові ефекти:"), 
				4 => Select(language, "You're incredibly strong!", "Ты невероятно силён!", "Ти неймовірно сильний!"), 
				5 => Select(language, "You can reach objects from far away!", "Ты можешь доставать предметы издалека!", "Ти можеш діставати предмети здалеку!"), 
				6 => Select(language, "You have more stamina and strength, and can jump higher!", "У тебя больше выносливости и силы, и ты выше прыгаешь!", "У тебе більше витривалості й сили, а стрибаєш ти вище!"), 
				7 => Select(language, "Use mana to become incredibly powerful!", "Используй ману, чтобы обрести невероятную силу!", "Використовуй ману, щоб отримати неймовірну силу!"), 
				8 => Select(language, "You grow stronger for every enemy you and your friends kill!", "За каждого врага, убитого тобой или твоими друзьями, ты становишься сильнее!", "За кожного ворога, якого вбиваєш ти або друзі, ти стаєш сильнішим!"), 
				9 => Select(language, "Your stamina is more efficient. Press [G] to reveal nearby enemies.", "Трать выносливость эффективнее. Нажми [G], чтобы увидеть врагов поблизости.", "Витривалість витрачається ефективніше. Натисни [G], щоб побачити ворогів поблизу."), 
				10 => Select(language, "You're just a regular Semibot. Nothing special.", "Ты обычный полубот. Ничего особенного.", "Ти звичайний напівбот. Нічого особливого."), 
				11 => Select(language, "Recharge items by spending stamina.", "Заряжай предметы ценой выносливости.", "Заряджай предмети ціною витривалості."), 
				12 => Select(language, "Move faster and jump higher, but have less health and strength!", "Ты быстрее и выше прыгаешь, но у тебя меньше здоровья и силы!", "Рухайся швидше й стрибай вище, але маєш менше здоров’я та сили!"), 
				13 => Select(language, "Hold a fallen ally's head and sacrifice part or all of your health to revive them. Cooldown: 120 seconds.", "Держи голову павшего союзника и пожертвуй частью или всем здоровьем, чтобы воскресить его. Перезарядка: 120 секунд.", "Тримай голову загиблого союзника та пожертвуй частиною або всім здоров’ям, щоб воскресити його. Перезарядка: 120 секунд."), 
				_ => string.Empty, 
			};
		}

		private static string Select(Language language, string english, string russian, string ukrainian)
		{
			return language switch
			{
				Language.Russian => russian, 
				Language.Ukrainian => ukrainian, 
				_ => english, 
			};
		}
	}
	public sealed class NexusRolesConfig
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static BuilderDelegate <>9__430_0;

			public static BuilderDelegate <>9__430_1;

			internal void <RegisterMenu>b__430_0(Transform parent)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				MenuAPI.CreateREPOButton(NexusLocalization.Text("NexusRoles Settings", "Настройки NexusRoles", "Налаштування NexusRoles"), (Action)NexusRolesSettingsWindow.OpenMainSettings, parent, new Vector2(500f, 10f));
			}

			internal void <RegisterMenu>b__430_1(Transform parent)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				MenuAPI.CreateREPOButton(NexusLocalization.Text("NexusRoles Settings", "Настройки NexusRoles", "Налаштування NexusRoles"), (Action)NexusRolesSettingsWindow.OpenMainSettings, parent, new Vector2(500f, 500f));
			}
		}

		private readonly ConfigFile configFile;

		private Action? updateManaDisplay;

		private static string RandomRoleName => NexusLocalization.RoleName(0);

		private static string DefaultRoleName => NexusLocalization.RoleName(4);

		private static string[] AllRoleChoices => new string[14]
		{
			NexusLocalization.RoleName(0),
			NexusLocalization.RoleName(1),
			NexusLocalization.RoleName(2),
			NexusLocalization.RoleName(3),
			NexusLocalization.RoleName(4),
			NexusLocalization.RoleName(5),
			NexusLocalization.RoleName(6),
			NexusLocalization.RoleName(7),
			NexusLocalization.RoleName(8),
			NexusLocalization.RoleName(9),
			NexusLocalization.RoleName(10),
			NexusLocalization.RoleName(11),
			NexusLocalization.RoleName(12),
			NexusLocalization.RoleName(13)
		};

		public ConfigEntry<KeyCode> ToggleKey { get; private set; }

		public ConfigEntry<CooldownHudPosition> CooldownPosition { get; private set; }

		public ConfigEntry<CooldownHudStyle> CooldownStyle { get; private set; }

		public ConfigEntry<float> CooldownCustomX { get; private set; }

		public ConfigEntry<float> CooldownCustomY { get; private set; }

		public ConfigEntry<KeyCode> ShowSpellsKey { get; private set; }

		public ConfigEntry<KeyCode> HealKey { get; private set; }

		public ConfigEntry<KeyCode> SpeedKey { get; private set; }

		public ConfigEntry<KeyCode> OverchargeKey { get; private set; }

		public ConfigEntry<KeyCode> JumpKey { get; private set; }

		public ConfigEntry<KeyCode> StaminaKey { get; private set; }

		public ConfigEntry<KeyCode> ScoutKey { get; private set; }

		public ConfigEntry<KeyCode> ChargeItemKey { get; private set; }

		public ConfigEntry<float> RunnerSpeedMultiplier { get; private set; }

		public ConfigEntry<float> RunnerStaminaMultiplier { get; private set; }

		public ConfigEntry<float> TankHealthMultiplier { get; private set; }

		public ConfigEntry<float> TankSpeedMultiplier { get; private set; }

		public ConfigEntry<int> TankPassiveRegenAmount { get; private set; }

		public ConfigEntry<int> TankPassiveRegenIntervalSeconds { get; private set; }

		public ConfigEntry<float> GamblerPositiveSpeedMultiplier { get; private set; }

		public ConfigEntry<float> GamblerPositiveStaminaMultiplier { get; private set; }

		public ConfigEntry<float> GamblerPositiveHealthMultiplier { get; private set; }

		public ConfigEntry<float> GamblerPositiveStrengthMultiplier { get; private set; }

		public ConfigEntry<float> GamblerPositiveJumpMultiplier { get; private set; }

		public ConfigEntry<float> GamblerNegativeSpeedMultiplier { get; private set; }

		public ConfigEntry<float> GamblerNegativeStaminaMultiplier { get; private set; }

		public ConfigEntry<float> GamblerNegativeHealthMultiplier { get; private set; }

		public ConfigEntry<float> GamblerNegativeStrengthMultiplier { get; private set; }

		public ConfigEntry<float> GamblerNegativeJumpMultiplier { get; private set; }

		public ConfigEntry<float> StrongmanStrengthMultiplier { get; private set; }

		public ConfigEntry<float> StrongmanStrengthBonus { get; private set; }

		public ConfigEntry<float> RangedLooterGrabRangeMultiplier { get; private set; }

		public ConfigEntry<float> RangedLooterStrengthMultiplier { get; private set; }

		public ConfigEntry<float> AthleticStrengthMultiplier { get; private set; }

		public ConfigEntry<int> AthleticStaminaBonus { get; private set; }

		public ConfigEntry<float> AthleticJumpForceBonus { get; private set; }

		public ConfigEntry<float> ReaperHealthMultiplier { get; private set; }

		public ConfigEntry<int> ReaperMaxHealthBonusPerKill { get; private set; }

		public ConfigEntry<int> ReaperHealAmountPerKill { get; private set; }

		public ConfigEntry<int> ReaperBuffCooldownFrames { get; private set; }

		public ConfigEntry<float> ScoutStaminaMultiplier { get; private set; }

		public ConfigEntry<float> ScoutSprintRechargeMultiplier { get; private set; }

		public ConfigEntry<int> ScoutAbilityDurationSeconds { get; private set; }

		public ConfigEntry<int> ScoutAbilityCooldownSeconds { get; private set; }

		public ConfigEntry<int> MageMaxMana { get; private set; }

		public ConfigEntry<int> MageHealAmount { get; private set; }

		public ConfigEntry<float> MageSpeedMultiplier { get; private set; }

		public ConfigEntry<float> MageJumpForceBonus { get; private set; }

		public ConfigEntry<float> MageOverchargeMultiplier { get; private set; }

		public ConfigEntry<int> MageSpeedBoostDurationSeconds { get; private set; }

		public ConfigEntry<int> MageJumpBoostDurationSeconds { get; private set; }

		public ConfigEntry<int> MageOverchargeDurationSeconds { get; private set; }

		public ConfigEntry<int> EngineerChargeStaminaCost { get; private set; }

		public ConfigEntry<int> EngineerStaminaRestoreAmount { get; private set; }

		public ConfigEntry<int> EngineerStaminaRestoreIntervalSeconds { get; private set; }

		public ConfigEntry<string> CustomRoleNameRunner { get; private set; }

		public ConfigEntry<string> CustomRoleNameTank { get; private set; }

		public ConfigEntry<string> CustomRoleNameGambler { get; private set; }

		public ConfigEntry<string> CustomRoleNameStrongman { get; private set; }

		public ConfigEntry<string> CustomRoleNameRL { get; private set; }

		public ConfigEntry<string> CustomRoleNameAthletic { get; private set; }

		public ConfigEntry<string> CustomRoleNameMage { get; private set; }

		public ConfigEntry<string> CustomRoleNameReaper { get; private set; }

		public ConfigEntry<string> CustomRoleNameScout { get; private set; }

		public ConfigEntry<string> CustomRoleNameRegular { get; private set; }

		public ConfigEntry<string> CustomRoleNameEngineer { get; private set; }

		public ConfigEntry<string> CustomRoleDecRunner { get; private set; }

		public ConfigEntry<string> CustomRoleDecTank { get; private set; }

		public ConfigEntry<string> CustomRoleDecGambler { get; private set; }

		public ConfigEntry<string> CustomRoleDecStrongman { get; private set; }

		public ConfigEntry<string> CustomRoleDecRL { get; private set; }

		public ConfigEntry<string> CustomRoleDecAthletic { get; private set; }

		public ConfigEntry<string> CustomRoleDecMage { get; private set; }

		public ConfigEntry<string> CustomRoleDecReaper { get; private set; }

		public ConfigEntry<string> CustomRoleDecScout { get; private set; }

		public ConfigEntry<string> CustomRoleDecRegular { get; private set; }

		public ConfigEntry<string> CustomRoleDecEngineer { get; private set; }

		public ConfigEntry<string> SavedRole { get; private set; }

		public ConfigEntry<bool> EnableRoleUpgrades { get; private set; }

		public ConfigEntry<bool> AssignRoleAfterRevive { get; private set; }

		public ConfigEntry<bool> MageTopManaConf { get; private set; }

		public ConfigEntry<bool> ShowGUIAtStart { get; private set; }

		public ConfigEntry<bool> EnableRunner { get; private set; }

		public ConfigEntry<bool> EnableTank { get; private set; }

		public ConfigEntry<bool> EnableGambler { get; private set; }

		public ConfigEntry<bool> EnableStrongman { get; private set; }

		public ConfigEntry<bool> EnableRL { get; private set; }

		public ConfigEntry<bool> EnableAthletic { get; private set; }

		public ConfigEntry<bool> EnableMage { get; private set; }

		public ConfigEntry<bool> EnableReaper { get; private set; }

		public ConfigEntry<bool> EnableScout { get; private set; }

		public ConfigEntry<bool> EnableRegular { get; private set; }

		public ConfigEntry<bool> EnableEngineer { get; private set; }

		public ConfigEntry<bool> EnableAcrobat { get; private set; }

		public ConfigEntry<bool> EnableSavior { get; private set; }

		public ConfigEntry<float> AcrobatHealthMultiplier { get; private set; }

		public ConfigEntry<float> AcrobatStrengthMultiplier { get; private set; }

		public ConfigEntry<float> AcrobatSpeedMultiplier { get; private set; }

		public ConfigEntry<float> AcrobatJumpForceBonus { get; private set; }

		public ConfigEntry<KeyCode> SaviorKey { get; private set; }

		public ConfigEntry<string> SaviorSacrificeMode { get; private set; }

		public ConfigEntry<int> SaviorPartialCostPercent { get; private set; }

		public ConfigEntry<int> SaviorReviveHealth { get; private set; }

		public bool AfterDeathNewRole => AssignRoleAfterRevive.Value;

		public bool MageTopManaTop => MageTopManaConf.Value;

		public string ChosenRoleName => GetSelectableRoleName(SavedRole.Value);

		public NexusRolesConfig(ConfigFile configFile)
		{
			this.configFile = configFile;
		}

		public string GetRoleDisplayName(int roleId)
		{
			ConfigEntry<string> val = (ConfigEntry<string>)(roleId switch
			{
				1 => CustomRoleNameRunner, 
				2 => CustomRoleNameTank, 
				3 => CustomRoleNameGambler, 
				4 => CustomRoleNameStrongman, 
				5 => CustomRoleNameRL, 
				6 => CustomRoleNameAthletic, 
				7 => CustomRoleNameMage, 
				8 => CustomRoleNameReaper, 
				9 => CustomRoleNameScout, 
				10 => CustomRoleNameRegular, 
				11 => CustomRoleNameEngineer, 
				_ => null, 
			});
			if (val == null || NexusLocalization.IsDefaultRoleName(roleId, val.Value))
			{
				return NexusLocalization.RoleName(roleId);
			}
			return val.Value;
		}

		public string GetRoleDescription(int roleId)
		{
			ConfigEntry<string> val = (ConfigEntry<string>)(roleId switch
			{
				1 => CustomRoleDecRunner, 
				2 => CustomRoleDecTank, 
				3 => CustomRoleDecGambler, 
				4 => CustomRoleDecStrongman, 
				5 => CustomRoleDecRL, 
				6 => CustomRoleDecAthletic, 
				7 => CustomRoleDecMage, 
				8 => CustomRoleDecReaper, 
				9 => CustomRoleDecScout, 
				10 => CustomRoleDecRegular, 
				11 => CustomRoleDecEngineer, 
				_ => null, 
			});
			if (val == null || NexusLocalization.IsDefaultRoleDescription(roleId, val.Value))
			{
				return NexusLocalization.RoleDescription(roleId);
			}
			return val.Value;
		}

		public void Bind()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0048: Expected O, but got Unknown
			//IL_005e: 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_0088: Expected O, but got Unknown
			//IL_0088: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Expected O, but got Unknown
			//IL_00c8: Expected O, but got Unknown
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Expected O, but got Unknown
			//IL_0108: Expected O, but got Unknown
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Expected O, but got Unknown
			//IL_0148: Expected O, but got Unknown
			//IL_015e: 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_0188: Expected O, but got Unknown
			//IL_0188: Expected O, but got Unknown
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Expected O, but got Unknown
			//IL_01c8: Expected O, but got Unknown
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Expected O, but got Unknown
			//IL_0208: Expected O, but got Unknown
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Expected O, but got Unknown
			//IL_0248: Expected O, but got Unknown
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Expected O, but got Unknown
			//IL_0288: Expected O, but got Unknown
			//IL_029e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Expected O, but got Unknown
			//IL_02c8: Expected O, but got Unknown
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Expected O, but got Unknown
			//IL_0308: Expected O, but got Unknown
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Expected O, but got Unknown
			//IL_0348: Expected O, but got Unknown
			//IL_035e: 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_0388: Expected O, but got Unknown
			//IL_0388: Expected O, but got Unknown
			//IL_039e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Expected O, but got Unknown
			//IL_03c8: Expected O, but got Unknown
			//IL_03de: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Expected O, but got Unknown
			//IL_0408: Expected O, but got Unknown
			//IL_041e: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Expected O, but got Unknown
			//IL_0448: Expected O, but got Unknown
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Expected O, but got Unknown
			//IL_0488: Expected O, but got Unknown
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ba: Expected O, but got Unknown
			//IL_04ba: Expected O, but got Unknown
			//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Expected O, but got Unknown
			//IL_04fa: Expected O, but got Unknown
			//IL_0510: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Unknown result type (might be due to invalid IL or missing references)
			//IL_053a: Expected O, but got Unknown
			//IL_053a: Expected O, but got Unknown
			//IL_0550: Unknown result type (might be due to invalid IL or missing references)
			//IL_0573: Unknown result type (might be due to invalid IL or missing references)
			//IL_057d: Expected O, but got Unknown
			//IL_057d: Expected O, but got Unknown
			//IL_0593: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c0: Expected O, but got Unknown
			//IL_05c0: Expected O, but got Unknown
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f2: Expected O, but got Unknown
			//IL_05f2: Expected O, but got Unknown
			//IL_0608: Unknown result type (might be due to invalid IL or missing references)
			//IL_061a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0624: Expected O, but got Unknown
			//IL_0624: Expected O, but got Unknown
			//IL_063a: Unknown result type (might be due to invalid IL or missing references)
			//IL_064c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0656: Expected O, but got Unknown
			//IL_0656: Expected O, but got Unknown
			//IL_066c: Unknown result type (might be due to invalid IL or missing references)
			//IL_067e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0688: Expected O, but got Unknown
			//IL_0688: Expected O, but got Unknown
			//IL_069e: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ba: Expected O, but got Unknown
			//IL_06ba: Expected O, but got Unknown
			//IL_06d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Expected O, but got Unknown
			//IL_06ec: Expected O, but got Unknown
			//IL_0702: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_071e: Expected O, but got Unknown
			//IL_071e: Expected O, but got Unknown
			//IL_0734: Unknown result type (might be due to invalid IL or missing references)
			//IL_0746: Unknown result type (might be due to invalid IL or missing references)
			//IL_0750: Expected O, but got Unknown
			//IL_0750: Expected O, but got Unknown
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_0791: Expected O, but got Unknown
			//IL_0791: Expected O, but got Unknown
			//IL_079c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a3: Invalid comparison between Unknown and I4
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_082e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0838: Expected O, but got Unknown
			//IL_0838: Expected O, but got Unknown
			//IL_08aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08dd: Expected O, but got Unknown
			//IL_08dd: Expected O, but got Unknown
			//IL_08f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_091b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0925: Expected O, but got Unknown
			//IL_0925: Expected O, but got Unknown
			//IL_093b: Unknown result type (might be due to invalid IL or missing references)
			//IL_095e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0968: Expected O, but got Unknown
			//IL_0968: Expected O, but got Unknown
			//IL_097e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ab: Expected O, but got Unknown
			//IL_09ab: Expected O, but got Unknown
			//IL_09c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Expected O, but got Unknown
			//IL_09ee: Expected O, but got Unknown
			//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a31: Expected O, but got Unknown
			//IL_0a31: Expected O, but got Unknown
			//IL_0a47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a69: Expected O, but got Unknown
			//IL_0a69: Expected O, but got Unknown
			//IL_0a7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa4: Expected O, but got Unknown
			//IL_0aa4: Expected O, but got Unknown
			//IL_0aba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0add: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae7: Expected O, but got Unknown
			//IL_0ae7: Expected O, but got Unknown
			//IL_0afd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2a: Expected O, but got Unknown
			//IL_0b2a: Expected O, but got Unknown
			//IL_0b40: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b63: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b6d: Expected O, but got Unknown
			//IL_0b6d: Expected O, but got Unknown
			//IL_0b83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb0: Expected O, but got Unknown
			//IL_0bb0: Expected O, but got Unknown
			//IL_0bc6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf3: Expected O, but got Unknown
			//IL_0bf3: Expected O, but got Unknown
			//IL_0c09: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c36: Expected O, but got Unknown
			//IL_0c36: Expected O, but got Unknown
			//IL_0c4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c79: Expected O, but got Unknown
			//IL_0c79: Expected O, but got Unknown
			//IL_0c8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbc: Expected O, but got Unknown
			//IL_0cbc: Expected O, but got Unknown
			//IL_0cd2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cff: Expected O, but got Unknown
			//IL_0cff: Expected O, but got Unknown
			//IL_0d15: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d38: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d42: Expected O, but got Unknown
			//IL_0d42: Expected O, but got Unknown
			//IL_0d58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d85: Expected O, but got Unknown
			//IL_0d85: Expected O, but got Unknown
			//IL_0d9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc8: Expected O, but got Unknown
			//IL_0dc8: Expected O, but got Unknown
			//IL_0dde: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e01: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e0b: Expected O, but got Unknown
			//IL_0e0b: Expected O, but got Unknown
			//IL_0e21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e4e: Expected O, but got Unknown
			//IL_0e4e: Expected O, but got Unknown
			//IL_0e64: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e87: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e91: Expected O, but got Unknown
			//IL_0e91: Expected O, but got Unknown
			//IL_0ea7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ec3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ecd: Expected O, but got Unknown
			//IL_0ecd: Expected O, but got Unknown
			//IL_0ee3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f06: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f10: Expected O, but got Unknown
			//IL_0f10: Expected O, but got Unknown
			//IL_0f26: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f62: Expected O, but got Unknown
			//IL_0f62: Expected O, but got Unknown
			//IL_0f78: Unknown result type (might be due to invalid IL or missing references)
			//IL_0faa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fb4: Expected O, but got Unknown
			//IL_0fb4: Expected O, but got Unknown
			//IL_0fca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ffc: Unknown result type (might be due to invalid IL or missing references)
			//IL_1006: Expected O, but got Unknown
			//IL_1006: Expected O, but got Unknown
			//IL_101c: Unknown result type (might be due to invalid IL or missing references)
			//IL_104e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1058: Expected O, but got Unknown
			//IL_1058: Expected O, but got Unknown
			//IL_106e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1091: Unknown result type (might be due to invalid IL or missing references)
			//IL_109b: Expected O, but got Unknown
			//IL_109b: Expected O, but got Unknown
			//IL_10b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_10cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_10d6: Expected O, but got Unknown
			//IL_10d6: Expected O, but got Unknown
			//IL_10ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_1108: Unknown result type (might be due to invalid IL or missing references)
			//IL_1112: Expected O, but got Unknown
			//IL_1112: Expected O, but got Unknown
			//IL_1128: Unknown result type (might be due to invalid IL or missing references)
			//IL_1144: Unknown result type (might be due to invalid IL or missing references)
			//IL_114e: Expected O, but got Unknown
			//IL_114e: Expected O, but got Unknown
			//IL_1164: Unknown result type (might be due to invalid IL or missing references)
			//IL_1187: Unknown result type (might be due to invalid IL or missing references)
			//IL_1191: Expected O, but got Unknown
			//IL_1191: Expected O, but got Unknown
			//IL_11a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_11ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d4: Expected O, but got Unknown
			//IL_11d4: Expected O, but got Unknown
			//IL_11ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_1205: Unknown result type (might be due to invalid IL or missing references)
			//IL_120f: Expected O, but got Unknown
			//IL_120f: Expected O, but got Unknown
			//IL_1225: Unknown result type (might be due to invalid IL or missing references)
			//IL_1241: Unknown result type (might be due to invalid IL or missing references)
			//IL_124b: Expected O, but got Unknown
			//IL_124b: Expected O, but got Unknown
			//IL_1261: Unknown result type (might be due to invalid IL or missing references)
			//IL_1279: Unknown result type (might be due to invalid IL or missing references)
			//IL_1283: Expected O, but got Unknown
			//IL_1283: Expected O, but got Unknown
			//IL_1299: Unknown result type (might be due to invalid IL or missing references)
			//IL_12b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_12bb: Expected O, but got Unknown
			//IL_12bb: Expected O, but got Unknown
			//IL_12d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_12f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_12fe: Expected O, but got Unknown
			//IL_12fe: Expected O, but got Unknown
			//IL_1314: Unknown result type (might be due to invalid IL or missing references)
			//IL_1337: Unknown result type (might be due to invalid IL or missing references)
			//IL_1341: Expected O, but got Unknown
			//IL_1341: Expected O, but got Unknown
			//IL_1357: Unknown result type (might be due to invalid IL or missing references)
			//IL_137a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1384: Expected O, but got Unknown
			//IL_1384: Expected O, but got Unknown
			//IL_139a: Unknown result type (might be due to invalid IL or missing references)
			//IL_13b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c0: Expected O, but got Unknown
			//IL_13c0: Expected O, but got Unknown
			//IL_13d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_13f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_13fc: Expected O, but got Unknown
			//IL_13fc: Expected O, but got Unknown
			//IL_1412: Unknown result type (might be due to invalid IL or missing references)
			//IL_142e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1438: Expected O, but got Unknown
			//IL_1438: Expected O, but got Unknown
			//IL_144e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1467: Unknown result type (might be due to invalid IL or missing references)
			//IL_1471: Expected O, but got Unknown
			//IL_1471: Expected O, but got Unknown
			//IL_1487: Unknown result type (might be due to invalid IL or missing references)
			//IL_149f: Unknown result type (might be due to invalid IL or missing references)
			//IL_14a9: Expected O, but got Unknown
			//IL_14a9: Expected O, but got Unknown
			//IL_14bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_14db: Unknown result type (might be due to invalid IL or missing references)
			//IL_14e5: Expected O, but got Unknown
			//IL_14e5: Expected O, but got Unknown
			//IL_14fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_1511: Unknown result type (might be due to invalid IL or missing references)
			//IL_151b: Expected O, but got Unknown
			//IL_151b: Expected O, but got Unknown
			//IL_1531: Unknown result type (might be due to invalid IL or missing references)
			//IL_1547: Unknown result type (might be due to invalid IL or missing references)
			//IL_1551: Expected O, but got Unknown
			//IL_1551: Expected O, but got Unknown
			//IL_1567: Unknown result type (might be due to invalid IL or missing references)
			//IL_157d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1587: Expected O, but got Unknown
			//IL_1587: Expected O, but got Unknown
			//IL_159d: Unknown result type (might be due to invalid IL or missing references)
			//IL_15b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_15bd: Expected O, but got Unknown
			//IL_15bd: Expected O, but got Unknown
			//IL_15d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_15e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_15f3: Expected O, but got Unknown
			//IL_15f3: Expected O, but got Unknown
			//IL_1609: Unknown result type (might be due to invalid IL or missing references)
			//IL_161f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1629: Expected O, but got Unknown
			//IL_1629: Expected O, but got Unknown
			//IL_163f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1655: Unknown result type (might be due to invalid IL or missing references)
			//IL_165f: Expected O, but got Unknown
			//IL_165f: Expected O, but got Unknown
			//IL_1675: Unknown result type (might be due to invalid IL or missing references)
			//IL_168b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1695: Expected O, but got Unknown
			//IL_1695: Expected O, but got Unknown
			//IL_16ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_16c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_16cc: Expected O, but got Unknown
			//IL_16cc: Expected O, but got Unknown
			//IL_16e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_16f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1703: Expected O, but got Unknown
			//IL_1703: Expected O, but got Unknown
			//IL_1719: Unknown result type (might be due to invalid IL or missing references)
			//IL_1730: Unknown result type (might be due to invalid IL or missing references)
			//IL_173a: Expected O, but got Unknown
			//IL_173a: Expected O, but got Unknown
			//IL_1750: Unknown result type (might be due to invalid IL or missing references)
			//IL_1766: Unknown result type (might be due to invalid IL or missing references)
			//IL_1770: Expected O, but got Unknown
			//IL_1770: Expected O, but got Unknown
			//IL_1786: Unknown result type (might be due to invalid IL or missing references)
			//IL_179c: Unknown result type (might be due to invalid IL or missing references)
			//IL_17a6: Expected O, but got Unknown
			//IL_17a6: Expected O, but got Unknown
			//IL_17bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_17d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_17dc: Expected O, but got Unknown
			//IL_17dc: Expected O, but got Unknown
			//IL_17f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_1808: Unknown result type (might be due to invalid IL or missing references)
			//IL_1812: Expected O, but got Unknown
			//IL_1812: Expected O, but got Unknown
			//IL_1828: Unknown result type (might be due to invalid IL or missing references)
			//IL_183e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1848: Expected O, but got Unknown
			//IL_1848: Expected O, but got Unknown
			//IL_185e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1874: Unknown result type (might be due to invalid IL or missing references)
			//IL_187e: Expected O, but got Unknown
			//IL_187e: Expected O, but got Unknown
			//IL_1894: Unknown result type (might be due to invalid IL or missing references)
			//IL_18aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_18b4: Expected O, but got Unknown
			//IL_18b4: Expected O, but got Unknown
			//IL_18ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_18e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_18ea: Expected O, but got Unknown
			//IL_18ea: Expected O, but got Unknown
			//IL_1900: Unknown result type (might be due to invalid IL or missing references)
			//IL_1917: Unknown result type (might be due to invalid IL or missing references)
			//IL_1921: Expected O, but got Unknown
			//IL_1921: Expected O, but got Unknown
			//IL_1937: Unknown result type (might be due to invalid IL or missing references)
			//IL_194e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1958: Expected O, but got Unknown
			//IL_1958: Expected O, but got Unknown
			//IL_196e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1985: Unknown result type (might be due to invalid IL or missing references)
			//IL_198f: Expected O, but got Unknown
			//IL_198f: Expected O, but got Unknown
			SavedRole = configFile.Bind<string>(new ConfigDefinition("Role", "Your selected role"), DefaultRoleName, new ConfigDescription(NexusLocalization.Text("Preferred role for this player. Disabled roles temporarily act as Random.", "Предпочитаемая роль игрока. Если роль отключена, временно выбирается случайная роль.", "Бажана роль гравця. Якщо роль вимкнено, тимчасово обирається випадкова роль."), (AcceptableValueBase)(object)new AcceptableValueList<string>(AllRoleChoices), Array.Empty<object>()));
			AssignRoleAfterRevive = configFile.Bind<bool>(new ConfigDefinition("Role", "Reaasign roles after being revived"), false, new ConfigDescription(NexusLocalization.Text("When enabled, a player receives a new role after dying and being revived.", "Если включено, после смерти и воскрешения игрок получает новую роль.", "Якщо ввімкнено, після смерті та воскресіння гравець отримує нову роль."), (AcceptableValueBase)null, Array.Empty<object>()));
			MageTopManaConf = configFile.Bind<bool>(new ConfigDefinition("Role", "Place where mana is shown"), true, new ConfigDescription(NexusLocalization.Text("Controls Mage mana display placement. True shows mana at the top; false shows it beside stamina.", "Положение маны Мага: сверху или рядом с индикатором выносливости.", "Визначає позицію мани Мага: зверху або поруч з індикатором витривалості."), (AcceptableValueBase)null, Array.Empty<object>()));
			ShowGUIAtStart = configFile.Bind<bool>(new ConfigDefinition("GUI", "Show GUI when being assigned a role"), true, new ConfigDescription(NexusLocalization.Text("Shows the role information overlay when a role is assigned.", "Показывает описание роли после её назначения.", "Показує опис ролі після її призначення."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableRoleUpgrades = configFile.Bind<bool>(new ConfigDefinition("Upgrades", "Enable Role Upgrades in Shop"), true, new ConfigDescription(NexusLocalization.Text("Enables NexusRoles upgrade items in the shop.", "Добавляет предметы улучшения ролей в магазин.", "Додає предмети покращення ролей до магазину."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableRunner = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Runner"), true, new ConfigDescription(NexusLocalization.Text("Allows Runner to be selected or randomly assigned.", "Позволяет выбрать Бегуна или получить эту роль случайно.", "Дозволяє обрати Бігуна або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableTank = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Tank"), true, new ConfigDescription(NexusLocalization.Text("Allows Tank to be selected or randomly assigned.", "Позволяет выбрать Танка или получить эту роль случайно.", "Дозволяє обрати Танка або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableGambler = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Gambler"), true, new ConfigDescription(NexusLocalization.Text("Allows Gambler to be selected or randomly assigned.", "Позволяет выбрать Игрока или получить эту роль случайно.", "Дозволяє обрати Гравця або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableStrongman = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Strongman"), true, new ConfigDescription(NexusLocalization.Text("Allows Strongman to be selected or randomly assigned.", "Позволяет выбрать Силача или получить эту роль случайно.", "Дозволяє обрати Силача або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableRL = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Ranged Looter"), true, new ConfigDescription(NexusLocalization.Text("Allows Ranged Looter to be selected or randomly assigned.", "Позволяет выбрать Дальнобойщика или получить эту роль случайно.", "Дозволяє обрати Далекобійника або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableAthletic = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Athletic"), true, new ConfigDescription(NexusLocalization.Text("Allows Athletic to be selected or randomly assigned.", "Позволяет выбрать Атлета или получить эту роль случайно.", "Дозволяє обрати Атлета або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableMage = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Mage"), true, new ConfigDescription(NexusLocalization.Text("Allows Mage to be selected or randomly assigned.", "Позволяет выбрать Мага или получить эту роль случайно.", "Дозволяє обрати Мага або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableReaper = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Reaper"), true, new ConfigDescription(NexusLocalization.Text("Allows Reaper to be selected or randomly assigned.", "Позволяет выбрать Жнеца или получить эту роль случайно.", "Дозволяє обрати Жнеця або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableScout = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Scout"), true, new ConfigDescription(NexusLocalization.Text("Allows Scout to be selected or randomly assigned.", "Позволяет выбрать Разведчика или получить эту роль случайно.", "Дозволяє обрати Розвідника або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableRegular = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Regular"), true, new ConfigDescription(NexusLocalization.Text("Allows Regular to be selected or randomly assigned.", "Позволяет выбрать Обычного или получить эту роль случайно.", "Дозволяє обрати Звичайного або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableEngineer = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Engineer"), true, new ConfigDescription(NexusLocalization.Text("Allows Engineer to be selected or randomly assigned.", "Позволяет выбрать Инженера или получить эту роль случайно.", "Дозволяє обрати Інженера або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableAcrobat = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Acrobat"), true, new ConfigDescription(NexusLocalization.Text("Allows Acrobat to be selected or randomly assigned.", "Позволяет выбирать Акробата или получить эту роль случайно.", "Дозволяє обрати Акробата або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			EnableSavior = configFile.Bind<bool>(new ConfigDefinition("Role", "Enable Savior"), true, new ConfigDescription(NexusLocalization.Text("Allows Savior to be selected or randomly assigned.", "Позволяет выбирать Спасителя или получить эту роль случайно.", "Дозволяє обрати Рятівника або отримати цю роль випадково."), (AcceptableValueBase)null, Array.Empty<object>()));
			ToggleKey = configFile.Bind<KeyCode>(new ConfigDefinition("GUI", "GUI Toggle Key"), (KeyCode)114, new ConfigDescription("Key used to toggle the role information overlay.", (AcceptableValueBase)null, Array.Empty<object>()));
			CooldownPosition = configFile.Bind<CooldownHudPosition>(new ConfigDefinition("HUD", "Cooldown Position"), CooldownHudPosition.TopLeft, new ConfigDescription(NexusLocalization.Text("Screen corner for the compact role cooldown indicator.", "Угол экрана для компактного индикатора перезарядки роли.", "Кут екрана для компактного індикатора перезарядки ролі."), (AcceptableValueBase)null, Array.Empty<object>()));
			CooldownStyle = configFile.Bind<CooldownHudStyle>(new ConfigDefinition("HUD", "Cooldown Style"), CooldownHudStyle.TextAndBar, new ConfigDescription(NexusLocalization.Text("Choose whether the cooldown HUD shows text, a progress bar, or both.", "Выберите отображение текста, полосы прогресса или обоих элементов.", "Оберіть відображення тексту, смуги прогресу або обох елементів."), (AcceptableValueBase)null, Array.Empty<object>()));
			CooldownCustomX = configFile.Bind<float>(new ConfigDefinition("HUD", "Cooldown Custom X"), 0.02f, new ConfigDescription("Custom cooldown HUD horizontal position as a screen fraction.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			CooldownCustomY = configFile.Bind<float>(new ConfigDefinition("HUD", "Cooldown Custom Y"), 0.05f, new ConfigDescription("Custom cooldown HUD vertical position as a screen fraction.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
			ScoutKey = configFile.Bind<KeyCode>(new ConfigDefinition("GUI", "Activate Scout Ability"), (KeyCode)103, new ConfigDescription("Key used to activate the Scout enemy marker ability.", (AcceptableValueBase)null, Array.Empty<object>()));
			ShowSpellsKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Show Spells"), (KeyCode)109, new ConfigDescription("Key used to show or hide the Mage spell list.", (AcceptableValueBase)null, Array.Empty<object>()));
			HealKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Healing Spell"), (KeyCode)104, new ConfigDescription("Key used to cast Mage heal.", (AcceptableValueBase)null, Array.Empty<object>()));
			SpeedKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Speed Spell"), (KeyCode)106, new ConfigDescription("Key used to cast Mage speed boost.", (AcceptableValueBase)null, Array.Empty<object>()));
			OverchargeKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Overcharge Spell"), (KeyCode)111, new ConfigDescription("Key used to cast Mage overcharge.", (AcceptableValueBase)null, Array.Empty<object>()));
			JumpKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Jump Boost Spell"), (KeyCode)107, new ConfigDescription("Key used to cast Mage jump boost.", (AcceptableValueBase)null, Array.Empty<object>()));
			StaminaKey = configFile.Bind<KeyCode>(new ConfigDefinition("Mage", "Stamina Refill Spell"), (KeyCode)110, new ConfigDescription("Key used to cast Mage stamina refill.", (AcceptableValueBase)null, Array.Empty<object>()));
			ChargeItemKey = configFile.Bind<KeyCode>(new ConfigDefinition("Engineer", "Charge Held Item"), (KeyCode)99, new ConfigDescription("Key used by Engineer to charge the held item.", (AcceptableValueBase)null, Array.Empty<object>()));
			SaviorKey = configFile.Bind<KeyCode>(new ConfigDefinition("Savior", "Revive Ally"), (KeyCode)117, new ConfigDescription(NexusLocalization.Text("Key used to revive the fallen ally whose head you are holding.", "Клавиша для воскрешения союзника, чью голову вы держите.", "Клавіша для воскресіння союзника, чию голову ви тримаєте."), (AcceptableValueBase)null, Array.Empty<object>()));
			if ((int)SaviorKey.Value == 118)
			{
				SaviorKey.Value = (KeyCode)117;
			}
			SaviorSacrificeMode = configFile.Bind<string>(new ConfigDefinition("Savior", "Health Sacrifice"), NexusLocalization.Text("Part", "Часть", "Частина"), new ConfigDescription(NexusLocalization.Text("Choose whether to sacrifice part or all of your current health.", "Выберите, пожертвовать частью или всем текущим здоровьем.", "Оберіть, пожертвувати частиною чи всім поточним здоров’ям."), (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[2]
			{
				NexusLocalization.Text("Part", "Часть", "Частина"),
				NexusLocalization.Text("All", "Всё", "Усе")
			}), Array.Empty<object>()));
			string text = (NexusLocalization.IsAllSacrifice(SaviorSacrificeMode.Value) ? NexusLocalization.Text("All", "Всё", "Усе") : NexusLocalization.Text("Part", "Часть", "Частина"));
			if (SaviorSacrificeMode.Value != text)
			{
				SaviorSacrificeMode.Value = text;
			}
			SaviorPartialCostPercent = configFile.Bind<int>(new ConfigDefinition("Savior", "Partial Health Cost Percent"), 50, new ConfigDescription(NexusLocalization.Text("Percent of current health sacrificed in Part mode.", "Процент текущего здоровья, который тратится в режиме «Часть».", "Відсоток поточного здоров’я, що витрачається в режимі «Частина»."), (AcceptableValueBase)(object)new AcceptableValueRange<int>(10, 90), Array.Empty<object>()));
			SaviorReviveHealth = configFile.Bind<int>(new ConfigDefinition("Savior", "Ally Revive Health"), 25, new ConfigDescription(NexusLocalization.Text("Health restored to the revived ally, including the 1 HP granted by the game.", "Здоровье, которое получит воскресший союзник, включая 1 HP, восстанавливаемое игрой.", "Здоров’я, яке отримає воскреслий союзник, включно з 1 HP від гри."), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>()));
			RunnerSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Runner", "Speed Multiplier"), 1.5f, new ConfigDescription("Multiplier applied to Runner crouch, walk, and sprint speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			RunnerStaminaMultiplier = configFile.Bind<float>(new ConfigDefinition("Runner", "Stamina Multiplier"), 1.5f, new ConfigDescription("Multiplier applied to Runner max and current stamina.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			TankHealthMultiplier = configFile.Bind<float>(new ConfigDefinition("Tank", "Health Multiplier"), 2f, new ConfigDescription("Multiplier applied to Tank max and current health.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			TankSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Tank", "Speed Multiplier"), 0.9f, new ConfigDescription("Multiplier applied to Tank crouch, walk, and sprint speed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			TankPassiveRegenAmount = configFile.Bind<int>(new ConfigDefinition("Tank", "Passive Regen Amount"), 1, new ConfigDescription("Health restored each Tank passive regeneration tick.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			TankPassiveRegenIntervalSeconds = configFile.Bind<int>(new ConfigDefinition("Tank", "Passive Regen Interval Seconds"), 5, new ConfigDescription("Seconds between Tank passive regeneration ticks.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			GamblerPositiveSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Positive Speed Multiplier"), 1.3f, new ConfigDescription("Positive Gambler speed effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			GamblerPositiveStaminaMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Positive Stamina Multiplier"), 1.8f, new ConfigDescription("Positive Gambler stamina effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerPositiveHealthMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Positive Health Multiplier"), 1.8f, new ConfigDescription("Positive Gambler health effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerPositiveStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Positive Strength Multiplier"), 1.3f, new ConfigDescription("Positive Gambler grab strength effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerPositiveJumpMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Positive Jump Multiplier"), 1.5f, new ConfigDescription("Positive Gambler jump force effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerNegativeSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Negative Speed Multiplier"), 0.8f, new ConfigDescription("Negative Gambler speed effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			GamblerNegativeStaminaMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Negative Stamina Multiplier"), 0.8f, new ConfigDescription("Negative Gambler stamina effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerNegativeHealthMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Negative Health Multiplier"), 0.8f, new ConfigDescription("Negative Gambler health effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerNegativeStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Negative Strength Multiplier"), 0.8f, new ConfigDescription("Negative Gambler grab strength effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			GamblerNegativeJumpMultiplier = configFile.Bind<float>(new ConfigDefinition("Gambler", "Negative Jump Multiplier"), 0.7f, new ConfigDescription("Negative Gambler jump force effect multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			StrongmanStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Strongman", "Strength Multiplier"), 1.5f, new ConfigDescription("Multiplier applied to Strongman grab strength before the flat bonus.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			StrongmanStrengthBonus = configFile.Bind<float>(new ConfigDefinition("Strongman", "Strength Bonus"), 0.5f, new ConfigDescription("Flat grab strength bonus added after the Strongman multiplier.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), Array.Empty<object>()));
			RangedLooterGrabRangeMultiplier = configFile.Bind<float>(new ConfigDefinition("Ranged Looter", "Grab Range Multiplier"), 2.5f, new ConfigDescription("Multiplier applied to Ranged Looter grab range.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			RangedLooterStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Ranged Looter", "Strength Multiplier"), 1.2f, new ConfigDescription("Multiplier applied to Ranged Looter grab strength.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			AthleticStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Athletic", "Strength Multiplier"), 1.4f, new ConfigDescription("Multiplier applied to Athletic grab strength.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			AthleticStaminaBonus = configFile.Bind<int>(new ConfigDefinition("Athletic", "Stamina Bonus"), 20, new ConfigDescription("Flat max and current stamina bonus applied to Athletic.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 300), Array.Empty<object>()));
			AthleticJumpForceBonus = configFile.Bind<float>(new ConfigDefinition("Athletic", "Jump Force Bonus"), 3f, new ConfigDescription("Flat jump force bonus applied to Athletic.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 50f), Array.Empty<object>()));
			AcrobatHealthMultiplier = configFile.Bind<float>(new ConfigDefinition("Acrobat", "Health Multiplier"), 0.75f, new ConfigDescription(NexusLocalization.Text("Multiplier applied to Acrobat max and current health.", "Множитель максимального и текущего здоровья Акробата.", "Множник максимального й поточного здоров’я Акробата."), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 2f), Array.Empty<object>()));
			AcrobatStrengthMultiplier = configFile.Bind<float>(new ConfigDefinition("Acrobat", "Strength Multiplier"), 0.75f, new ConfigDescription(NexusLocalization.Text("Multiplier applied to Acrobat grab strength.", "Множитель силы захвата Акробата.", "Множник сили захоплення Акробата."), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 2f), Array.Empty<object>()));
			AcrobatSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Acrobat", "Speed Multiplier"), 1.1f, new ConfigDescription(NexusLocalization.Text("Multiplier applied to Acrobat movement speed.", "Множитель скорости передвижения Акробата.", "Множник швидкості руху Акробата."), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 3f), Array.Empty<object>()));
			AcrobatJumpForceBonus = configFile.Bind<float>(new ConfigDefinition("Acrobat", "Jump Force Bonus"), 3f, new ConfigDescription(NexusLocalization.Text("Flat jump force bonus applied to Acrobat.", "Бонус к силе прыжка Акробата.", "Бонус до сили стрибка Акробата."), (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 50f), Array.Empty<object>()));
			ReaperHealthMultiplier = configFile.Bind<float>(new ConfigDefinition("Reaper", "Health Multiplier"), 1.5f, new ConfigDescription("Multiplier applied to Reaper max and current health when the role is assigned.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			ReaperMaxHealthBonusPerKill = configFile.Bind<int>(new ConfigDefinition("Reaper", "Max Health Bonus Per Enemy"), 5, new ConfigDescription("Max health gained by each living Reaper when an enemy dies.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 1000), Array.Empty<object>()));
			ReaperHealAmountPerKill = configFile.Bind<int>(new ConfigDefinition("Reaper", "Heal Amount Per Enemy"), 30, new ConfigDescription("Health restored by each living Reaper when an enemy dies.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 1000), Array.Empty<object>()));
			ReaperBuffCooldownFrames = configFile.Bind<int>(new ConfigDefinition("Reaper", "Buff Cooldown Frames"), 50, new ConfigDescription("Update frames a Reaper must wait before receiving another enemy-death buff.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
			ScoutStaminaMultiplier = configFile.Bind<float>(new ConfigDefinition("Scout", "Stamina Multiplier"), 2f, new ConfigDescription("Multiplier applied to Scout max and current stamina.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			ScoutSprintRechargeMultiplier = configFile.Bind<float>(new ConfigDefinition("Scout", "Sprint Recharge Multiplier"), 2f, new ConfigDescription("Multiplier applied to Scout stamina recharge amount.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
			ScoutAbilityDurationSeconds = configFile.Bind<int>(new ConfigDefinition("Scout", "Ability Duration Seconds"), 5, new ConfigDescription("Duration of the Scout enemy marker ability.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			ScoutAbilityCooldownSeconds = configFile.Bind<int>(new ConfigDefinition("Scout", "Ability Cooldown Seconds"), 40, new ConfigDescription("Base cooldown of the Scout enemy marker ability before upgrade reductions.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 600), Array.Empty<object>()));
			MageMaxMana = configFile.Bind<int>(new ConfigDefinition("Mage", "Max Mana"), 8, new ConfigDescription("Maximum mana available to the Mage.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(3, 12), Array.Empty<object>()));
			MageHealAmount = configFile.Bind<int>(new ConfigDefinition("Mage", "Heal Amount"), 5, new ConfigDescription("Health restored by the Mage heal spell before overcharge is applied.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), Array.Empty<object>()));
			MageSpeedMultiplier = configFile.Bind<float>(new ConfigDefinition("Mage", "Speed Multiplier"), 1.4f, new ConfigDescription("Movement speed multiplier applied by the Mage speed spell.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
			MageJumpForceBonus = configFile.Bind<float>(new ConfigDefinition("Mage", "Jump Force Bonus"), 3f, new ConfigDescription("Flat JumpForce bonus applied by the Mage jump spell.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 50f), Array.Empty<object>()));
			MageOverchargeMultiplier = configFile.Bind<float>(new ConfigDefinition("Mage", "Overcharge Multiplier"), 2f, new ConfigDescription("Multiplier applied by overcharge to heal amount and boost durations.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10f), Array.Empty<object>()));
			MageSpeedBoostDurationSeconds = configFile.Bind<int>(new ConfigDefinition("Mage", "Speed Boost Duration Seconds"), 30, new ConfigDescription("Base duration of the Mage speed spell in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			MageJumpBoostDurationSeconds = configFile.Bind<int>(new ConfigDefinition("Mage", "Jump Boost Duration Seconds"), 30, new ConfigDescription("Base duration of the Mage jump spell in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			MageOverchargeDurationSeconds = configFile.Bind<int>(new ConfigDefinition("Mage", "Overcharge Duration Seconds"), 20, new ConfigDescription("Duration of the Mage overcharge spell in seconds.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			EngineerChargeStaminaCost = configFile.Bind<int>(new ConfigDefinition("Engineer", "Charge Stamina Cost"), 10, new ConfigDescription("Max stamina sacrificed when charging an item. The sacrificed stamina is restored over time.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			EngineerStaminaRestoreAmount = configFile.Bind<int>(new ConfigDefinition("Engineer", "Stamina Restore Amount"), 5, new ConfigDescription("Amount of sacrificed max stamina restored each restore tick.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
			EngineerStaminaRestoreIntervalSeconds = configFile.Bind<int>(new ConfigDefinition("Engineer", "Stamina Restore Interval Seconds"), 15, new ConfigDescription("Seconds between Engineer stamina restore ticks.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), Array.Empty<object>()));
			CustomRoleNameRunner = configFile.Bind<string>(new ConfigDefinition("Role Names", "Runner Name"), NexusLocalization.RoleName(1), new ConfigDescription("Display name for the Runner role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameTank = configFile.Bind<string>(new ConfigDefinition("Role Names", "Tank Name"), NexusLocalization.RoleName(2), new ConfigDescription("Display name for the Tank role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameGambler = configFile.Bind<string>(new ConfigDefinition("Role Names", "Gambler Name"), NexusLocalization.RoleName(3), new ConfigDescription("Display name for the Gambler role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameStrongman = configFile.Bind<string>(new ConfigDefinition("Role Names", "Strongman Name"), NexusLocalization.RoleName(4), new ConfigDescription("Display name for the Strongman role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameRL = configFile.Bind<string>(new ConfigDefinition("Role Names", "Ranged Looter Name"), NexusLocalization.RoleName(5), new ConfigDescription("Display name for the Ranged Looter role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameAthletic = configFile.Bind<string>(new ConfigDefinition("Role Names", "Athletic Name"), NexusLocalization.RoleName(6), new ConfigDescription("Display name for the Athletic role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameMage = configFile.Bind<string>(new ConfigDefinition("Role Names", "Mage Name"), NexusLocalization.RoleName(7), new ConfigDescription("Display name for the Mage role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameReaper = configFile.Bind<string>(new ConfigDefinition("Role Names", "Reaper Name"), NexusLocalization.RoleName(8), new ConfigDescription("Display name for the Reaper role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameScout = configFile.Bind<string>(new ConfigDefinition("Role Names", "Scout Name"), NexusLocalization.RoleName(9), new ConfigDescription("Display name for the Scout role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameRegular = configFile.Bind<string>(new ConfigDefinition("Role Names", "Regular Name"), NexusLocalization.RoleName(10), new ConfigDescription("Display name for the Regular role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleNameEngineer = configFile.Bind<string>(new ConfigDefinition("Role Names", "Engineer Name"), NexusLocalization.RoleName(11), new ConfigDescription("Display name for the Engineer role.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecRunner = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Runner Description"), NexusLocalization.RoleDescription(1), new ConfigDescription("Role assignment text shown for Runner.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecTank = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Tank Description"), NexusLocalization.RoleDescription(2), new ConfigDescription("Role assignment text shown for Tank.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecGambler = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Gambler Description"), NexusLocalization.RoleDescription(3), new ConfigDescription("Role assignment text shown for Gambler before the rolled effects.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecStrongman = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Strongman Description"), NexusLocalization.RoleDescription(4), new ConfigDescription("Role assignment text shown for Strongman.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecRL = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Ranged Looter Description"), NexusLocalization.RoleDescription(5), new ConfigDescription("Role assignment text shown for Ranged Looter.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecAthletic = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Athletic Description"), NexusLocalization.RoleDescription(6), new ConfigDescription("Role assignment text shown for Athletic.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecMage = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Mage Description"), NexusLocalization.RoleDescription(7), new ConfigDescription("Role assignment text shown for Mage.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecReaper = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Reaper Description"), NexusLocalization.RoleDescription(8), new ConfigDescription("Role assignment text shown for Reaper.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecScout = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Scout Description"), NexusLocalization.RoleDescription(9), new ConfigDescription("Role assignment text shown for Scout. [G] is replaced with the configured Scout key.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecRegular = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Regular Description"), NexusLocalization.RoleDescription(10), new ConfigDescription("Role assignment text shown for Regular.", (AcceptableValueBase)null, Array.Empty<object>()));
			CustomRoleDecEngineer = configFile.Bind<string>(new ConfigDefinition("Role Descriptions", "Engineer Description"), NexusLocalization.RoleDescription(11), new ConfigDescription("Role assignment text shown for Engineer.", (AcceptableValueBase)null, Array.Empty<object>()));
			ValidateSavedRole();
			SubscribeToRoleAvailabilityChanges();
		}

		public void RegisterMenu(Action updateManaDisplay)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			//IL_003f: 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_004a: Expected O, but got Unknown
			this.updateManaDisplay = updateManaDisplay;
			object obj = <>c.<>9__430_0;
			if (obj == null)
			{
				BuilderDelegate val = delegate(Transform parent)
				{
					//IL_002b: Unknown result type (might be due to invalid IL or missing references)
					MenuAPI.CreateREPOButton(NexusLocalization.Text("NexusRoles Settings", "Настройки NexusRoles", "Налаштування NexusRoles"), (Action)NexusRolesSettingsWindow.OpenMainSettings, parent, new Vector2(500f, 10f));
				};
				<>c.<>9__430_0 = val;
				obj = (object)val;
			}
			MenuAPI.AddElementToSettingsMenu((BuilderDelegate)obj);
			object obj2 = <>c.<>9__430_1;
			if (obj2 == null)
			{
				BuilderDelegate val2 = delegate(Transform parent)
				{
					//IL_002b: Unknown result type (might be due to invalid IL or missing references)
					MenuAPI.CreateREPOButton(NexusLocalization.Text("NexusRoles Settings", "Настройки NexusRoles", "Налаштування NexusRoles"), (Action)NexusRolesSettingsWindow.OpenMainSettings, parent, new Vector2(500f, 500f));
				};
				<>c.<>9__430_1 = val2;
				obj2 = (object)val2;
			}
			MenuAPI.AddElementToLobbyMenu((BuilderDelegate)obj2);
		}

		public int GetSelectedRoleId(Random random)
		{
			string selectableRoleName = GetSelectableRoleName(SavedRole.Value);
			if (selectableRoleName == RandomRoleName)
			{
				return GetRandomEnabledRoleId(random);
			}
			return GetRoleId(selectableRoleName);
		}

		public int ResolveEnabledRoleIdOrRandom(int roleId, Random random)
		{
			if (IsRoleEnabled(roleId))
			{
				return roleId;
			}
			return GetRandomEnabledRoleId(random);
		}

		public string[] GetRoleSelectionChoices()
		{
			return GetAvailableRoleChoices();
		}

		public void SelectRole(string roleName)
		{
			string selectableRoleName = GetSelectableRoleName(roleName);
			SavedRole.Value = selectableRoleName;
			configFile.Save();
		}

		public void SetReassignRoleAfterRevive(bool enabled)
		{
			AssignRoleAfterRevive.Value = enabled;
			configFile.Save();
		}

		public void SetMageManaTop(bool enabled)
		{
			MageTopManaConf.Value = enabled;
			configFile.Save();
			if (guiManager.isMage)
			{
				updateManaDisplay?.Invoke();
			}
		}

		public void Save()
		{
			configFile.Save();
		}

		private void SubscribeToRoleAvailabilityChanges()
		{
			EnableRunner.SettingChanged += OnRoleAvailabilityChanged;
			EnableTank.SettingChanged += OnRoleAvailabilityChanged;
			EnableGambler.SettingChanged += OnRoleAvailabilityChanged;
			EnableStrongman.SettingChanged += OnRoleAvailabilityChanged;
			EnableRL.SettingChanged += OnRoleAvailabilityChanged;
			EnableAthletic.SettingChanged += OnRoleAvailabilityChanged;
			EnableMage.SettingChanged += OnRoleAvailabilityChanged;
			EnableReaper.SettingChanged += OnRoleAvailabilityChanged;
			EnableScout.SettingChanged += OnRoleAvailabilityChanged;
			EnableRegular.SettingChanged += OnRoleAvailabilityChanged;
			EnableEngineer.SettingChanged += OnRoleAvailabilityChanged;
			EnableAcrobat.SettingChanged += OnRoleAvailabilityChanged;
			EnableSavior.SettingChanged += OnRoleAvailabilityChanged;
		}

		private void OnRoleAvailabilityChanged(object? sender, EventArgs args)
		{
			string selectableRoleName = GetSelectableRoleName(SavedRole.Value);
			if (!string.Equals(SavedRole.Value, selectableRoleName, StringComparison.Ordinal))
			{
				SavedRole.Value = selectableRoleName;
				configFile.Save();
			}
		}

		private void ValidateSavedRole()
		{
			string value = SavedRole.Value;
			string text = NormalizeRoleName(value);
			if (!string.Equals(value, text, StringComparison.Ordinal))
			{
				NexusRolesPlugin.Logger.LogWarning((object)("Saved NexusRoles role '" + value + "' is invalid. Falling back to " + text + "."));
				SavedRole.Value = text;
				configFile.Save();
			}
		}

		private string[] GetAvailableRoleChoices()
		{
			List<string> list = new List<string> { RandomRoleName };
			for (int i = 1; i < AllRoleChoices.Length; i++)
			{
				if (IsRoleEnabled(i))
				{
					list.Add(AllRoleChoices[i]);
				}
			}
			return list.ToArray();
		}

		private string GetSelectableRoleName(string? roleName)
		{
			string text = NormalizeRoleName(roleName);
			if (text == RandomRoleName || IsRoleEnabled(text))
			{
				return text;
			}
			return RandomRoleName;
		}

		private string NormalizeRoleName(string? roleName)
		{
			if (string.IsNullOrWhiteSpace(roleName))
			{
				return DefaultRoleName;
			}
			string value = roleName.Trim();
			if (NexusLocalization.TryGetRoleId(value, out var roleId))
			{
				return NexusLocalization.RoleName(roleId);
			}
			return DefaultRoleName;
		}

		private int GetRandomEnabledRoleId(Random random)
		{
			List<int> enabledRoleIds = GetEnabledRoleIds();
			if (enabledRoleIds.Count == 0)
			{
				return -1;
			}
			return enabledRoleIds[random.Next(enabledRoleIds.Count)];
		}

		private List<int> GetEnabledRoleIds()
		{
			List<int> list = new List<int>();
			for (int i = 1; i < AllRoleChoices.Length; i++)
			{
				if (IsRoleEnabled(i))
				{
					list.Add(i);
				}
			}
			return list;
		}

		private int GetRoleId(string roleName)
		{
			for (int i = 0; i < AllRoleChoices.Length; i++)
			{
				if (AllRoleChoices[i] == roleName)
				{
					return i;
				}
			}
			return -1;
		}

		private bool IsRoleEnabled(string roleName)
		{
			return IsRoleEnabled(GetRoleId(roleName));
		}

		private bool IsRoleEnabled(int roleId)
		{
			return roleId switch
			{
				1 => EnableRunner.Value, 
				2 => EnableTank.Value, 
				3 => EnableGambler.Value, 
				4 => EnableStrongman.Value, 
				5 => EnableRL.Value, 
				6 => EnableAthletic.Value, 
				7 => EnableMage.Value, 
				8 => EnableReaper.Value, 
				9 => EnableScout.Value, 
				10 => EnableRegular.Value, 
				11 => EnableEngineer.Value, 
				12 => EnableAcrobat.Value, 
				13 => EnableSavior.Value, 
				_ => false, 
			};
		}
	}
	[BepInPlugin("com.theohay.nuageroles", "NexusRoles", "1.0.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency("nickklmao.menulib", "2.6.2")]
	[BepInDependency("nickklmao.repoconfig", "1.2.7")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class NexusRolesPlugin : BaseUnityPlugin
	{
		private sealed class RoleUpgradeDefinition
		{
			public string AssetName { get; }

			public string UpgradeId { get; }

			public string StatKey { get; }

			public RoleUpgradeDefinition(string assetName, string upgradeId, string statKey)
			{
				AssetName = assetName;
				UpgradeId = upgradeId;
				StatKey = statKey;
			}
		}

		private sealed class NexusRolesUpgradeRuntimeBinder : MonoBehaviour
		{
			public string upgradeName = string.Empty;

			private ItemToggle? itemToggle;

			private ItemUpgrade? itemUpgrade;

			private REPOLibItemUpgrade? repoLibUpgrade;

			private ItemAttributes? itemAttributes;

			private bool eventsBound;

			private void Awake()
			{
				RefreshComponents();
				BindRuntimeEvents();
			}

			private void Start()
			{
				RefreshComponents();
				BindRuntimeEvents();
				EnableToggleWhenUsable();
			}

			private void Update()
			{
				if ((Object)(object)itemToggle == (Object)null || (Object)(object)itemUpgrade == (Object)null || (Object)(object)repoLibUpgrade == (Object)null || (Object)(object)itemAttributes == (Object)null)
				{
					RefreshComponents();
				}
				if (!eventsBound)
				{
					BindRuntimeEvents();
				}
				EnableToggleWhenUsable();
			}

			private void RefreshComponents()
			{
				itemToggle = ((Component)this).GetComponent<ItemToggle>();
				itemUpgrade = ((Component)this).GetComponent<ItemUpgrade>();
				repoLibUpgrade = ((Component)thi