Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of LostAndFound v1.2.2
LostAndFound.dll
Decompiled a month agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using On.RoR2; using Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using UnityEngine; using UnityEngine.AddressableAssets; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ExamplePlugin")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ExamplePlugin")] [assembly: AssemblyTitle("ExamplePlugin")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace src { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Pudwinks.LostAndFound", "LostAndFound", "1.2.0")] public class LostAndFound : BaseUnityPlugin { public abstract class Interactable { public virtual void SimulateDrop() { } public virtual Vector3 GetPosition() { //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_0018: Unknown result type (might be due to invalid IL or missing references) return new Vector3(0f, 0f, 0f); } internal void CreateDropOrb(Vector3 effectOrigin, GameObject targetObject, PickupDef pickupDef) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_002d: Expected O, but got Unknown EffectData val = new EffectData { origin = effectOrigin, genericFloat = 1.5f, genericUInt = (uint)(pickupDef.pickupIndex.value + 1) }; val.SetNetworkedObjectReference(targetObject); EffectManager.SpawnEffect(_effectPrefab, val, false); } } public class PurchaseInteractable : Interactable { public PurchaseInteraction pi; public PurchaseInteractable(PurchaseInteraction pi) { this.pi = pi; } public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)pi).transform.position; } public override void SimulateDrop() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) if (pi.displayNameToken.Contains("CHEST") || pi.displayNameToken.Contains("EQUIPMENTBARREL") || pi.displayNameToken == "LOCKBOX_NAME") { ChestBehavior component = ((Component)pi).GetComponent<ChestBehavior>(); if (Object.op_Implicit((Object)(object)component)) { CreateDropOrb(((Component)pi).gameObject.transform.position + new Vector3(0f, 3.5f, 0f), ((Component)pi).gameObject, PickupCatalog.GetPickupDef(component.currentPickup.pickupIndex)); } } else if (pi.displayNameToken.Contains("CHANCE")) { ShrineChanceBehavior component2 = ((Component)pi).GetComponent<ShrineChanceBehavior>(); if (!Object.op_Implicit((Object)(object)component2)) { return; } float num = 360f / (float)component2.maxPurchaseCount; Vector3 val = Quaternion.AngleAxis(90f, Vector3.up) * ((Component)pi).gameObject.transform.forward * 2f; int num2 = component2.successfulPurchaseCount; while (num2 < component2.maxPurchaseCount) { if (component2.rng.nextNormalizedFloat > component2.failureChance) { float num3 = num * (float)num2; CreateDropOrb(((Component)pi).gameObject.transform.position + new Vector3(0f, 3.5f, 0f) + Quaternion.AngleAxis(num3, Vector3.up) * val, ((Component)pi).gameObject, PickupCatalog.GetPickupDef(component2.dropTable.GeneratePickup(component2.rng).pickupIndex)); num2++; } } } else if (pi.displayNameToken == "VOID_TRIPLE_NAME" || (pi.displayNameToken == "VOIDLOCKBOX_NAME" && !cnfgShowVoidKeyContents.Value)) { OptionChestBehavior component3 = ((Component)pi).GetComponent<OptionChestBehavior>(); if (Object.op_Implicit((Object)(object)component3)) { float num4 = 360f / (float)component3.generatedPickups.Count; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(0f, 0f, 1f + 0.16f * (float)component3.generatedPickups.Count); for (int i = 0; i < component3.generatedPickups.Count; i++) { float num5 = num4 * (float)i; CreateDropOrb(((Component)pi).gameObject.transform.position + new Vector3(0f, 3.5f, 0f) + Quaternion.AngleAxis(num5, Vector3.up) * val2, ((Component)pi).gameObject, PickupCatalog.GetPickupDef(component3.generatedPickups[i].pickupIndex)); } } } else { if (!(pi.displayNameToken == "SCAVBACKPACK_NAME")) { return; } ChestBehavior component4 = ((Component)pi).GetComponent<ChestBehavior>(); if (!Object.op_Implicit((Object)(object)component4)) { return; } float num6 = 36f; Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0f, 0f, 4f); for (int j = 0; j < 10; j++) { float num7 = num6 * (float)j; component4.RollItem(); CreateDropOrb(((Component)pi).gameObject.transform.position + new Vector3(0f, 6.5f, 0f) + Quaternion.AngleAxis(num7, Vector3.up) * val3, ((Component)pi).gameObject, PickupCatalog.GetPickupDef(component4.currentPickup.pickupIndex)); for (int k = 0; k < component4.dropCount; k++) { component4.Roll(); } } } } } public class Printer3DInteractable : Interactable { public PurchaseInteraction pi; public bool usedPrinter; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)pi).transform.position; } public Printer3DInteractable(PurchaseInteraction pi) { this.pi = pi; } } public class DroneMultiShopInteractable : Interactable { public DroneVendorMultiShopController dvmsc; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)dvmsc).transform.position; } public DroneMultiShopInteractable(DroneVendorMultiShopController dvmsc) { this.dvmsc = dvmsc; } } public class MultiShopInteractable : Interactable { public MultiShopController msc; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)msc).transform.position; } public MultiShopInteractable(MultiShopController msc) { this.msc = msc; } public override void SimulateDrop() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) GameObject[] terminalGameObjects = msc.terminalGameObjects; foreach (GameObject val in terminalGameObjects) { ShopTerminalBehavior component = val.GetComponent<ShopTerminalBehavior>(); if (Object.op_Implicit((Object)(object)component)) { CreateDropOrb(val.transform.position + new Vector3(0f, 5f, 0f), val, PickupCatalog.GetPickupDef(component.Networkpickup.pickupIndex)); } } } } public class GenericPickupControllerInteractable : Interactable { public GenericPickupController gpc; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)gpc).transform.position; } public GenericPickupControllerInteractable(GenericPickupController gpc) { this.gpc = gpc; } } public class ScrapperInteractable : Interactable { public ScrapperController sc; public bool usedScrapper; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)sc).transform.position; } public ScrapperInteractable(ScrapperController sc) { this.sc = sc; } } public class PotentialInteractable : Interactable { public PickupPickerController ppc; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)ppc).transform.position; } public PotentialInteractable(PickupPickerController ppc) { this.ppc = ppc; } public override void SimulateDrop() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) float num = 360f / (float)ppc.options.Length; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 0f, 1f + 0.16f * (float)ppc.options.Length); for (int i = 0; i < ppc.options.Length; i++) { if (ppc.options[i].available) { float num2 = num * (float)i; CreateDropOrb(((Component)ppc).gameObject.transform.position + new Vector3(0f, 3.5f, 0f) + Quaternion.AngleAxis(num2, Vector3.up) * val, ((Component)ppc).gameObject, PickupCatalog.GetPickupDef(ppc.options[i].pickup.pickupIndex)); } } } } public class BarrelInteractable : Interactable { public BarrelInteraction bi; public override Vector3 GetPosition() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return ((Component)bi).transform.position; } public BarrelInteractable(BarrelInteraction bi) { this.bi = bi; } } private static GameObject _effectPrefab; public const string PluginGUID = "Pudwinks.LostAndFound"; public const string PluginAuthor = "Pudwinks"; public const string PluginName = "LostAndFound"; public const string PluginVersion = "1.2.0"; public static bool recapRunning; private int index = -1; public ListWithEvents<Interactable> interactables = new ListWithEvents<Interactable>(); public ListWithEvents<Interactable> remainingInteractables = new ListWithEvents<Interactable>(); private ConfigEntry<bool> cnfgShowNewtAltars; private ConfigEntry<bool> cnfgShowBarrels; private ConfigEntry<bool> cnfgShowItemsOnGround; private ConfigEntry<bool> cnfgShowDrones; private ConfigEntry<bool> cnfgShowDroneScrappers; private ConfigEntry<bool> cnfgShow3DPrinters; private ConfigEntry<bool> cnfgShowLunarPods; private ConfigEntry<bool> cnfgShowContents; public static ConfigEntry<bool> cnfgShowVoidKeyContents; private ConfigEntry<KeyboardShortcut> kbGoNext; private ConfigEntry<KeyboardShortcut> kbGoPrevious; private ConfigEntry<KeyboardShortcut> kbFinishRecap; public static ConfigEntry<KeyboardShortcut> kbZoomIn; public static ConfigEntry<KeyboardShortcut> kbZoomOut; public bool didScrap; private Camera cama; private GameObject cam; public static CameraRigController camera; private void InitializeRiskOfOptions() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Expected O, but got Unknown //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Expected O, but got Unknown //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Expected O, but got Unknown //IL_049a: Unknown result type (might be due to invalid IL or missing references) ConfigDescription val = new ConfigDescription("Set to true if you want to see newt altars in the recap. Default is false to avoid potential spoilers.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val2 = new ConfigDefinition("General", "Show newt altars"); cnfgShowNewtAltars = ((BaseUnityPlugin)this).Config.Bind<bool>(val2, false, val); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowNewtAltars); } ConfigDescription val3 = new ConfigDescription("Set to true if you want to see items on the ground in the recap. If you forgot to pick something up, it'll show up. Does not show void items.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val4 = new ConfigDefinition("General", "Show items on ground"); cnfgShowItemsOnGround = ((BaseUnityPlugin)this).Config.Bind<bool>(val4, true, val3); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowItemsOnGround); } ConfigDescription val5 = new ConfigDescription("Set to true if you want to see lunar pods in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val6 = new ConfigDefinition("General", "Show lunar pods"); cnfgShowLunarPods = ((BaseUnityPlugin)this).Config.Bind<bool>(val6, false, val5); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowLunarPods); } ConfigDescription val7 = new ConfigDescription("Set to true if you want to see white and green 3D printers in the recap. Setting this to false will only hide white and green printers, since they are the most common. Red and boss printers remain visible regardless of this setting.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val8 = new ConfigDefinition("General", "Show white/green 3D printers"); cnfgShow3DPrinters = ((BaseUnityPlugin)this).Config.Bind<bool>(val8, true, val7); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShow3DPrinters); } ConfigDescription val9 = new ConfigDescription("Set to true if you want to see drones in the recap. TC-280 drone always shows up regardless of this setting. Because it's a cool drone.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val10 = new ConfigDefinition("General", "Show drones"); cnfgShowDrones = ((BaseUnityPlugin)this).Config.Bind<bool>(val10, true, val9); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowDrones); } ConfigDescription val11 = new ConfigDescription("Set to true if you want to see drone scrappers in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val12 = new ConfigDefinition("General", "Show drone scrappers"); cnfgShowDroneScrappers = ((BaseUnityPlugin)this).Config.Bind<bool>(val12, false, val11); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowDroneScrappers); } ConfigDescription val13 = new ConfigDescription("Set to true if you want to see barrels in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val14 = new ConfigDefinition("General", "Show barrels"); cnfgShowBarrels = ((BaseUnityPlugin)this).Config.Bind<bool>(val14, false, val13); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowBarrels); } ConfigDescription val15 = new ConfigDescription("Set to true if you want to see container contents in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val16 = new ConfigDefinition("General", "Show container contents"); cnfgShowContents = ((BaseUnityPlugin)this).Config.Bind<bool>(val16, true, val15); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowContents); } ConfigDescription val17 = new ConfigDescription("Set to true if you want to see the contents of Encrusted Caches (corrupted form of the Rusted Key lockbox). Irrelevant if \"Show container contents\" is false.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val18 = new ConfigDefinition("General", "Show Encrusted Cache contents"); cnfgShowVoidKeyContents = ((BaseUnityPlugin)this).Config.Bind<bool>(val18, true, val17); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<bool>(cnfgShowVoidKeyContents); } ConfigDescription val19 = new ConfigDescription("Which key to use to show the next interactable in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val20 = new ConfigDefinition("Keybinds", "Next interactable"); KeyboardShortcut val21 = default(KeyboardShortcut); ((KeyboardShortcut)(ref val21))..ctor((KeyCode)323, Array.Empty<KeyCode>()); kbGoNext = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(val20, val21, val19); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<KeyboardShortcut>(kbGoNext); } ConfigDescription val22 = new ConfigDescription("Which key to use to show the previous interactable in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val23 = new ConfigDefinition("Keybinds", "Previous interactable"); KeyboardShortcut val24 = default(KeyboardShortcut); ((KeyboardShortcut)(ref val24))..ctor((KeyCode)324, Array.Empty<KeyCode>()); kbGoPrevious = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(val23, val24, val22); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<KeyboardShortcut>(kbGoPrevious); } ConfigDescription val25 = new ConfigDescription("Which key to use to zoom out the camera in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val26 = new ConfigDefinition("Keybinds", "Zoom out"); KeyboardShortcut val27 = default(KeyboardShortcut); ((KeyboardShortcut)(ref val27))..ctor((KeyCode)97, Array.Empty<KeyCode>()); kbZoomOut = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(val26, val27, val25); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<KeyboardShortcut>(kbZoomOut); } ConfigDescription val28 = new ConfigDescription("Which key to use to zoom in the camera in the recap.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val29 = new ConfigDefinition("Keybinds", "Zoom in"); KeyboardShortcut val30 = default(KeyboardShortcut); ((KeyboardShortcut)(ref val30))..ctor((KeyCode)100, Array.Empty<KeyCode>()); kbZoomIn = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(val29, val30, val28); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<KeyboardShortcut>(kbZoomIn); } ConfigDescription val31 = new ConfigDescription("Which key to use to finish the recap once it's started.", (AcceptableValueBase)null, Array.Empty<object>()); ConfigDefinition val32 = new ConfigDefinition("Keybinds", "Finish recap"); KeyboardShortcut val33 = default(KeyboardShortcut); ((KeyboardShortcut)(ref val33))..ctor((KeyCode)115, Array.Empty<KeyCode>()); kbFinishRecap = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(val32, val33, val31); if (RiskOfOptionsStuff.enabled) { RiskOfOptionsStuff.AddOption<KeyboardShortcut>(kbFinishRecap); } } private void InitializeEquipmentEffect() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) _effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC3/MealPrep/PickupTakenOrbEffect.prefab").WaitForCompletion(); } public void Awake() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown InitializeRiskOfOptions(); InitializeEquipmentEffect(); BarrelInteraction.OnEnable += (hook_OnEnable)delegate(orig_OnEnable e, BarrelInteraction a) { e.Invoke(a); if (cnfgShowBarrels.Value) { BarrelInteractable barrelInteractable = new BarrelInteractable(a); interactables.Add((Interactable)barrelInteractable); } }; ScrapperController.PreStartClient += (hook_PreStartClient)delegate(orig_PreStartClient e, ScrapperController a) { e.Invoke(a); ScrapperInteractable scrapperInteractable = new ScrapperInteractable(a); interactables.Add((Interactable)scrapperInteractable); }; PurchaseInteraction.OnInteractionBegin += (hook_OnInteractionBegin)delegate(orig_OnInteractionBegin e, PurchaseInteraction a, Interactor b) { e.Invoke(a, b); if (a.displayNameToken == "DUPLICATOR_NAME" || a.displayNameToken == "DUPLICATOR_MILITARY_NAME" || a.displayNameToken == "DUPLICATOR_WILD_NAME") { for (int i = 0; i < interactables.Count; i++) { if (interactables[i] is Printer3DInteractable printer3DInteractable2 && (Object)(object)printer3DInteractable2.pi == (Object)(object)a) { printer3DInteractable2.usedPrinter = true; } } } }; ScrapperController.BeginScrapping_UniquePickup += (hook_BeginScrapping_UniquePickup)delegate(orig_BeginScrapping_UniquePickup e, ScrapperController a, UniquePickup b) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) e.Invoke(a, b); didScrap = true; }; DroneVendorMultiShopController.Start += (hook_Start)delegate(orig_Start e, DroneVendorMultiShopController a) { e.Invoke(a); DroneMultiShopInteractable droneMultiShopInteractable = new DroneMultiShopInteractable(a); interactables.Add((Interactable)droneMultiShopInteractable); }; MultiShopController.Start += (hook_Start)delegate(orig_Start e, MultiShopController a) { e.Invoke(a); MultiShopInteractable multiShopInteractable = new MultiShopInteractable(a); interactables.Add((Interactable)multiShopInteractable); }; PurchaseInteraction.Start += (hook_Start)delegate(orig_Start e, PurchaseInteraction a) { e.Invoke(a); if (!(a.displayNameToken == "FROG_NAME") && !(a.displayNameToken == "BAZAAR_CAULDRON_NAME") && !(a.displayNameToken == "MOON_BATTERY_SOUL_NAME") && !(a.displayNameToken == "MOON_BATTERY_BLOOD_NAME") && !(a.displayNameToken == "MOON_BATTERY_DESIGN_NAME") && !(a.displayNameToken == "MOON_BATTERY_MASS_NAME") && !(((Object)a).name == "PortalDialer") && !(a.displayNameToken == "VENDING_MACHINE_NAME") && !(a.displayNameToken == "SHRINE_COMBAT_NAME") && !(a.displayNameToken == "SHRINE_BLOOD_NAME") && !(a.displayNameToken == "SHRINE_HEALING_NAME") && !(a.displayNameToken == "SHRINE_RESTACK_NAME") && !(a.displayNameToken == "SHRINE_COLOSSUS_NAME") && !(a.displayNameToken == "SHRINE_CLEANSE_NAME") && !(a.displayNameToken == "LOCKEDTREEBOT_NAME") && !(a.displayNameToken == "MULTISHOP_TERMINAL_NAME") && !(a.displayNameToken == "DRONE_VENDOR_TERMINAL_NAME") && !(a.displayNameToken == "FAN_NAME") && !(a.displayNameToken == "NULL_WARD_NAME") && (!(a.displayNameToken == "NEWT_STATUE_NAME") || cnfgShowNewtAltars.Value) && (!(a.displayNameToken == "LUNAR_CHEST_NAME") || cnfgShowLunarPods.Value) && !(a.displayNameToken == "DRIFTERBAGCHEST_NAME") && !(a.displayNameToken == "COINSLOT_STATUE_NAME") && !(a.displayNameToken == "BROKENROBOT_NAME") && !(a.displayNameToken == "COLLECTIVE_SHRINE_NAME") && (!(a.displayNameToken == "DRONE_SCRAPPER_NAME") || cnfgShowDroneScrappers.Value) && (cnfgShow3DPrinters.Value || !(a.displayNameToken == "DUPLICATOR_NAME")) && (cnfgShowDrones.Value || (!(a.displayNameToken == "DRONE_GUNNER_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_HEALING_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_MISSILE_INTERACTABLE_NAME") && !(a.displayNameToken == "EQUIPMENTDRONE_INTERACTABLE_NAME") && !(a.displayNameToken == "FLAMEDRONE_INTERACTABLE_NAME") && !(a.displayNameToken == "EMERGENCYDRONE_INTERACTABLE_NAME") && !(a.displayNameToken == "TURRET1_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_JUNK_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_HAULER_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_JAILER_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_CLEANUP_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_COPYCAT_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_RECHARGE_INTERACTABLE_NAME") && !(a.displayNameToken == "DRONE_BOMBARDMENT_INTERACTABLE_NAME")))) { if (a.displayNameToken == "DUPLICATOR_NAME" || a.displayNameToken == "DUPLICATOR_MILITARY_NAME" || a.displayNameToken == "DUPLICATOR_WILD_NAME") { Printer3DInteractable printer3DInteractable = new Printer3DInteractable(a); interactables.Add((Interactable)printer3DInteractable); } else { PurchaseInteractable purchaseInteractable = new PurchaseInteractable(a); interactables.Add((Interactable)purchaseInteractable); } } }; PickupPickerController.OnEnable += (hook_OnEnable)delegate(orig_OnEnable e, PickupPickerController a) { e.Invoke(a); if (cnfgShowItemsOnGround.Value && (((Object)a).name.Contains("FragmentPotentialPickup") || ((Object)a).name.Contains("OptionPickup"))) { PotentialInteractable potentialInteractable = new PotentialInteractable(a); interactables.Add((Interactable)potentialInteractable); } }; GenericPickupController.Start += (hook_Start)delegate(orig_Start e, GenericPickupController a) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Invalid comparison between Unknown and I4 //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Invalid comparison between Unknown and I4 //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Invalid comparison between Unknown and I4 e.Invoke(a); if (cnfgShowItemsOnGround.Value) { UniquePickup pickup = a.pickup; if (!(((PickupIndex)(ref pickup.pickupIndex)).pickupDef.nameToken == "ITEM_POWERPYRAMID_NAME")) { pickup = a.pickup; if ((int)((PickupIndex)(ref pickup.pickupIndex)).pickupDef.equipmentIndex == -1) { pickup = a.pickup; if (!((PickupIndex)(ref pickup.pickupIndex)).pickupDef.isLunar) { pickup = a.pickup; if (!((UniquePickup)(ref pickup)).isTempItem) { pickup = a.pickup; ItemTier itemTier = ((PickupIndex)(ref pickup.pickupIndex)).pickupDef.itemTier; if ((int)itemTier != 6 && (int)itemTier != 7 && (int)itemTier != 8) { GenericPickupControllerInteractable genericPickupControllerInteractable = new GenericPickupControllerInteractable(a); interactables.Add((Interactable)genericPickupControllerInteractable); } } } } } } }; SceneExitController.onFinishExit += delegate { if (RoR2Application.isInSinglePlayer) { string baseSceneName = SceneCatalog.currentSceneDef.baseSceneName; if (baseSceneName != "bazaar" && baseSceneName != "solutionalhaunt" && baseSceneName != "solusweb" && baseSceneName != "computationalexchange") { StartMissingInteractableFinder(); } } }; Run.OnDestroy += (hook_OnDestroy)delegate(orig_OnDestroy e, Run a) { e.Invoke(a); EndMissingInteractableFinder(); }; } private void EndMissingInteractableFinder() { Time.timeScale = 1f; recapRunning = false; didScrap = false; cama.End(); ClearLists(); } private void StartMissingInteractableFinder() { GetRemainingInteractables(); if (remainingInteractables.Count == 0) { return; } index = -1; if (cnfgShowContents.Value) { foreach (Interactable remainingInteractable in remainingInteractables) { try { remainingInteractable.SimulateDrop(); } catch { Debug.Log((object)"Uh oh! SimulateDrop failed."); } } } Time.timeScale = 0f; StartCamera(); recapRunning = true; } private void ClearLists() { interactables.Clear(); remainingInteractables.Clear(); } private void GetRemainingInteractables() { remainingInteractables.Clear(); for (int i = 0; i < interactables.Count; i++) { Interactable interactable = interactables[i]; Interactable interactable2 = interactable; if (!(interactable2 is PurchaseInteractable purchaseInteractable)) { if (!(interactable2 is Printer3DInteractable printer3DInteractable)) { if (!(interactable2 is ScrapperInteractable scrapperInteractable)) { if (!(interactable2 is GenericPickupControllerInteractable genericPickupControllerInteractable)) { if (!(interactable2 is PotentialInteractable potentialInteractable)) { if (!(interactable2 is BarrelInteractable barrelInteractable)) { if (!(interactable2 is DroneMultiShopInteractable droneMultiShopInteractable)) { if (interactable2 is MultiShopInteractable multiShopInteractable && !((Object)(object)multiShopInteractable.msc == (Object)null) && multiShopInteractable.msc.available) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)droneMultiShopInteractable.dvmsc == (Object)null) && droneMultiShopInteractable.dvmsc.available) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)barrelInteractable.bi == (Object)null) && !barrelInteractable.bi.opened) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)potentialInteractable.ppc == (Object)null)) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)genericPickupControllerInteractable.gpc == (Object)null) && !genericPickupControllerInteractable.gpc.consumed) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)scrapperInteractable.sc == (Object)null) && !didScrap) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)printer3DInteractable.pi == (Object)null) && !printer3DInteractable.usedPrinter) { remainingInteractables.Add(interactables[i]); } } else if (!((Object)(object)purchaseInteractable.pi == (Object)null) && purchaseInteractable.pi.available) { remainingInteractables.Add(interactables[i]); } } } private void IncrementCameraPosition() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) index++; if (remainingInteractables.Count != 0) { if (index < 0) { index = 0; } if (index >= remainingInteractables.Count) { index = remainingInteractables.Count - 1; } cama.SetCamPosition(remainingInteractables[index].GetPosition() + new Vector3(0f, 0.5f, 0f)); } } private void DecrementCameraPosition() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) index--; if (remainingInteractables.Count != 0) { if (index < 0) { index = 0; } if (index >= remainingInteractables.Count) { index = remainingInteractables.Count - 1; } cama.SetCamPosition(remainingInteractables[index].GetPosition() + new Vector3(0f, 0.5f, 0f)); } } private void StartCamera() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown camera = PlayerCharacterMasterController.instances[0].networkUser.cameraRigController; if ((Object)(object)cam != (Object)null) { Object.Destroy((Object)(object)cam); } cam = new GameObject("LostAndFound_Camera"); cama = cam.AddComponent<Camera>(); cama.Start(); IncrementCameraPosition(); } private void Update() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (recapRunning && !PauseManager.isPaused) { KeyboardShortcut value = kbGoNext.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { IncrementCameraPosition(); } value = kbGoPrevious.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { DecrementCameraPosition(); } value = kbFinishRecap.Value; if (Input.GetKeyDown(((KeyboardShortcut)(ref value)).MainKey)) { EndMissingInteractableFinder(); } } } } public class Camera : MonoBehaviour, ICameraStateProvider { internal class PhotoModeCameraState { internal float pitch; internal float yaw; internal float roll; internal Vector3 position; public Vector3 target; public float distance = 16f; internal float fov; internal Quaternion Rotation { get { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) return Quaternion.Euler(pitch, yaw, roll); } set { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0022: Unknown result type (might be due to invalid IL or missing references) Vector3 eulerAngles = ((Quaternion)(ref value)).eulerAngles; pitch = eulerAngles.x; yaw = eulerAngles.y; roll = eulerAngles.z; } } } private PhotoModeCameraState cameraState = new PhotoModeCameraState(); private CameraRigController cam => LostAndFound.camera; public void SetCamPosition(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) cameraState.target = pos; } public void Start() { cam.SetOverrideCam((ICameraStateProvider)(object)this, 0f); cameraState.fov = cam.baseFov; } public void End() { cam.SetOverrideCam((ICameraStateProvider)null, 0f); } private void Update() { //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) if (!LostAndFound.recapRunning || PauseManager.isPaused) { return; } UserProfile userProfile = cam.localUserViewer.userProfile; Player inputPlayer = cam.localUserViewer.inputPlayer; float axis = inputPlayer.GetAxis(23); float axis2 = inputPlayer.GetAxis(24); float mouseLookSensitivity = userProfile.mouseLookSensitivity; float mouseLookScaleX = userProfile.mouseLookScaleX; float mouseLookScaleY = userProfile.mouseLookScaleY; float num = mouseLookScaleX * mouseLookSensitivity * Time.unscaledDeltaTime * axis; float num2 = mouseLookScaleY * mouseLookSensitivity * Time.unscaledDeltaTime * axis2; float num3 = cameraState.roll * (MathF.PI / 180f); cameraState.yaw += cameraState.fov * (num * Mathf.Cos(num3) - num2 * Mathf.Sin(num3)); cameraState.pitch += cameraState.fov * ((0f - num2) * Mathf.Cos(num3) - num * Mathf.Sin(num3)); cameraState.pitch = Mathf.Clamp(cameraState.pitch, -89f, 89f); cameraState.position = cameraState.target - cameraState.Rotation * Vector3.forward * cameraState.distance; ((Component)cam).transform.position = cameraState.position; ((Component)cam).transform.rotation = cameraState.Rotation; KeyboardShortcut value = LostAndFound.kbZoomOut.Value; if (Input.GetKey(((KeyboardShortcut)(ref value)).MainKey)) { cameraState.distance += 35f * Time.unscaledDeltaTime; } value = LostAndFound.kbZoomIn.Value; if (Input.GetKey(((KeyboardShortcut)(ref value)).MainKey)) { cameraState.distance -= 35f * Time.unscaledDeltaTime; if (cameraState.distance <= 1f) { cameraState.distance = 1f; } } } public void GetCameraState(CameraRigController cameraRigController, ref CameraState _cameraState) { } public bool IsHudAllowed(CameraRigController cameraRigController) { return false; } public bool IsUserControlAllowed(CameraRigController cameraRigController) { return false; } public bool IsUserLookAllowed(CameraRigController cameraRigController) { return false; } } public static class RiskOfOptionsStuff { private static bool? _enabled; public static bool enabled { get { if (!_enabled.HasValue) { _enabled = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); } return _enabled.Value; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddOption<T>(ConfigEntry<T> opt) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown if (!(opt is ConfigEntry<bool> val)) { if (opt is ConfigEntry<KeyboardShortcut> val2) { ModSettingsManager.AddOption((BaseOption)new KeyBindOption(val2)); } } else { ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(val)); } } } }