Decompiled source of Obeliskial Options v2.3.2
BepInEx/plugins/com.stiffmeds.obeliskialoptions.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Cards; using Events; using HarmonyLib; using Microsoft.CodeAnalysis; using Obeliskial_Essentials; using Photon.Pun; using ProfanityFilter; using Steamworks; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.InputSystem; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.stiffmeds.obeliskialoptions")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Options to alter gameplay. Define your Obeliskial Options to turn Ottis into the Miss Piggy (or Piss Miggy) of your dreams, and join Malunah, Sharon and their pet rat for glorious adventures!")] [assembly: AssemblyFileVersion("2.3.2.0")] [assembly: AssemblyInformationalVersion("2.3.2+79e343a93ef1280100ec8649a08309596935916e")] [assembly: AssemblyProduct("Obeliskial_Options")] [assembly: AssemblyTitle("com.stiffmeds.obeliskialoptions")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.3.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Obeliskial_Options { internal static class ConfigUIDropdownPatch { internal static void Apply(Harmony harmony) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown int num = 0; string[] array = new string[3] { "ConfigManager.UI.InteractiveValues.InteractiveEnum", "ConfigManager.UI.InteractiveValues.InteractiveFlags", "ConfigManager.UI.InteractiveValues.InteractiveValueList" }; foreach (string text in array) { try { Type type = AccessTools.TypeByName(text); if (!(type == null)) { MethodInfo methodInfo = AccessTools.Method(type, "ConstructUI", new Type[1] { typeof(GameObject) }, (Type[])null); if (!(methodInfo == null) && !(methodInfo.DeclaringType != type)) { harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(ConfigUIDropdownPatch).GetMethod("Postfix", BindingFlags.Static | BindingFlags.NonPublic)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); num++; } } } catch (Exception ex) { Options.LogWarning("[ui] dropdown auto-close for " + text + " failed: " + ex.GetType().Name + " " + ex.Message); } } if (num > 0) { Options.LogInfo("[ui] config manager dropdowns will close on outside click / Escape (" + num + " builders)"); } } private static void Postfix(object __instance) { try { Dropdown value = Traverse.Create(__instance).Field("dropdown").GetValue<Dropdown>(); if (!((Object)(object)value == (Object)null) && !((Object)(object)((Component)value).GetComponent<DropdownAutoCloser>() != (Object)null)) { ((Component)value).gameObject.AddComponent<DropdownAutoCloser>().Bind(value); } } catch (Exception ex) { Options.LogWarning("[ui] dropdown hook failed: " + ex.GetType().Name + " " + ex.Message); } } } internal class DropdownAutoCloser : MonoBehaviour { private static readonly FieldInfo ExpandedListField = AccessTools.Field(typeof(Dropdown), "m_Dropdown"); private Dropdown dropdown; private int openedFrame = -1; internal void Bind(Dropdown target) { dropdown = target; Options.LogDebug("[ui] dropdown auto-close attached to '" + ((Object)target).name + "'"); } private void Update() { if ((Object)(object)dropdown == (Object)null) { Object.Destroy((Object)(object)this); return; } GameObject val = (GameObject)((ExpandedListField != null) ? /*isinst with value type is only supported in some contexts*/: null); if ((Object)(object)val == (Object)null) { openedFrame = -1; } else if (openedFrame < 0) { openedFrame = Time.frameCount; } else if (Time.frameCount - openedFrame >= 2) { if (Input.GetKeyDown((KeyCode)27)) { dropdown.Hide(); } else if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && !PointerOverDropdown(val)) { dropdown.Hide(); } } } private bool PointerOverDropdown(GameObject list) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) try { EventSystem current = EventSystem.current; if ((Object)(object)current != (Object)null) { PointerEventData val = new PointerEventData(current) { position = Vector2.op_Implicit(Input.mousePosition) }; List<RaycastResult> list2 = new List<RaycastResult>(); current.RaycastAll(val, list2); if (list2.Count > 0) { RaycastResult val2 = list2[0]; Transform transform = ((RaycastResult)(ref val2)).gameObject.transform; return transform.IsChildOf(((Component)dropdown).transform) || transform.IsChildOf(list.transform); } return false; } } catch (Exception ex) { Options.LogDebug("[ui] dropdown raycast check failed: " + ex.GetType().Name); } if (!PointerInside(list)) { return PointerInside(((Component)dropdown).gameObject); } return true; } private static bool PointerInside(GameObject target) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) Transform transform = target.transform; RectTransform val = (RectTransform)(object)((transform is RectTransform) ? transform : null); if ((Object)(object)val == (Object)null) { return false; } Canvas componentInParent = target.GetComponentInParent<Canvas>(); Canvas val2 = (((Object)(object)componentInParent != (Object)null) ? componentInParent.rootCanvas : null); Camera val3 = (((Object)(object)val2 != (Object)null && (int)val2.renderMode != 0) ? val2.worldCamera : null); return RectTransformUtility.RectangleContainsScreenPoint(val, Vector2.op_Implicit(Input.mousePosition), val3); } } [HarmonyPatch] internal static class EventRollPatches { [HarmonyPrefix] [HarmonyPatch(typeof(RollManager), "compareByMode")] public static bool CompareByModePrefix(ref bool __result) { if (!Options.AlwaysSucceedEnabled) { return true; } __result = true; return false; } [HarmonyPostfix] [HarmonyPatch(typeof(CharRollData), "IsSuccess")] public static void IsSuccessPostfix(ref bool __result) { if (Options.AlwaysSucceedEnabled) { __result = true; } } [HarmonyPostfix] [HarmonyPatch(typeof(RollManager), "isCritical")] public static void IsCriticalPostfix(EventReplyData replySelected, bool isSuccess, ref bool __result) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 if (!__result && Options.AlwaysCritSucceedEnabled && isSuccess && replySelected != null && replySelected.SsRoll && (int)replySelected.SsRollTarget == 2 && replySelected.SsRollNumberCritical != -1) { __result = true; } } [HarmonyPrefix] [HarmonyPatch(typeof(EventReplyData), "GetData")] public static void GetDataPrefix(EventReplyData __instance, ref bool success, ref bool isCritical) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 if (Options.AlwaysSucceedEnabled && __instance != null) { success = true; if (Options.AlwaysCritSucceedEnabled && __instance.SsRoll && (int)__instance.SsRollTarget == 2 && __instance.SsRollNumberCritical != -1) { isCritical = true; } } } [HarmonyPrefix] [HarmonyPatch(typeof(EventManager), "ShowResultTitle")] public static void ShowResultTitlePrefix(ref bool success) { if (Options.AlwaysSucceedEnabled) { success = true; } } [HarmonyPostfix] [HarmonyPatch(typeof(EventResultManager), "OnResult")] public static void OnResultPostfix(EventResultManager __instance) { if (__instance != null && Options.AlwaysSucceedEnabled) { for (int i = 0; i < __instance.CharWinner.Length; i++) { __instance.CharWinner[i] = true; } __instance.IsThereSuccess = true; __instance.IsThereFail = false; Traverse.Create((object)__instance).Field("groupWinner").SetValue((object)true); ManualLogSource log = Options.Log; if (log != null) { log.LogInfo((object)("[event] forced success (group=" + __instance.IsGroup + ")")); } } } } [HarmonyPatch] internal static class HeroSelectionPatch { private const int VanillaSlots = 9; internal static bool SlotsExpanded { get; private set; } [HarmonyTargetMethod] public static MethodBase TargetMethod() { return typeof(HeroSelectionManager).GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault((Type t) => t.Name.Contains("StartCoContinue"))?.GetMethod("MoveNext", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } [HarmonyPrepare] public static bool Prepare() { if (TargetMethod() == null) { ManualLogSource log = Options.Log; if (log != null) { log.LogWarning((object)"[clone] hero selection state machine not found; clones fall back to the vanilla slot count."); } return false; } return true; } [HarmonyTranspiler] public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown List<CodeInstruction> list = instructions.ToList(); int num = list.FindIndex((CodeInstruction ci) => (ci.opcode == OpCodes.Ldc_I4_S || ci.opcode == OpCodes.Ldc_I4) && Convert.ToInt32(ci.operand) == 9); if (num < 0) { ManualLogSource log = Options.Log; if (log != null) { log.LogWarning((object)("[clone] slot constant (" + 9 + ") not found in hero selection; clones fall back to the vanilla slot count.")); } return list; } list[num] = new CodeInstruction(OpCodes.Call, (object)AccessTools.Method(typeof(HeroSelectionPatch), "SlotCount", (Type[])null, (Type[])null)); SlotsExpanded = true; ManualLogSource log2 = Options.Log; if (log2 != null) { log2.LogInfo((object)("[clone] hero selection page slots widened (was " + 9 + ").")); } return list; } public static int SlotCount() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 int num = 0; try { Dictionary<string, SubClassData> dictionary = (((Object)(object)Globals.Instance != (Object)null) ? Globals.Instance.SubClass : null); if (dictionary != null) { foreach (SubClassData value in dictionary.Values) { if ((Object)(object)value != (Object)null && value.MainCharacter && (int)value.HeroClassSecondary != 6) { num++; } } } } catch { num = 0; } return Math.Min(28, Math.Max(16, num + 4)); } } [HarmonyPatch] internal static class HeroSelectionPaging { private const int PerPage = 16; [HarmonyPrefix] [HarmonyPatch(typeof(HeroSelectionManager), "ArrangeHeroSelections")] public static void EnsurePageCount(GameObject parent, Func<HeroSelection, bool> filter) { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)parent == (Object)null || filter == null || parent.transform.childCount == 0) { return; } int num = 0; Dictionary<string, HeroSelection> value = Traverse.Create((object)HeroSelectionManager.Instance).Field("heroSelectionDictionary").GetValue<Dictionary<string, HeroSelection>>(); if (value == null) { return; } foreach (HeroSelection value2 in value.Values) { if ((Object)(object)value2 != (Object)null && filter(value2)) { num++; } } int num2 = (num + 16 - 1) / 16; for (int i = parent.transform.childCount; i < num2; i++) { GameObject val = new GameObject("Page" + i); val.transform.parent = parent.transform; val.transform.localPosition = Vector3.zero; val.transform.localScale = Vector3.one; val.transform.localRotation = Quaternion.identity; val.SetActive(false); } } catch (Exception ex) { ManualLogSource log = Options.Log; if (log != null) { log.LogWarning((object)("[hero] page top-up failed: " + ex.GetType().Name + " " + ex.Message)); } } } [HarmonyPostfix] [HarmonyPatch(typeof(HeroSelectionManager), "ArrangeHeroSelections")] public static void TrimEmptyPages(GameObject parent) { try { int num = 0; for (int num2 = parent.transform.childCount - 1; num2 >= 1; num2--) { Transform child = parent.transform.GetChild(num2); if (child.childCount == 0) { num++; Object.Destroy((Object)(object)((Component)child).gameObject); } } if (num > 0) { ManualLogSource log = Options.Log; if (log != null) { log.LogInfo((object)("[hero] removed " + num + " empty page(s) from " + ((Object)parent).name)); } } } catch (Exception ex) { ManualLogSource log2 = Options.Log; if (log2 != null) { log2.LogWarning((object)("[hero] page cleanup failed: " + ex.GetType().Name + " " + ex.Message)); } } } } internal static class Loc { internal const string Auto = "Auto"; private const string EnglishName = "English"; private static readonly Dictionary<string, Dictionary<string, string>> Packs = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); private static readonly Dictionary<string, string> DisplayNames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); private static readonly List<string> PackOrder = new List<string>(); private static string active = "en"; private static readonly Dictionary<string, string> Chinese = new Dictionary<string, string>(StringComparer.Ordinal) { { "Startup troubleshooting switch: when true, the mod loads but applies no Harmony patches, so it cannot affect the game at all. Set it back to false (or delete this line) to restore functionality. Requires a game restart.", "启动排障开关:为 true 时 mod 仍会加载,但不打任何 Harmony 补丁,因此完全影响不到游戏。改回 false(或删掉这一行)即可恢复全部功能。修改后需重启游戏。" }, { "Give all key items in Adventure Mode. Items are added when you load into a town; if you've already passed the town and want the key items, use Travel Anywhere to go back to town? I'll add more methods in the future :).", "在冒险模式中获得所有关键道具。道具会在你进入城镇时发放;如果已经过了那个城镇,可以用“任意传送”回城领取。以后我会补充更多获取方式 :)" }, { "Many cash.", "大量金币。" }, { "Many cryttals.", "大量尘晶。" }, { "Many supplies.", "大量补给。" }, { "Turns on AtO devs’ developer mode. Back up your saves before using!", "开启 AtO 开发者模式。使用前请先备份存档!" }, { "Export settings (for use with 'Import Settings').", "导出设置(配合“导入设置”使用)。" }, { "Paste settings here to import them.", "把设置粘贴到这里以导入。" }, { "Export player profiles for use with Profile Editor.", "导出玩家配置,供 Profile Editor 使用。" }, { "Import edited player profiles.", "导入编辑过的玩家配置。" }, { "(IN TESTING) Loads custom cards/items/sprites[/auracurses].", "(测试中)加载自定义卡牌/物品/贴图[/光环诅咒]。" }, { "Set the minimum deck size.", "设置卡组的最小张数。" }, { "What cards can be removed at the church?", "教堂里可以移除哪些卡?" }, { "Allow crafting of corrupted cards.", "允许制作腐化卡牌。" }, { "Infinite card crafts (set available card count to 99).", "无限次制作卡牌(可制作数量设为 99)。" }, { "Adds three clone characters to the DLC section of Hero Selection.", "在选人界面的 DLC 区域添加三个克隆角色。" }, { "Which subclass should clone 1 be?", "克隆 1 使用哪个子职业?" }, { "Which subclass should clone 2 be?", "克隆 2 使用哪个子职业?" }, { "Which subclass should clone 3 be?", "克隆 3 使用哪个子职业?" }, { "What should clone 1 be called?", "克隆 1 叫什么名字?" }, { "What should clone 2 be called?", "克隆 2 叫什么名字?" }, { "What should clone 3 be called?", "克隆 3 叫什么名字?" }, { "Allows characters to be raised up to rank 500.", "角色等级上限提升到 500 级。" }, { "Sell supplies on high madness.", "高疯狂度下可以出售补给。" }, { "Allow multiple shop rerolls on high madness.", "高疯狂度下允许多次刷新商店。" }, { "Use claims on any madness. Note that you cannot _get_ claims on high madness (yet...).", "任何疯狂度下都能使用索求。注意:高疯狂度下无法获得索求(暂时……)。" }, { "Every event roll succeeds, no matter how bad the roll would have been. The dice shown on screen may not match the result.", "所有事件掷骰必定成功,无论点数多低。屏幕上的骰子显示可能与最终结果不一致。" }, { "Every event roll is a critical success. Events that have a dedicated critical-success branch use it; events without one simply succeed. Implies 'Always Succeed Event Rolls'.", "所有事件掷骰必定大成功。有大成功专属分支的事件会走该分支,没有的则按普通成功处理。此选项同时包含“事件掷骰必定成功”。" }, { "(NOT WORKING - shows path to node, but not actual node) Can travel to nodes that are normally invisible (e.g. western treasure node in Faeborg).", "(未生效——只会显示通往节点的路径,实际进不去)可以前往通常不可见的节点(例如法伯格西侧的宝藏节点)。" }, { "(IN TESTING) Events and replies ignore class requirements.", "(测试中)事件与回答忽略职业要求。" }, { "(IN TESTING) Events and replies ignore equipment/pet requirements.", "(测试中)事件与回答忽略装备/宠物要求。" }, { "(IN TESTING) Events and replies ignore key item / quest requirements.", "(测试中)事件与回答忽略关键道具/任务要求。" }, { "Travel to any node.", "可以前往任意节点。" }, { "You can choose any location to visit from the obelisk (e.g. can go to the Void early, can visit all locations before going, etc.).", "在方尖碑处可以选择任意地点前往(例如提前进入虚空、出发前跑遍所有地点等)。" }, { "Card rewards are always corrupted (includes divinations).", "卡牌奖励必定为腐化卡(含占卜)。" }, { "Make item loot rewards always corrupted.", "物品战利品奖励必定为腐化。" }, { "(IN TESTING - visually buggy but functional) Set maximum perk points to 1000.", "(测试中——显示有点问题但功能正常)把最大天赋点数设为 1000。" }, { "(IN TESTING) Change perks whenever you want.", "(测试中)随时可以修改天赋。" }, { "Can select perk without selecting its precursor perks; ignore minimum selected perk count for each row.", "可以不选前置天赋就直接选天赋;忽略每一行要求的最少已选天赋数。" }, { "Modify shop rarity based on current madness/corruption. This also makes the change in rarity from act 1 to 4 _slightly_ less abrupt.", "根据当前疯狂度/腐化度调整商店稀有度。同时让第 1 幕到第 4 幕之间的稀有度变化稍微平缓一些。" }, { "Increases rarity of shops/loot based on number of shops/loot seen since an item was last acquired. If you play with discounted rerolls I recommend setting this to ~10; if you play without, I recommend ~300 :)", "根据自上次获得物品以来经过的商店/战利品次数,提升商店与战利品的稀有度。如果你用打折刷新,建议设为 10 左右;不打折的话建议 300 左右 :)" }, { "Allow shops on the map (e.g. werewolf shop in Senenthia) to have corrupted goods for sale.", "允许地图上的商店(如塞嫩西亚的狼人商店)出售腐化商品。" }, { "Allow obelisk corruption shops to have corrupted goods for sale.", "允许方尖碑腐化商店出售腐化商品。" }, { "Allow town shops to have corrupted goods for sale.", "允许城镇商店出售腐化商品。" }, { "Discounts are applied to divinations.", "占卜享受折扣。" }, { "Discounts are applied to shop rerolls.", "商店刷新享受折扣。" }, { "Buy more than one of each pet.", "每种宠物可以买多只。" }, { "Does not record who purchased what in the shop.", "不记录谁在商店买了什么。" }, { "Does not send shop purchase records in multiplayer.", "多人游戏时不发送商店购买记录。" }, { "Items that would normally not appear in shops, such as the Yggdrasil Root or Yogger's Cleaver, will appear.", "通常不会出现在商店里的物品(如世界树之根、约格的剔骨刀)也会出现。" }, { "Allow profanities in your good Christian Piss server.", "允许在你那虔诚的服务器里说脏话。" }, { "Use more emotes during combat.", "战斗中使用更多表情动作。" }, { "Force server selection to location of your choice (default: Australia).", "强制把服务器选择锁定在你指定的地区(默认:澳大利亚)。" }, { "Which server should be forced if the above option is true?", "上一项开启时强制使用哪个服务器?" }, { "Change the default player count in multiplDefault to 4 players in multiplayer.", "把多人游戏的默认玩家人数改为 4 人。" }, { "Allow characters to have more than 10 energy.", "允许角色拥有超过 10 点能量。" }, { "(IN TESTING) Allow characters to have more than 10 cards.", "(测试中)允许角色手牌超过 10 张。" }, { "(IN TESTING - visually buggy but functional) Fixes a vanilla bug that allows infinite stacking of HP by buying the same item repeatedly.", "(测试中——显示有点问题但功能正常)修复原版中反复购买同一件装备可无限叠加生命值的 bug。" }, { "Skip cinematics.", "跳过过场动画。" }, { "(IN TESTING - visually buggy but functional) Automatically press 'Continue' in events.", "(测试中——显示有点问题但功能正常)在事件中自动按下“继续”。" }, { "Use previous settings to automatically create lobby room when loading multiplayer game.", "读取多人游戏时,按上次的设置自动创建房间。" }, { "Automatically readies up non-host players when loading multiplayer game.", "读取多人游戏时,自动让非房主玩家准备。" }, { "Spacebar clicks the 'Continue' button in events for you.", "按空格键替你点击事件里的“继续”按钮。" }, { "(IN TESTING) Automatically select (1) lowest card; (2) closest to 2; (3) highest card; or (4) random to determine multiplayer conflicts.", "(测试中)多人冲突时自动选择:(1) 点数最低的卡;(2) 最接近 2 的卡;(3) 点数最高的卡;(4) 随机。" }, { "(IN TESTING) Shows blob pets and Harley in the Tome of Knowledge and shop.", "(测试中)在知识之书和商店中显示软泥宠物与哈莉。" }, { "(IN TESTING) Alerts you when a card in your hand will activate an item or enchantment.", "(测试中)手牌中的卡即将触发物品或附魔时提醒你。" }, { "(IN TESTING) Bless/sharp/fortify behaviour. (0) default (applies to both damage types on a card); (1) first (applies to first damage type on card); (2) split (damage split equally between damage types).", "(测试中)祝福/锐利/坚固的行为。(0) 默认(作用于卡上的两种伤害类型);(1) 只作用于第一种(卡上第一种伤害类型);(2) 均分(伤害在两种类型之间平分)。" } }; internal static string ActiveCode => active; internal static void Init() { Packs.Clear(); DisplayNames.Clear(); PackOrder.Clear(); Register("en", "English", null); Register("zh", "中文", Chinese); try { LoadExternalPacks(); } catch (Exception ex) { Options.LogWarning("[lang] external packs failed: " + ex.GetType().Name + " " + ex.Message); } } internal static string[] Choices() { List<string> list = new List<string> { "Auto" }; for (int i = 0; i < PackOrder.Count; i++) { string item = DisplayName(PackOrder[i]); if (!list.Contains(item)) { list.Add(item); } } return list.ToArray(); } internal static void SetMode(string value) { string text = (value ?? string.Empty).Trim(); if (text.Length == 0 || string.Equals(text, "Auto", StringComparison.OrdinalIgnoreCase)) { active = GameLanguage(); return; } if (string.Equals(text, "English", StringComparison.OrdinalIgnoreCase) || string.Equals(text, "en", StringComparison.OrdinalIgnoreCase)) { active = "en"; return; } for (int i = 0; i < PackOrder.Count; i++) { string text2 = PackOrder[i]; if (string.Equals(text, text2, StringComparison.OrdinalIgnoreCase) || string.Equals(text, DisplayName(text2), StringComparison.OrdinalIgnoreCase)) { active = text2; return; } } active = GameLanguage(); } internal static string D(string en) { if (string.IsNullOrEmpty(en)) { return en; } if (active == "en") { return en; } if (Packs.TryGetValue(active, out var value) && value.TryGetValue(en, out var value2) && !string.IsNullOrEmpty(value2)) { return value2; } return en; } private static void Register(string code, string display, Dictionary<string, string> table) { if (!Packs.ContainsKey(code)) { PackOrder.Add(code); } Packs[code] = table ?? new Dictionary<string, string>(StringComparer.Ordinal); DisplayNames[code] = display; } private static string DisplayName(string code) { if (!DisplayNames.TryGetValue(code, out var value) || string.IsNullOrEmpty(value)) { return code; } return value; } private static string GameLanguage() { string text = "en"; try { if ((Object)(object)Globals.Instance != (Object)null && !string.IsNullOrEmpty(Globals.Instance.CurrentLang)) { text = Globals.Instance.CurrentLang; } } catch { return "en"; } text = text.Trim(); if (text.Length == 0) { return "en"; } if (Packs.ContainsKey(text)) { return text; } int num = text.IndexOf('-'); if (num > 0) { string text2 = text.Substring(0, num); if (Packs.ContainsKey(text2)) { return text2; } } switch (text.ToLowerInvariant()) { case "ja": if (Packs.ContainsKey("jp")) { return "jp"; } break; case "zh": case "cn": if (Packs.ContainsKey("zh")) { return "zh"; } break; case "zh-hans": if (Packs.ContainsKey("zh")) { return "zh"; } break; case "zh-hant": if (Packs.ContainsKey("zh-tw")) { return "zh-tw"; } if (Packs.ContainsKey("zh")) { return "zh"; } break; } return "en"; } private static string LangFolder() { return Path.Combine(Paths.ConfigPath, "Obeliskial_Options", "lang"); } private static void LoadExternalPacks() { string text = LangFolder(); if (!Directory.Exists(text)) { Directory.CreateDirectory(text); WriteReadme(text); Options.LogInfo("[lang] created " + text + " (drop <code>.txt packs here to add a language)"); return; } string[] files = Directory.GetFiles(text, "*.txt"); foreach (string text2 in files) { try { string text3 = NormalizeCode(Path.GetFileNameWithoutExtension(text2)); if (string.IsNullOrEmpty(text3) || text3.StartsWith("_")) { continue; } Dictionary<string, string> dictionary = new Dictionary<string, string>(StringComparer.Ordinal); string text4 = text3; string[] array = File.ReadAllLines(text2, Encoding.UTF8); for (int j = 0; j < array.Length; j++) { string text5 = array[j]; if (text5.Length == 0) { continue; } if (text5[0] == '\ufeff') { text5 = text5.Substring(1); } if (text5.TrimStart().StartsWith("#")) { continue; } if (text5.StartsWith("!name", StringComparison.OrdinalIgnoreCase)) { string text6 = text5.Substring(5).TrimStart(' ', '\t', '=', ':'); if (text6.Length > 0) { text4 = text6.Trim(); } continue; } int num = text5.IndexOf('\t'); int num2 = ((num > 0) ? num : text5.IndexOf("|||", StringComparison.Ordinal)); int num3 = ((num > 0) ? 1 : 3); if (num2 > 0) { string text7 = text5.Substring(0, num2).Trim(); string text8 = text5.Substring(num2 + num3).Trim(); if (text7.Length > 0 && text8.Length > 0) { dictionary[text7] = text8; } } } if (dictionary.Count == 0) { Options.LogWarning("[lang] " + text2 + " has no entries, ignored"); continue; } Register(text3, text4, dictionary); Options.LogInfo("[lang] loaded " + text3 + " (" + text4 + "), " + dictionary.Count + " entries"); } catch (Exception ex) { Options.LogWarning("[lang] failed to read " + text2 + ": " + ex.GetType().Name + " " + ex.Message); } } } private static string NormalizeCode(string code) { if (string.IsNullOrEmpty(code)) { return string.Empty; } code = code.Trim(); code.StartsWith("_"); return code; } private static void WriteReadme(string dir) { try { string path = Path.Combine(dir, "_readme.txt"); if (!File.Exists(path)) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine("Obeliskial_Options - 配置界面语言包 / language packs"); stringBuilder.AppendLine(); stringBuilder.AppendLine("把语言包放在本目录,文件名用游戏语种代码:es.txt / de.txt / fr.txt / ko.txt / jp.txt / zh-CN.txt / zh-TW.txt"); stringBuilder.AppendLine("Put a pack here, file name = game language code (es / de / fr / ko / jp / zh-CN / zh-TW ...)."); stringBuilder.AppendLine(); stringBuilder.AppendLine("格式 / format(每行一条,英文原文<TAB>译文):"); stringBuilder.AppendLine("!name 日本語"); stringBuilder.AppendLine("Many cash.\t大量の現金。"); stringBuilder.AppendLine(); stringBuilder.AppendLine("以 # 开头的行会被忽略;!name 可省略,省略时显示文件名。"); stringBuilder.AppendLine("Lines starting with # are ignored. !name is optional."); stringBuilder.AppendLine(); stringBuilder.AppendLine("改完语言包后重启游戏;配置项 Options / Config Language 选 Auto 即跟随游戏语言。"); stringBuilder.AppendLine("Restart the game after editing. Set Options / Config Language to Auto to follow the game language."); File.WriteAllText(path, stringBuilder.ToString(), new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); } } catch { } } } [BepInPlugin("com.stiffmeds.obeliskialoptions", "Obeliskial_Options", "2.3.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("AcrossTheObelisk.exe")] public class Options : BaseUnityPlugin { public const int ModDate = 20261129; private readonly Harmony harmony = new Harmony("com.stiffmeds.obeliskialoptions"); internal static ManualLogSource Log; public static int iShopsWithNoPurchase = 0; private static bool bUpdatingSettings = false; public static string medsDLCCloneTwoSkin = "medsdlctwoa"; public static string medsDLCCloneThreeSkin = "medsdlcthreea"; public static string medsDLCCloneFourSkin = "medsdlcfoura"; public static string medsDLCCloneTwoCardback = "medsdlctwoa"; public static string medsDLCCloneThreeCardback = "medsdlcthreea"; public static string medsDLCCloneFourCardback = "medsdlcfoura"; public static float medsBLPTownTierPower = 5f; public static float medsBLPRollPower = 1f; public static float medsBLPMythicMult = 1f; public static float medsBLPEpicMult = 8f; public static float medsBLPRareMult = 128f; public static float medsBLPUncommonMult = 256f; public static List<string> medsDoNotDropList = new List<string> { "asmody", "asmodyrare", "betty", "bettyrare", "boneclaws", "boneclawsa", "boneclawsb", "boneclawsrare", "brokenitem", "bunny", "bunnyrare", "burneditem", "champy", "champyrare", "chompy", "chompyrare", "chumpy", "chumpyrare", "combatbandages", "combatbandagesa", "combatbandagesb", "armageddon", "armageddona", "armageddonb", "armageddonrare", "ashysky", "ashyskya", "ashyskyb", "ashyskyrare", "backlash", "backlasha", "backlashb", "backlashrare", "bloodpuddle", "bomblottery", "bomblotterya", "bomblotteryb", "bomblotteryrare", "burningweapons", "burningweaponsa", "burningweaponsb", "burningweaponsrare", "chaospuddle", "chaoticwind", "chaoticwinda", "chaoticwindb", "chaoticwindrare", "coldfront", "colorfulpuddle", "colorfulpuddlea", "colorfulpuddleb", "colorfulpuddlerare", "darkpuddle", "deathgrip", "electricpuddle", "empower", "empowera", "empowerb", "empowerrare", "forestallies", "fungaloutbreak", "fungaloutbreaka", "fungaloutbreakb", "fungaloutbreakrare", "heavenlyarmaments", "heavenlyarmamentsa", "heavenlyarmamentsb", "heavenlyarmamentsrare", "heavyweaponry", "heavyweaponrya", "heavyweaponryb", "heavyweaponryrare", "hexproof", "hexproofa", "hexproofb", "hexproofrare", "holypuddle", "hypotermia", "hypotermiaa", "hypotermiab", "hypotermiarare", "icypuddle", "ironclad", "ironclada", "ironcladb", "ironcladrare", "lavabursts", "lavapuddle", "livingforest", "livingforesta", "livingforestb", "livingforestrare", "lonelyblob", "lonelybloba", "lonelyblobb", "lonelyblobrare", "meatfeast", "meatfeasta", "meatfeastb", "melancholy", "melancholya", "melancholyb", "melancholyrare", "metalpuddle", "noxiousparasites", "noxiousparasitesa", "noxiousparasitesb", "noxiousparasitesrare", "pacifism", "pacifisma", "pacifismb", "pacifismrare", "poisonfields", "poisonfieldsa", "poisonfieldsb", "poisonfieldsrare", "putrefaction", "putrefactiona", "putrefactionb", "putrefactionrare", "resurrection", "resurrectiona", "resurrectionb", "revenge", "revengea", "revengeb", "revengerare", "rosegarden", "rosegardena", "rosegardenb", "rosegardenrare", "sacredground", "sacredgrounda", "sacredgroundb", "sacredgroundrare", "snowfall", "snowfalla", "snowfallb", "snowfallrare", "spookynight", "starrynight", "starrynighta", "starrynightb", "starrynightrare", "subzero", "subzeroa", "subzerob", "subzerorare", "sugarrush", "thornproliferation", "thornproliferationa", "thornproliferationb", "thornproliferationrare", "thunderstorm", "thunderstorma", "thunderstormb", "thunderstormrare", "toxicpuddle", "trickortreat", "upwind", "upwinda", "upwindb", "upwindrare", "vigorous", "vigorousa", "vigorousb", "vigorousrare", "waterpuddle", "windsofamnesia", "windsofamnesiaa", "windsofamnesiab", "windsofamnesiarare", "cursedjewelering", "daley", "daleyrare", "bloodblobpet", "bloodblobpetrare", "chaosblobpet", "chaosblobpetrare", "darkblobpet", "darkblobpetrare", "electricblobpet", "electricblobpetrare", "holyblobpet", "holyblobpetrare", "icyblobpet", "icyblobpetrare", "lavablobpet", "lavablobpetrare", "metalblobpet", "metalblobpetrare", "toxicblobpet", "toxicblobpetrare", "waterblobpet", "waterblobpetrare", "familyjewels", "familyjewelsa", "familyjewelsb", "flamy", "flamyrare", "forestbanner", "forestbannera", "forestbannerb", "harley", "harleya", "harleyb", "harleyrare", "heavypackage", "hightchancellorstaff", "hightchancellorstaffa", "hightchancellorstaffb", "hightchancellorstaffrare", "jinglebell", "jinglebella", "jinglebellb", "liante", "lianterare", "meatbag", "meatbaga", "meatbagb", "mozzy", "mozzyrare", "oculy", "oculyrare", "orby", "orbyrare", "powerglove", "powerglovea", "powergloveb", "prophetstaff", "prophetstaffa", "prophetstaffb", "prophetstaffrare", "raggeddoll", "raggeddolla", "raggeddollb", "rangerarmor", "rangerarmora", "rangerarmorb", "reforgedcore", "reforgedcorea", "reforgedcoreb", "sharpy", "sharpyrare", "slimy", "slimyrare", "soullantern", "soullanterna", "soullanternb", "stormy", "stormyrare", "thewolfslayer", "thewolfslayera", "thewolfslayerb", "thewolfslayerrare", "tombstone", "venomflask", "venomflaska", "venomflaskb", "wolfy", "wolfyrare", "woodencrosier", "woodencrosiera", "woodencrosierb", "woodencrosierrare", "corruptedplate", "corruptedplatea", "corruptedplateb", "corruptedplaterare", "cuby", "cubyd", "cubydrare", "cubyrare", "familyjewelsrare", "fenny", "fennyrare", "gildedplate", "gildedplatea", "gildedplateb", "gildedplaterare", "scaraby", "scarabyrare", "sepulchralspectre", "sepulchralspectrerare", "whisperingstone" }; public static List<string> medsDropOnlySoU = new List<string> { "architectsring", "architectsringrare", "blackpyramid", "blackpyramidrare", "burialmask", "burialmaskrare", "crimsonraiment", "crimsonraimentrare", "desertjam", "desertjamrare", "durandal", "durandalrare", "energyshield", "energyshield rare", "energyshieldrare", "fistofthedamned", "fistofthedamnedrare", "holyrune", "holyrunerare", "lunaring", "lunaringrare", "necromancerrobe", "necromancerroberare", "sacredaxe", "sacredaxerare", "scarabshield", "scarabshieldrare", "shadowrune", "shadowrunerare", "solring", "solringrare", "suppressionhelmet", "suppressionhelmetrare", "tessaract", "tessaractrare", "thejuggernaut", "thejuggernautrare", "topazring", "topazringrare", "turban", "turbanrare", "undeathichor", "undeathichorrare", "unholyhammer", "unholyhammerrare" }; public static List<string> medsKeepRequirements = new List<string> { "_demo", "_tier1", "_tier2", "_tier3", "_tier4", "caravan", "crocomenburn", "ulmininup", "ulminindown", "ulmininportal", "ulmininsanddown" }; public static List<string> medsObeliskNodes = new List<string> { "sen_34", "aqua_36", "faen_39", "ulmin_40", "velka_33", "sahti_63" }; public static List<string> medsZoneStartNodes = new List<string> { "aqua_0", "faen_0", "ulmin_0", "velka_0", "sahti_0", "voidlow_0", "woods_0" }; public static bool medsMPShopRarity = false; public static bool medsMPMapShopCorrupt = false; public static bool medsMPObeliskShopCorrupt = false; public static bool medsMPTownShopCorrupt = false; public static bool medsMPItemCorrupt = false; public static bool medsMPPerkPoints = false; public static bool medsMPCorruptGiovanna = false; public static bool medsMPKeyItems = false; public static bool medsMPAlwaysSucceed = false; public static bool medsMPAlwaysCritSucceed = false; public static bool medsMPCraftCorruptedCards = false; public static bool medsMPInfiniteCardCraft = false; public static bool medsMPStockedShop = false; public static bool medsMPSoloShop = false; public static bool medsMPDropShop = false; private static bool medsMPAllThePets = false; public static bool medsMPDeveloperMode = false; public static bool medsMPJuiceGold = false; public static bool medsMPJuiceDust = false; public static bool medsMPUseClaimation = false; public static bool medsMPDiscountDivination = false; public static bool medsMPDiscountDoomroll = false; public static bool medsMPRavingRerolls = false; public static bool medsMPSmallSanitySupplySelling = false; public static bool medsMPModifyPerks = false; public static bool medsMPPlentifulPetPurchases = false; public static bool medsMPNoPerkRequirements = false; public static bool medsMPTravelAnywhere = false; private static bool medsMPNoClassRequirements = false; private static bool medsMPNoEquipmentRequirements = false; private static bool medsMPNoKeyItemRequirements = false; public static bool medsMPOverlyTenergetic = false; public static bool medsMPOverlyCardergetic = false; public static int medsMPDiminutiveDecks = 1; public static string medsMPDenyDiminishingDecks = ""; public static int medsMPShopBadLuckProtection = 0; public static bool medsMPBugfixEquipmentHP = false; public static bool medsMPDLCClones = false; public static string medsMPDLCCloneTwo = ""; public static string medsMPDLCCloneThree = ""; public static string medsMPDLCCloneFour = ""; public static bool medsMPVisitAllZones = false; public static int medsMPConflictResolution = 0; public static ConfigEntry<string> medsConfigLanguage { get; private set; } public static ConfigEntry<bool> medsSafeMode { get; private set; } public static ConfigEntry<bool> medsKeyItems { get; private set; } public static ConfigEntry<bool> medsJuiceGold { get; private set; } public static ConfigEntry<bool> medsJuiceDust { get; private set; } public static ConfigEntry<bool> medsJuiceSupplies { get; private set; } public static ConfigEntry<bool> medsDeveloperMode { get; private set; } public static ConfigEntry<string> medsExportSettings { get; private set; } public static ConfigEntry<string> medsImportSettings { get; private set; } public static ConfigEntry<int> medsDiminutiveDecks { get; private set; } public static ConfigEntry<string> medsDenyDiminishingDecks { get; private set; } public static ConfigEntry<bool> medsCraftCorruptedCards { get; private set; } public static ConfigEntry<bool> medsInfiniteCardCraft { get; private set; } public static ConfigEntry<bool> medsDLCClones { get; private set; } public static ConfigEntry<string> medsDLCCloneTwo { get; private set; } public static ConfigEntry<string> medsDLCCloneThree { get; private set; } public static ConfigEntry<string> medsDLCCloneFour { get; private set; } public static ConfigEntry<string> medsDLCCloneTwoName { get; private set; } public static ConfigEntry<string> medsDLCCloneThreeName { get; private set; } public static ConfigEntry<string> medsDLCCloneFourName { get; private set; } public static ConfigEntry<bool> medsOver50s { get; private set; } public static ConfigEntry<bool> medsSmallSanitySupplySelling { get; private set; } public static ConfigEntry<bool> medsRavingRerolls { get; private set; } public static ConfigEntry<bool> medsUseClaimation { get; private set; } public static ConfigEntry<bool> medsAlwaysSucceed { get; private set; } public static ConfigEntry<bool> medsAlwaysCritSucceed { get; private set; } public static ConfigEntry<bool> medsNoClassRequirements { get; private set; } public static ConfigEntry<bool> medsNoEquipmentRequirements { get; private set; } public static ConfigEntry<bool> medsNoKeyItemRequirements { get; private set; } public static ConfigEntry<bool> medsTravelAnywhere { get; private set; } public static ConfigEntry<bool> medsVisitAllZones { get; private set; } public static ConfigEntry<bool> medsCorruptGiovanna { get; private set; } public static ConfigEntry<bool> medsLootCorrupt { get; private set; } public static ConfigEntry<bool> medsPerkPoints { get; private set; } public static ConfigEntry<bool> medsModifyPerks { get; private set; } public static ConfigEntry<bool> medsNoPerkRequirements { get; private set; } public static ConfigEntry<bool> medsShopRarity { get; private set; } public static ConfigEntry<int> medsShopBadLuckProtection { get; private set; } public static ConfigEntry<bool> medsMapShopCorrupt { get; private set; } public static ConfigEntry<bool> medsObeliskShopCorrupt { get; private set; } public static ConfigEntry<bool> medsTownShopCorrupt { get; private set; } public static ConfigEntry<bool> medsDiscountDivination { get; private set; } public static ConfigEntry<bool> medsDiscountDoomroll { get; private set; } public static ConfigEntry<bool> medsPlentifulPetPurchases { get; private set; } public static ConfigEntry<bool> medsStockedShop { get; private set; } public static ConfigEntry<bool> medsSoloShop { get; private set; } public static ConfigEntry<bool> medsDropShop { get; private set; } public static ConfigEntry<bool> medsProfane { get; private set; } public static ConfigEntry<bool> medsEmotional { get; private set; } public static ConfigEntry<bool> medsStraya { get; private set; } public static ConfigEntry<string> medsStrayaServer { get; private set; } public static ConfigEntry<bool> medsMaxMultiplayerMembers { get; private set; } public static ConfigEntry<bool> medsOverlyTenergetic { get; private set; } public static ConfigEntry<bool> medsOverlyCardergetic { get; private set; } public static ConfigEntry<bool> medsBugfixEquipmentHP { get; private set; } public static ConfigEntry<bool> medsSkipCinematics { get; private set; } public static ConfigEntry<bool> medsAutoContinue { get; private set; } public static ConfigEntry<bool> medsMPLoadAutoCreateRoom { get; private set; } public static ConfigEntry<bool> medsMPLoadAutoReady { get; private set; } public static ConfigEntry<bool> medsSpacebarContinue { get; private set; } public static ConfigEntry<int> medsConflictResolution { get; private set; } public static ConfigEntry<bool> medsAllThePets { get; private set; } public static bool AlwaysCritSucceedEnabled { get { if (!UseHostSettings()) { return medsMPAlwaysCritSucceed; } return medsAlwaysCritSucceed.Value; } } public static bool AlwaysSucceedEnabled { get { if (!AlwaysCritSucceedEnabled) { if (!UseHostSettings()) { return medsMPAlwaysSucceed; } return medsAlwaysSucceed.Value; } return true; } } private void Awake() { //IL_0020: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008c: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00c1: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_00f6: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012b: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0160: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Expected O, but got Unknown //IL_0195: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Expected O, but got Unknown //IL_01ce: Expected O, but got Unknown //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Expected O, but got Unknown //IL_0207: Expected O, but got Unknown //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_023c: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_029f: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02d4: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Expected O, but got Unknown //IL_0309: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Expected O, but got Unknown //IL_033e: Expected O, but got Unknown //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_0377: Expected O, but got Unknown //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Expected O, but got Unknown //IL_03b0: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Expected O, but got Unknown //IL_03e9: Expected O, but got Unknown //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Expected O, but got Unknown //IL_0422: Expected O, but got Unknown //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Expected O, but got Unknown //IL_045b: Expected O, but got Unknown //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Expected O, but got Unknown //IL_0494: Expected O, but got Unknown //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_04c9: Expected O, but got Unknown //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Expected O, but got Unknown //IL_04fe: Expected O, but got Unknown //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Expected O, but got Unknown //IL_0533: Expected O, but got Unknown //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Expected O, but got Unknown //IL_0568: Expected O, but got Unknown //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Expected O, but got Unknown //IL_059d: Expected O, but got Unknown //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Expected O, but got Unknown //IL_05d2: Expected O, but got Unknown //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0607: Expected O, but got Unknown //IL_0607: Expected O, but got Unknown //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_063c: Expected O, but got Unknown //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Expected O, but got Unknown //IL_0671: Expected O, but got Unknown //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Expected O, but got Unknown //IL_06a6: Expected O, but got Unknown //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Expected O, but got Unknown //IL_06db: Expected O, but got Unknown //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Expected O, but got Unknown //IL_0710: Expected O, but got Unknown //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0745: Expected O, but got Unknown //IL_0745: Expected O, but got Unknown //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_077a: Expected O, but got Unknown //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07af: Expected O, but got Unknown //IL_07af: Expected O, but got Unknown //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07da: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Expected O, but got Unknown //IL_07e4: Expected O, but got Unknown //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Expected O, but got Unknown //IL_0819: Expected O, but got Unknown //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0859: Expected O, but got Unknown //IL_0859: Expected O, but got Unknown //IL_086e: Unknown result type (might be due to invalid IL or missing references) //IL_0884: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Expected O, but got Unknown //IL_088e: Expected O, but got Unknown //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08c3: Expected O, but got Unknown //IL_08c3: Expected O, but got Unknown //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Expected O, but got Unknown //IL_08f8: Expected O, but got Unknown //IL_090d: Unknown result type (might be due to invalid IL or missing references) //IL_0923: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Expected O, but got Unknown //IL_092d: Expected O, but got Unknown //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Expected O, but got Unknown //IL_0962: Expected O, but got Unknown //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Expected O, but got Unknown //IL_0997: Expected O, but got Unknown //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cc: Expected O, but got Unknown //IL_09cc: Expected O, but got Unknown //IL_09e1: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Expected O, but got Unknown //IL_0a01: Expected O, but got Unknown //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a2c: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Expected O, but got Unknown //IL_0a36: Expected O, but got Unknown //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: Unknown result type (might be due to invalid IL or missing references) //IL_0a6b: Expected O, but got Unknown //IL_0a6b: Expected O, but got Unknown //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0aa0: Expected O, but got Unknown //IL_0aa0: Expected O, but got Unknown //IL_0ab5: Unknown result type (might be due to invalid IL or missing references) //IL_0acb: Unknown result type (might be due to invalid IL or missing references) //IL_0ad5: Expected O, but got Unknown //IL_0ad5: Expected O, but got Unknown //IL_0aea: Unknown result type (might be due to invalid IL or missing references) //IL_0b7b: Unknown result type (might be due to invalid IL or missing references) //IL_0b85: Expected O, but got Unknown //IL_0b85: Expected O, but got Unknown //IL_0b9a: Unknown result type (might be due to invalid IL or missing references) //IL_0bb0: Unknown result type (might be due to invalid IL or missing references) //IL_0bba: Expected O, but got Unknown //IL_0bba: Expected O, but got Unknown //IL_0bcf: Unknown result type (might be due to invalid IL or missing references) //IL_0be5: Unknown result type (might be due to invalid IL or missing references) //IL_0bef: Expected O, but got Unknown //IL_0bef: Expected O, but got Unknown //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Unknown result type (might be due to invalid IL or missing references) //IL_0c24: Expected O, but got Unknown //IL_0c24: Expected O, but got Unknown //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c4f: Unknown result type (might be due to invalid IL or missing references) //IL_0c59: Expected O, but got Unknown //IL_0c59: Expected O, but got Unknown //IL_0c6e: Unknown result type (might be due to invalid IL or missing references) //IL_0c84: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Expected O, but got Unknown //IL_0c8e: Expected O, but got Unknown //IL_0ca3: Unknown result type (might be due to invalid IL or missing references) //IL_0cb9: Unknown result type (might be due to invalid IL or missing references) //IL_0cc3: Expected O, but got Unknown //IL_0cc3: Expected O, but got Unknown //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0cee: Unknown result type (might be due to invalid IL or missing references) //IL_0cf8: Expected O, but got Unknown //IL_0cf8: Expected O, but got Unknown //IL_0d0d: Unknown result type (might be due to invalid IL or missing references) //IL_0d23: Unknown result type (might be due to invalid IL or missing references) //IL_0d2d: Expected O, but got Unknown //IL_0d2d: Expected O, but got Unknown //IL_0d42: Unknown result type (might be due to invalid IL or missing references) //IL_0d58: Unknown result type (might be due to invalid IL or missing references) //IL_0d62: Expected O, but got Unknown //IL_0d62: Expected O, but got Unknown //IL_0d77: Unknown result type (might be due to invalid IL or missing references) //IL_0d8d: Unknown result type (might be due to invalid IL or missing references) //IL_0d97: Expected O, but got Unknown //IL_0d97: Expected O, but got Unknown //IL_0dac: Unknown result type (might be due to invalid IL or missing references) //IL_0dc2: Unknown result type (might be due to invalid IL or missing references) //IL_0dcc: Expected O, but got Unknown //IL_0dcc: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Loc.Init(); medsConfigLanguage = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Options", "Config Language"), "Auto", new ConfigDescription("Language of the option descriptions in this file. Auto = follow the game language. Extra languages can be added by dropping a pack into BepInEx/config/Obeliskial_Options/lang/. Restart the game after changing.", (AcceptableValueBase)(object)new AcceptableValueList<string>(Loc.Choices()), Array.Empty<object>())); Loc.SetMode(medsConfigLanguage.Value); medsSafeMode = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Disable All Patches"), false, new ConfigDescription(Loc.D("Startup troubleshooting switch: when true, the mod loads but applies no Harmony patches, so it cannot affect the game at all. Set it back to false (or delete this line) to restore functionality. Requires a game restart."), (AcceptableValueBase)null, Array.Empty<object>())); medsKeyItems = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "All Key Items"), false, new ConfigDescription(Loc.D("Give all key items in Adventure Mode. Items are added when you load into a town; if you've already passed the town and want the key items, use Travel Anywhere to go back to town? I'll add more methods in the future :)."), (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceGold = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Gold ++"), false, new ConfigDescription(Loc.D("Many cash."), (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceDust = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Dust ++"), false, new ConfigDescription(Loc.D("Many cryttals."), (AcceptableValueBase)null, Array.Empty<object>())); medsJuiceSupplies = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Supplies ++"), false, new ConfigDescription(Loc.D("Many supplies."), (AcceptableValueBase)null, Array.Empty<object>())); medsDeveloperMode = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Debug", "Developer Mode"), false, new ConfigDescription(Loc.D("Turns on AtO devs’ developer mode. Back up your saves before using!"), (AcceptableValueBase)null, Array.Empty<object>())); medsExportSettings = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Debug", "Export Settings"), "", new ConfigDescription(Loc.D("Export settings (for use with 'Import Settings')."), (AcceptableValueBase)null, Array.Empty<object>())); medsImportSettings = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Debug", "Import Settings"), "", new ConfigDescription(Loc.D("Paste settings here to import them."), (AcceptableValueBase)null, Array.Empty<object>())); medsDiminutiveDecks = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Cards & Decks", "Minimum Deck Size"), 1, new ConfigDescription(Loc.D("Set the minimum deck size."), (AcceptableValueBase)null, Array.Empty<object>())); medsDenyDiminishingDecks = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Cards & Decks", "Card Removal"), "Can Remove Anything", new ConfigDescription(Loc.D("What cards can be removed at the church?"), (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[4] { "Cannot Remove Cards", "Cannot Remove Curses", "Can Only Remove Curses", "Can Remove Anything" }), Array.Empty<object>())); medsCraftCorruptedCards = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Cards & Decks", "Craft Corrupted Cards"), false, new ConfigDescription(Loc.D("Allow crafting of corrupted cards."), (AcceptableValueBase)null, Array.Empty<object>())); medsInfiniteCardCraft = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Cards & Decks", "Craft Infinite Cards"), false, new ConfigDescription(Loc.D("Infinite card crafts (set available card count to 99)."), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCClones = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Characters", "Enable Clones"), true, new ConfigDescription(Loc.D("Adds three clone characters to the DLC section of Hero Selection."), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneTwo = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 1"), "loremaster", new ConfigDescription(Loc.D("Which subclass should clone 1 be?"), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneThree = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 2"), "loremaster", new ConfigDescription(Loc.D("Which subclass should clone 2 be?"), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneFour = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 3"), "loremaster", new ConfigDescription(Loc.D("Which subclass should clone 3 be?"), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneTwoName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 1 Name"), "Clone", new ConfigDescription(Loc.D("What should clone 1 be called?"), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneThreeName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 2 Name"), "Copy", new ConfigDescription(Loc.D("What should clone 2 be called?"), (AcceptableValueBase)null, Array.Empty<object>())); medsDLCCloneFourName = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Characters", "Clone 3 Name"), "Counterfeit", new ConfigDescription(Loc.D("What should clone 3 be called?"), (AcceptableValueBase)null, Array.Empty<object>())); medsOver50s = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Characters", "Level Past 50"), true, new ConfigDescription(Loc.D("Allows characters to be raised up to rank 500."), (AcceptableValueBase)null, Array.Empty<object>())); medsSmallSanitySupplySelling = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Sell Supplies"), true, new ConfigDescription(Loc.D("Sell supplies on high madness."), (AcceptableValueBase)null, Array.Empty<object>())); medsRavingRerolls = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Shop Rerolls"), true, new ConfigDescription(Loc.D("Allow multiple shop rerolls on high madness."), (AcceptableValueBase)null, Array.Empty<object>())); medsUseClaimation = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Corruption & Madness", "Use Claims"), true, new ConfigDescription(Loc.D("Use claims on any madness. Note that you cannot _get_ claims on high madness (yet...)."), (AcceptableValueBase)null, Array.Empty<object>())); medsAlwaysSucceed = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Always Succeed Event Rolls"), false, new ConfigDescription(Loc.D("Every event roll succeeds, no matter how bad the roll would have been. The dice shown on screen may not match the result."), (AcceptableValueBase)null, Array.Empty<object>())); medsAlwaysCritSucceed = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Always Critical Succeed Event Rolls"), false, new ConfigDescription(Loc.D("Every event roll is a critical success. Events that have a dedicated critical-success branch use it; events without one simply succeed. Implies 'Always Succeed Event Rolls'."), (AcceptableValueBase)null, Array.Empty<object>())); medsNoClassRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Class Requirements"), false, new ConfigDescription(Loc.D("(IN TESTING) Events and replies ignore class requirements."), (AcceptableValueBase)null, Array.Empty<object>())); medsNoEquipmentRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Equipment Requirements"), false, new ConfigDescription(Loc.D("(IN TESTING) Events and replies ignore equipment/pet requirements."), (AcceptableValueBase)null, Array.Empty<object>())); medsNoKeyItemRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "No Key Item Requirements"), false, new ConfigDescription(Loc.D("(IN TESTING) Events and replies ignore key item / quest requirements."), (AcceptableValueBase)null, Array.Empty<object>())); medsTravelAnywhere = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Travel Anywhere"), false, new ConfigDescription(Loc.D("Travel to any node."), (AcceptableValueBase)null, Array.Empty<object>())); medsVisitAllZones = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Events & Nodes", "Visit All Zones"), false, new ConfigDescription(Loc.D("You can choose any location to visit from the obelisk (e.g. can go to the Void early, can visit all locations before going, etc.)."), (AcceptableValueBase)null, Array.Empty<object>())); medsCorruptGiovanna = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Loot", "Corrupted Card Rewards"), false, new ConfigDescription(Loc.D("Card rewards are always corrupted (includes divinations)."), (AcceptableValueBase)null, Array.Empty<object>())); medsLootCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Loot", "Corrupted Loot Rewards"), false, new ConfigDescription(Loc.D("Make item loot rewards always corrupted."), (AcceptableValueBase)null, Array.Empty<object>())); medsPerkPoints = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "Many Perk Points"), false, new ConfigDescription(Loc.D("(IN TESTING - visually buggy but functional) Set maximum perk points to 1000."), (AcceptableValueBase)null, Array.Empty<object>())); medsModifyPerks = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "Modify Perks Whenever"), false, new ConfigDescription(Loc.D("(IN TESTING) Change perks whenever you want."), (AcceptableValueBase)null, Array.Empty<object>())); medsNoPerkRequirements = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Perks", "No Perk Requirements"), false, new ConfigDescription(Loc.D("Can select perk without selecting its precursor perks; ignore minimum selected perk count for each row."), (AcceptableValueBase)null, Array.Empty<object>())); medsShopRarity = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Adjusted Shop Rarity"), false, new ConfigDescription(Loc.D("Modify shop rarity based on current madness/corruption. This also makes the change in rarity from act 1 to 4 _slightly_ less abrupt."), (AcceptableValueBase)null, Array.Empty<object>())); medsShopBadLuckProtection = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Shop", "Bad Luck Protection"), 10, new ConfigDescription(Loc.D("Increases rarity of shops/loot based on number of shops/loot seen since an item was last acquired. If you play with discounted rerolls I recommend setting this to ~10; if you play without, I recommend ~300 :)"), (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>())); medsMapShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Map Shops"), true, new ConfigDescription(Loc.D("Allow shops on the map (e.g. werewolf shop in Senenthia) to have corrupted goods for sale."), (AcceptableValueBase)null, Array.Empty<object>())); medsObeliskShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Obelisk Shops"), true, new ConfigDescription(Loc.D("Allow obelisk corruption shops to have corrupted goods for sale."), (AcceptableValueBase)null, Array.Empty<object>())); medsTownShopCorrupt = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Corrupted Town Shops"), true, new ConfigDescription(Loc.D("Allow town shops to have corrupted goods for sale."), (AcceptableValueBase)null, Array.Empty<object>())); medsDiscountDivination = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Discount Divination"), true, new ConfigDescription(Loc.D("Discounts are applied to divinations."), (AcceptableValueBase)null, Array.Empty<object>())); medsDiscountDoomroll = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Discount Doomroll"), true, new ConfigDescription(Loc.D("Discounts are applied to shop rerolls."), (AcceptableValueBase)null, Array.Empty<object>())); medsPlentifulPetPurchases = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Plentiful Pet Purchases"), true, new ConfigDescription(Loc.D("Buy more than one of each pet."), (AcceptableValueBase)null, Array.Empty<object>())); medsStockedShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Post-Scarcity Shops"), true, new ConfigDescription(Loc.D("Does not record who purchased what in the shop."), (AcceptableValueBase)null, Array.Empty<object>())); medsSoloShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Individual Player Shops"), true, new ConfigDescription(Loc.D("Does not send shop purchase records in multiplayer."), (AcceptableValueBase)null, Array.Empty<object>())); medsDropShop = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Shop", "Drop-Only Items Appear In Shops"), true, new ConfigDescription(Loc.D("Items that would normally not appear in shops, such as the Yggdrasil Root or Yogger's Cleaver, will appear."), (AcceptableValueBase)null, Array.Empty<object>())); medsProfane = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Allow Profanities"), true, new ConfigDescription(Loc.D("Allow profanities in your good Christian Piss server."), (AcceptableValueBase)null, Array.Empty<object>())); medsEmotional = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Emotional"), true, new ConfigDescription(Loc.D("Use more emotes during combat."), (AcceptableValueBase)null, Array.Empty<object>())); medsStraya = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Force Select Server"), false, new ConfigDescription(Loc.D("Force server selection to location of your choice (default: Australia)."), (AcceptableValueBase)null, Array.Empty<object>())); medsStrayaServer = ((BaseUnityPlugin)this).Config.Bind<string>(new ConfigDefinition("Should Be Vanilla", "Force Select Server Selection"), "au", new ConfigDescription(Loc.D("Which server should be forced if the above option is true?"), (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[13] { "asia", "au", "cae", "eu", "in", "jp", "ru", "rue", "za", "sa", "kr", "us", "usw" }), Array.Empty<object>())); medsMaxMultiplayerMembers = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Max Multiplayer Members"), true, new ConfigDescription(Loc.D("Change the default player count in multiplDefault to 4 players in multiplayer."), (AcceptableValueBase)null, Array.Empty<object>())); medsOverlyTenergetic = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Overly Tenergetic"), true, new ConfigDescription(Loc.D("Allow characters to have more than 10 energy."), (AcceptableValueBase)null, Array.Empty<object>())); medsOverlyCardergetic = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Overly Cardergetic"), true, new ConfigDescription(Loc.D("(IN TESTING) Allow characters to have more than 10 cards."), (AcceptableValueBase)null, Array.Empty<object>())); medsBugfixEquipmentHP = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Bugfix: Equipment HP"), true, new ConfigDescription(Loc.D("(IN TESTING - visually buggy but functional) Fixes a vanilla bug that allows infinite stacking of HP by buying the same item repeatedly."), (AcceptableValueBase)null, Array.Empty<object>())); medsSkipCinematics = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Skip Cinematics"), false, new ConfigDescription(Loc.D("Skip cinematics."), (AcceptableValueBase)null, Array.Empty<object>())); medsAutoContinue = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Continue"), false, new ConfigDescription(Loc.D("(IN TESTING - visually buggy but functional) Automatically press 'Continue' in events."), (AcceptableValueBase)null, Array.Empty<object>())); medsMPLoadAutoCreateRoom = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Create Room on MP Load"), true, new ConfigDescription(Loc.D("Use previous settings to automatically create lobby room when loading multiplayer game."), (AcceptableValueBase)null, Array.Empty<object>())); medsMPLoadAutoReady = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Auto Ready on MP Load"), true, new ConfigDescription(Loc.D("Automatically readies up non-host players when loading multiplayer game."), (AcceptableValueBase)null, Array.Empty<object>())); medsSpacebarContinue = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "Spacebar to Continue"), true, new ConfigDescription(Loc.D("Spacebar clicks the 'Continue' button in events for you."), (AcceptableValueBase)null, Array.Empty<object>())); medsConflictResolution = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Should Be Vanilla", "Conflict Resolution"), 4, new ConfigDescription(Loc.D("(IN TESTING) Automatically select (1) lowest card; (2) closest to 2; (3) highest card; or (4) random to determine multiplayer conflicts."), (AcceptableValueBase)null, Array.Empty<object>())); medsAllThePets = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Should Be Vanilla", "All The Pets"), true, new ConfigDescription(Loc.D("(IN TESTING) Shows blob pets and Harley in the Tome of Knowledge and shop."), (AcceptableValueBase)null, Array.Empty<object>())); medsImportSettings.Value = ""; medsExportSettings.Value = SettingsToString(); medsKeyItems.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceGold.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceDust.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsJuiceSupplies.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDeveloperMode.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsExportSettings.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsImportSettings.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiminutiveDecks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDenyDiminishingDecks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsCraftCorruptedCards.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsInfiniteCardCraft.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSmallSanitySupplySelling.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsRavingRerolls.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsUseClaimation.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAlwaysSucceed.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAlwaysCritSucceed.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoClassRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoEquipmentRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoKeyItemRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsTravelAnywhere.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsCorruptGiovanna.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsLootCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsPerkPoints.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsModifyPerks.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsNoPerkRequirements.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsShopRarity.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsShopBadLuckProtection.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMapShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsObeliskShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsTownShopCorrupt.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiscountDivination.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDiscountDoomroll.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsPlentifulPetPurchases.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStockedShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSoloShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsProfane.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsEmotional.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStraya.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsStrayaServer.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMaxMultiplayerMembers.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOverlyTenergetic.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOverlyCardergetic.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsBugfixEquipmentHP.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSkipCinematics.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAutoContinue.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMPLoadAutoCreateRoom.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsMPLoadAutoReady.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsSpacebarContinue.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCClones.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneTwo.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneThree.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneFour.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneTwoName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneThreeName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDLCCloneFourName.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsOver50s.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsDropShop.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsVisitAllZones.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsConflictResolution.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsAllThePets.SettingChanged += delegate { if (!bUpdatingSettings) { SettingsUpdated(); } }; medsImportSettings.SettingChanged += delegate { StringToSettings(medsImportSettings.Value); }; Essentials.RegisterMod("Obeliskial_Options", "stiffmeds", "Options to alter gameplay.", "2.3.2", 20261129, "https://across-the-obelisk.thunderstore.io/package/meds/Obeliskial_Options/", (string[])null, "", 90, new string[1] { "settings" }, "", true); if (medsSafeMode.Value) { LogWarning("com.stiffmeds.obeliskialoptions 2.3.2: Safe Mode is ON, no patches applied."); return; } try { PatchAllResilient(); ConfigUIDropdownPatch.Apply(harmony); LogPatchSummary(); LogInfo("com.stiffmeds.obeliskialoptions 2.3.2 has loaded! Prayge "); } catch (Exception arg) { LogError(string.Format("{0} {1} harmony patching FAILED: {2}", "com.stiffmeds.obeliskialoptions", "2.3.2", arg)); } } private void PatchAllResilient() { int num = 0; int num2 = 0; Type[] types = typeof(Options).Assembly.GetTypes(); foreach (Type type in types) { if (type.GetCustomAttributes(typeof(HarmonyPatch), inherit: true).Length != 0) { try { harmony.CreateClassProcessor(type).Patch(); num++; } catch (Exception ex) { num2++; LogError("[patch] " + type.Name + " failed: " + ex.GetType().Name + " " + ex.Message); } } } LogInfo("[patch] " + num + " patch classes applied, " + num2 + " failed"); } private void LogPatchSummary() { try { string[] array = new string[6] { "RollManager", "CharRollData", "EventResultManager", "EventReplyData", "EventManager", "HeroSelectionManager" }; List<string> list = new List<string>(); foreach (MethodBase patchedMethod in harmony.GetPatchedMethods()) { string text = ((patchedMethod.DeclaringType != null) ? patchedMethod.DeclaringType.Name : string.Empty); bool flag = text.Contains("StartCoContinue"); for (int i = 0; i < array.Length; i++) { if (flag) { break; } flag = text == array[i]; } if (flag) { list.Add(text + "." + patchedMethod.Name); } } LogInfo("[patch] " + list.Count + " key targets patched: " + string.Join(", ", list.ToArray())); } catch (Exception ex) { LogWarning("[patch] summary failed: " + ex.Message); } } private static bool UseHostSettings() { try { return Essentials.IsHost(); } catch { return true; } } public static Hero[] GetTeamHeroes() { Hero[] array = (Hero[])(object)new Hero[4]; GameTeam val = (((Object)(object)AtOManager.Instance != (Object)null) ? AtOManager.Instance.team : null); if (val == null) { return array; } for (int i = 0; i < 4 && i < val.Size; i++) { array[i] = val.GetHero(i); } return array; } internal static void LogDebug(string msg) { Log.LogDebug((object)msg); } internal static void LogInfo(string msg) { Log.LogInfo((object)msg); } internal static void LogWarning(string msg) { Log.LogWarning((object)msg); } internal static void LogError(string msg) { Log.LogError((object)msg); } private void LogHandler(string message, LogType type) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected I4, but got Unknown string msg = message?.ToString() ?? ""; switch ((int)type) { case 1: case 3: LogInfo(msg); break; case 2: LogWarning(msg); break; case 0: case 4: LogError(msg); break; } } public static string SettingsToString(bool forMP = false) { string text = string.Join("|", medsShopRarity.Value ? "1" : "0", medsMapShopCorrupt.Value ? "1" : "0", medsObeliskShopCorrupt.Value ? "1" : "0", medsTownShopCorrupt.Value ? "1" : "0", medsLootCorrupt.Value ? "1" : "0", medsPerkPoints.Value ? "1" : "0", medsCorruptGiovanna.Value ? "1" : "0", medsKeyItems.Value ? "1" : "0", "0", medsOverlyCardergetic.Value ? "1" : "0", medsCraftCorruptedCards.Value ? "1" : "0", medsInfiniteCardCraft.Value ? "1" : "0", medsStockedShop.Value ? "1" : "0", medsSoloShop.Value ? "1" : "0", medsDeveloperMode.Value ? "1" : "0", (medsDLCClones.Value ? "1" : "0") + "&" + medsDLCCloneTwo.Value + "&" + medsDLCCloneThree.Value + "&" + medsDLCCloneFour.Value, medsUseClaimation.Value ? "1" : "0", medsDiscountDivination.Value ? "1" : "0", medsDiscountDoomroll.Value ? "1" : "0", medsRavingRerolls.Value ? "1" : "0", medsSmallSanitySupplySelling.Value ? "1" : "0", medsModifyPerks.Value ? "1" : "0", medsNoPerkRequirements.Value ? "1" : "0", medsPlentifulPetPurchases.Value ? "1" : "0", medsTravelAnywhere.Value ? "1" : "0", medsAllThePets.Value ? "1" : "0", medsNoClassRequirements.Value ? "1" : "0", medsNoEquipmentRequirements.Value ? "1" : "0", medsNoKeyItemRequirements.Value ? "1" : "0", medsOverlyTenergetic.Value ? "1" : "0", medsDiminutiveDecks.Value.ToString(), medsDenyDiminishingDecks.Value, medsShopBadLuckProtection.Value.ToString(), medsBugfixEquipmentHP.Value ? "1" : "0", medsJuiceGold.Value ? "1" : "0", medsJuiceDust.Value ? "1" : "0", medsDropShop.Value ? "1" : "0", medsVisitAllZones.Value ? "1" : "0", medsConflictResolution.Value.ToString(), medsAlwaysSucceed.Value ? "1" : "0", medsAlwaysCritSucceed.Value ? "1" : "0"); if (!forMP) { string[] array = new string[15]; array[0] = (medsProfane.Value ? "1" : "0"); array[0] = "%|" + array[0]; array[1] = (medsEmotional.Value ? "1" : "0"); array[2] = (medsStraya.Value ? "1" : "0"); array[3] = medsStrayaServer.Value; array[4] = (medsMaxMultiplayerMembers.Value ? "1" : "0"); array[5] = (medsSkipCinematics.Value ? "1" : "0"); array[6] = (medsAutoContinue.Value ? "1" : "0"); array[7] = (medsJuiceSupplies.Value ? "1" : "0"); array[8] = (medsMPLoadAutoCreateRoom.Value ? "1" : "0"); array[9] = (medsMPLoadAutoReady.Value ? "1" : "0"); array[10] = (medsSpacebarContinue.Value ? "1" : "0"); array[11] = medsDLCCloneTwoName.Value; array[12] = medsDLCCloneThreeName.Value; array[13] = medsDLCCloneFourName.Value; array[14] = (medsOver50s.Value ? "1" : "0"); text += string.Join("|", array); } return text; } public static void StringToSettings(string incomingSettings) { string[] array = incomingSettings.Split("|%|"); if (array.Length == 2) { string[] array2 = array[1].Split("|"); if (array2.Length >= 1) { medsProfane.Value = array2[0] == "1"; } if (array2.Length >= 2) { medsEmotional.Value = array2[1] == "1"; } if (array2.Length >= 3) { medsStraya.Value = array2[2] == "1"; } if (array2.Length >= 4) { medsStrayaServer.Value = array2[3]; } if (array2.Length >= 5) { medsMaxMultiplayerMembers.Value = array2[4] == "1"; } if (array2.Length >= 6) { medsSkipCinematics.Value = array2[5] == "1"; } if (array2.Length >= 7) { medsAutoContinue.Value = array2[6] == "1"; } if (array2.Length >= 8) { medsJuiceSupplies.Value = array2[7] == "1"; } if (array2.Length >= 9) { medsMPLoadAutoCreateRoom.Value = array2[8] == "1"; } if (array2.Length >= 10) { medsMPLoadAutoReady.Value = array2[9] == "1"; } if (array2.Length >= 11) { medsSpacebarContinue.Value = array2[10] == "1"; } if (array2.Length >= 12) { medsDLCCloneTwoName.Value = array2[11]; } if (array2.Length >= 13) { medsDLCCloneThreeName.Value = array2[12]; } if (array2.Length >= 14) { medsDLCCloneFourName.Value = array2[13]; } if (array2.Length >= 15) { medsOver50s.Value = array2[14] == "1"; } } array = array[0].Split("|"); if (array.Length >= 1) { medsShopRarity.Value = array[0] == "1"; } if (array.Length >= 2) { medsMapShopCorrupt.Value = array[1] == "1"; } if (array.Length >= 3) { medsObeliskShopCorrupt.Value = array[2] == "1"; } if (array.Length >= 4) { medsTownShopCorrupt.Value = array[3] == "1"; } if (array.Length >= 5) { medsLootCorrupt.Value = array[4] == "1"; } if (array.Length >= 6) { medsPerkPoints.Value = array[5] == "1"; } if (array.Length >= 7) { medsCorruptGiovanna.Value = array[6] == "1"; } if (array.Length >= 8) { medsKeyItems.Value = array[7] == "1"; } if (array.Length >= 10) { medsOverlyCardergetic.Value = array[9] == "1"; } if (array.Length >= 11) { medsCraftCorruptedCards.Value = array[10] == "1"; } if (array.Length >= 12) { medsInfiniteCardCraft.Value = array[11] == "1"; } if (array.Length >= 13) { medsStockedShop.Value = array[12] == "1"; } if (array.Length >= 14) { medsSoloShop.Value = array[13] == "1"; } if (array.Length >= 15) { medsDeveloperMode.Value = array[14] == "1"; } if (array.Length >= 16) { medsDLCClones.Value = array[15].Split("&")[0] == "1"; medsDLCCloneTwo.Value = array[15].Split("&")[1]; medsDLCCloneThree.Value = array[15].Split("&")[2]; medsDLCCloneFour.Value = array[15].Split("&")[3]; } if (array.Length >= 17) { medsUseClaimation.Value = array[16] == "1"; } if (array.Length >= 18) { medsDiscountDivination.Value = array[17] == "1"; } if (array.Length >= 19) { medsDiscountDoomroll.Value = array[18] == "1"; } if (array.Length >= 20) { medsRavingRerolls.Value = array[19] == "1"; } if (array.Length >= 21) { medsSmallSanitySupplySelling.Value = array[20] == "1"; } if (array.Length >= 22) { medsModifyPerks.Value = array[21] == "1"; } if (array.Length >= 23) { medsNoPerkRequirements.Value = array[22] == "1"; } if (array.Length >= 24) { medsPlentifulPetPurchases.Value = array[23] == "1"; } if (array.Length >= 25) { medsTravelAnywhere.Value = array[24] == "1"; } if (array.Length >= 26) { medsAllThePets.Value = array[25] == "1"; } if (array.Length >= 27) { medsNoClassRequirements.Value = array[26] == "1"; } if (array.Length >= 28) { medsNoEquipmentRequirements.Value = array[27] == "1"; } if (array.Length >= 29) { medsNoClassRequirements.Value = array[28] == "1"; } if (array.Length >= 30) { medsOverlyTenergetic.Value = array[29] == "1"; } if (array.Length >= 31) { medsDiminutiveDecks.Value = int.Parse(array[30]); } if (array.Length >= 32) { medsDenyDiminishingDecks.Value = array[31]; } if (array.Length >= 33) { medsShopBadLuckProtection.Value = int.Parse(array[32]); } if (array.Length >= 34) { medsBugfixEquipmentHP.Value = array[33] == "1"; } if (array.Length >= 35) { medsJuiceGold.Value = array[34] == "1"; } if (array.Length >= 36) { medsJuiceDust.Value = array[35] == "1"; } if (array.Length >= 37) { medsDropShop.Value = array[36] == "1"; } if (array.Length >= 38) { medsVisitAllZones.Value = array[37] == "1"; } if (array.Length >= 39) { medsConflictResolution.Value = int.Parse(array[38]); } if (array.Length >= 40) { medsAlwaysSucceed.Value = array[39] == "1"; } if (array.Length >= 41) { medsAlwaysCritSucceed.Value = array[40] == "1"; } medsExportSettings.Value = SettingsToString(); medsImportSettings.Value = ""; } public static void SaveMPSettings(string _newSettings) { //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Expected O, but got Unknown List<string> list = new List<string>(); Log.LogDebug((object)("RECEIVING SETTINGS: " + _newSettings)); string[] array = _newSettings.Split("|"); if (array.Length >= 1) { medsMPShopRarity = array[0] == "1"; } if (array.Length >= 2) { medsMPObeliskShopCorrupt = array[1] == "1"; } if (array.Length >= 3) { medsMPMapShopCorrupt = array[2] == "1"; } if (array.Length >= 4) { medsMPTownShopCorrupt = array[3] == "1"; } if (array.Length >= 5) { medsMPItemCorrupt = array[4] == "1"; } if (array.Length >= 6) { medsMPPerkPoints = array[5] == "1"; } if (array.Length >= 7) { medsMPCorruptGiovanna = array[6] == "1"; } if (array.Length >= 8) { medsMPKeyItems = array[7] == "1"; } if