Decompiled source of CalderaTweaks v1.0.0
plugins/CalderaTweaks.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using NodeCanvas.DialogueTrees; using NodeCanvas.Framework; using NodeCanvas.Tasks.Actions; using SideLoader; using SideLoader.Model; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace CalderaConfig { public static class GameObjectFinder { public static GameObject[] FindAllInPaths(List<string> basePaths, string targetName) { List<GameObject> list = new List<GameObject>(); foreach (string basePath in basePaths) { GameObject val = GameObject.Find(basePath.TrimEnd(new char[1] { '/' })); if (!((Object)(object)val == (Object)null)) { SearchChildren(val.transform, targetName, list); } } return list.ToArray(); } private static void SearchChildren(Transform parent, string targetName, List<GameObject> results) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if (((Object)parent).name == targetName) { results.Add(((Component)parent).gameObject); } foreach (Transform item in parent) { Transform parent2 = item; SearchChildren(parent2, targetName, results); } } } } namespace CalderaTweaks { public static class ConfigElements { public static ConfigEntry<int> oreSampleFunds; public static ConfigEntry<int> oreSampleMaterial; public static ConfigEntry<int> oreSampleMaterialHigh; public static ConfigEntry<int> plantSampleFunds; public static ConfigEntry<int> plantSampleMaterial; public static ConfigEntry<int> plantSampleMaterialHigh; public static ConfigEntry<int> molepigSampleFunds; public static ConfigEntry<int> molepigSampleMaterial; public static ConfigEntry<int> molepigSampleMaterialHigh; public static ConfigEntry<int> fromTheAshesFundReward; public static ConfigEntry<float> oreSampleWeight; public static ConfigEntry<float> plantSampleWeight; public static ConfigEntry<float> molepigSampleWeight; public static ConfigEntry<float> foodStoreLCookingKitChance; public static ConfigEntry<float> generalStoreLCookingKitChance; public static ConfigEntry<float> generalStoreLAlchemyKitChance; public static ConfigEntry<float> alchemyStoreLAlchemyKitChance; public static ConfigEntry<bool> giantsSaunaStashPay; public static ConfigEntry<bool> giantsSaunaStash; public static ConfigEntry<bool> kitLegacy; public static ConfigEntry<bool> shortcutRiverOfRed; public static ConfigEntry<bool> shortcutChalcedonyMine; public static ConfigEntry<bool> shortcutSteamBath; public static ConfigEntry<bool> shortcutMyrmitaur; public static ConfigEntry<bool> shortcutOutflowPipe; public static ConfigEntry<bool> shortcutOilRefinery; public static ConfigEntry<bool> shortcutTowerOfRegrets; public static ConfigEntry<bool> predictableArkRotation; public static ConfigEntry<float> arkRotationSpeed; public static ConfigEntry<float> calygreyArenaRareMaterials; public static ConfigEntry<bool> breathOfDarknessQuestSkipDwellers; public static ConfigEntry<bool> breathOfDarknessQuestSkipSulphuric; public static ConfigEntry<bool> breathOfDarknessQuestSkipGrotto; public static ConfigEntry<bool> breathOfDarknessQuestSkipEldest; public static void Init(ConfigFile config) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Expected O, but got Unknown //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Expected O, but got Unknown //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Expected O, but got Unknown //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Expected O, but got Unknown //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Expected O, but got Unknown //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Expected O, but got Unknown //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Expected O, but got Unknown //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Expected O, but got Unknown //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Expected O, but got Unknown //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Expected O, but got Unknown //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Expected O, but got Unknown //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Expected O, but got Unknown //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Expected O, but got Unknown oreSampleFunds = config.Bind<int>("Expedition (Evangeline)", "Ore Sample, Funds", 5000, new ConfigDescription("How many funds does the Ore Samples give? (Vanila = 1000)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10000), new object[0])); oreSampleMaterial = config.Bind<int>("Expedition (Evangeline)", "Ore Sample, Stone", 40, new ConfigDescription("How much stone does the Ore Samples give? (Vanila = 40)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); oreSampleMaterialHigh = config.Bind<int>("Expedition (Evangeline)", "Ore Sample, Stone (large)", 80, new ConfigDescription("How much stone does the Ore Samples give when lucky? (Vanila = 80)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); plantSampleFunds = config.Bind<int>("Expedition (Evangeline)", "Plant Sample, Funds", 1000, new ConfigDescription("How many funds does the Plant Samples give? (Vanila = 1000)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10000), new object[0])); plantSampleMaterial = config.Bind<int>("Expedition (Evangeline)", "Plant Sample, Timber", 60, new ConfigDescription("How much timber does the Plant Samples give? (Vanila = 40)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); plantSampleMaterialHigh = config.Bind<int>("Expedition (Evangeline)", "Plant Sample, Timber (large)", 120, new ConfigDescription("How much timber does the Plant Samples give when lucky? (Vanila = 80)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); molepigSampleFunds = config.Bind<int>("Expedition (Evangeline)", "Molepig Specimen, Funds", 1000, new ConfigDescription("How many funds does the Molepig Specimen give? (Vanila = 1000)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10000), new object[0])); molepigSampleMaterial = config.Bind<int>("Expedition (Evangeline)", "Molepig Specimen, Food", 200, new ConfigDescription("How much food does the Molepig Specimen give? (Vanila = 200)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); molepigSampleMaterialHigh = config.Bind<int>("Expedition (Evangeline)", "Molepig Specimen, Food (large)", 300, new ConfigDescription("How much food does the Molepig Specimen give when lucky? (Vanila = 300)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 300), new object[0])); fromTheAshesFundReward = config.Bind<int>("From The Ashes Quest Reward", "Funds", 10000, new ConfigDescription("How many funds are given as a reward from completing From The Ashes successfully? (Vanila = 5000)", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20000), new object[0])); oreSampleWeight = config.Bind<float>("Sample Weight", "Ore Sample", 4f, new ConfigDescription("How much does the Ore Sample weigh? (Vanila = 6)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), new object[0])); plantSampleWeight = config.Bind<float>("Sample Weight", "Plant Sample", 1f, new ConfigDescription("How much does the Plant Sample weigh? (Vanila = 6)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), new object[0])); molepigSampleWeight = config.Bind<float>("Sample Weight", "Molepig Specimen Sample", 2f, new ConfigDescription("How much does the Molepig Specimen weigh? (Vanila = 6)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 10f), new object[0])); foodStoreLCookingKitChance = config.Bind<float>("Chance of Lightweight Kits from New Sirocco Stores", "Food Store: Lightweight Cooking Pot", 0.1f, new ConfigDescription("Chance of getting a Lightweight Cooking Pot from the New Sirocco Food Store?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), new object[0])); generalStoreLCookingKitChance = config.Bind<float>("Chance of Lightweight Kits from New Sirocco Stores", "General Store: Lightweight Cooking Pot", 1f, new ConfigDescription("Chance of getting a Lightweight Cooking Pot from the New Sirocco General Store?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), new object[0])); generalStoreLAlchemyKitChance = config.Bind<float>("Chance of Lightweight Kits from New Sirocco Stores", "General Store: Lightweight Alchemy Kit", 1f, new ConfigDescription("Chance of getting a Lightweight Alchemy Kit from the New Sirocco General Store?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), new object[0])); alchemyStoreLAlchemyKitChance = config.Bind<float>("Chance of Lightweight Kits from New Sirocco Stores", "Alchemist Store: Lightweight Alchemy Kit", 0.1f, new ConfigDescription("Chance of getting a Lightweight Alchemy Kit from the New Sirocco Alchemist Store?", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), new object[0])); giantsSaunaStashPay = config.Bind<bool>("Stash", "Giants Sauna, Paywalled", true, (ConfigDescription)null); giantsSaunaStash = config.Bind<bool>("Stash", "Giants Sauna, Not Paywalled", false, (ConfigDescription)null); kitLegacy = config.Bind<bool>("Legacy Upgrade Crafting Station Items", "Cooking Pot and Alchemy Kit", true, new ConfigDescription("Allows the Cooking Pot and the Alchemy Kit to be legacy chest upgraded into the lightweight version.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutRiverOfRed = config.Bind<bool>("Shortcuts", "New Sirocco Mines and River of Red", true, new ConfigDescription("Unlocks a shortcut between the New Sirocco Mines and the River of Red.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutChalcedonyMine = config.Bind<bool>("Shortcuts", "Caldera and The Grotto of Chalcedony", true, new ConfigDescription("Unlocks a 'shortcut' between Caldera and a hidden section of The Grotto of Chalcedony.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutSteamBath = config.Bind<bool>("Shortcuts", "Steam Bath Tunnels and Oily Cavern", true, new ConfigDescription("Unlocks a shortcut between Steam Bath Tunnels and Oily Cavern.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutMyrmitaur = config.Bind<bool>("Shortcuts", "Myrmitaur Haven (Outside)", true, new ConfigDescription("Unlocks a shortcut at the Myrmitaur Haven Exterior.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutOutflowPipe = config.Bind<bool>("Shortcuts", "Refinery Outflow Pipe (Outside)", true, new ConfigDescription("Unlocks a shortcut at the Refinery Outflow Pipe.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutTowerOfRegrets = config.Bind<bool>("Shortcuts", "Tower of Regrets (Outside)", true, new ConfigDescription("Unlocks a shortcuts at the Tower of Regrets.", (AcceptableValueBase)null, Array.Empty<object>())); shortcutOilRefinery = config.Bind<bool>("Shortcuts", "Oil Refinery (Inside)", true, new ConfigDescription("Unlocks shortcuts inside the Oil Refinery.", (AcceptableValueBase)null, Array.Empty<object>())); predictableArkRotation = config.Bind<bool>("Ark of the Exiled", "Consistent ark rotation", true, new ConfigDescription("Ark will always move every 2 days in a clockwise rotation.", (AcceptableValueBase)null, Array.Empty<object>())); arkRotationSpeed = config.Bind<float>("Ark of the Exiled", "Rotation Speed", 4f, new ConfigDescription("How many times a day should the ark move", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 24f), new object[0])); calygreyArenaRareMaterials = config.Bind<float>("Calygrey Arena", "Rare Material", 0.67f, new ConfigDescription("Chance of getting Rare Materials from the loot of the Calygrey Arena Chest.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), new object[0])); breathOfDarknessQuestSkipDwellers = config.Bind<bool>("Breath Of Darkness Quest", "Skip 1) kill all 4 ancient dwellers", false, new ConfigDescription("Removes the requirement of having to kill all 4 ancient dwellers.", (AcceptableValueBase)null, Array.Empty<object>())); breathOfDarknessQuestSkipSulphuric = config.Bind<bool>("Breath Of Darkness Quest", "Skip 2) sulphuric cavern", true, new ConfigDescription("Skips the need to push the button in the sulphuric cavern (and old sirocco).", (AcceptableValueBase)null, Array.Empty<object>())); breathOfDarknessQuestSkipGrotto = config.Bind<bool>("Breath Of Darkness Quest", "Skip 3) grotto of chalcedony", true, new ConfigDescription("Skips the need to interact with the yellow stone in grotto of chalcedony (and steambath tunnels).", (AcceptableValueBase)null, Array.Empty<object>())); breathOfDarknessQuestSkipEldest = config.Bind<bool>("Breath Of Darkness Quest", "Skip 4) eldest brother", true, new ConfigDescription("Skips the need to interact with dead body in the eldest brother (and scarlet sanctuary).", (AcceptableValueBase)null, Array.Empty<object>())); } } public static class DiceConverter { public static (int sidesA, int sidesB, int totalSides) ProbabilityToDie(double p, int maxSides = 100) { if (p < 0.0 || p > 1.0) { throw new ArgumentOutOfRangeException("p", "Probability must be between 0 and 1."); } if (maxSides < 1) { throw new ArgumentOutOfRangeException("maxSides", "Die must have at least 1 side."); } int num = 0; int num2 = 1; double num3 = Math.Abs(p - 0.0); for (int i = 1; i <= maxSides; i++) { int num4 = (int)Math.Round(p * (double)i); double num5 = (double)num4 / (double)i; double num6 = Math.Abs(p - num5); if (num6 < num3) { num = num4; num2 = i; num3 = num6; } } int item = num; int item2 = num2 - num; return (item, item2, num2); } } public class FixedQueue<T> { private readonly int maxSize; private readonly LinkedList<T> queue = new LinkedList<T>(); public int Count => queue.Count; public FixedQueue(int maxSize) { this.maxSize = maxSize; } public void Enqueue(T item) { queue.AddFirst(item); if (queue.Count > maxSize) { queue.RemoveLast(); } } public T Get(int index) { if (index < 0 || index >= queue.Count) { throw new IndexOutOfRangeException($"Index {index} is out of range."); } LinkedListNode<T> linkedListNode = queue.First; for (int i = 0; i < index; i++) { linkedListNode = linkedListNode.Next; } return linkedListNode.Value; } public void Set(int index, T value) { if (index < 0 || index >= queue.Count) { throw new IndexOutOfRangeException($"Index {index} is out of range."); } LinkedListNode<T> linkedListNode = queue.First; for (int i = 0; i < index; i++) { linkedListNode = linkedListNode.Next; } linkedListNode.Value = value; } } public class InteractionSwitchAreaCustom : InteractionSwitchArea { public Vector3 position; public Vector3 rotation; public override void OnActivate() { //IL_0009: 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_0014: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) ((InteractionSwitchArea)this).OnActivate(); CalderaTweaksPlugin.teleportPositon = position; CalderaTweaksPlugin.teleportRotation = rotation; CalderaTweaksPlugin.teleportQueued = true; CalderaTweaksPlugin.teleportScene = base.Area; } } [BepInPlugin("johbenji.calderatweaks", "Caldera Tweaks", "1.0.0")] public class CalderaTweaksPlugin : BaseUnityPlugin { [HarmonyPatch(typeof(NetworkLevelLoader), "LoadLevelAsync")] [HarmonyPatch(new Type[] { typeof(string) })] private class adjustArkOfTheExiledEventPatchLoadLevelAsync { private static void Prefix(NetworkLevelLoader __instance, string _levelName) { if (ConfigElements.predictableArkRotation.Value) { int newArk = GetNewArk(); UpdateArkInEvent(newArk); } } } [HarmonyPatch(typeof(MenuManager), "BackToMainMenu")] public class adjustArkOfTheExiledEventPatchBackToMainMenu { private static void Prefix() { if (ConfigElements.predictableArkRotation.Value) { updatePredictedGameTime(0f, overrideLatch: true); } } } [HarmonyPatch(typeof(CharacterManager), "SendStartSleepRPC")] public class adjustArkOfTheExiledEventPatchSendStartRest { private static void Prefix(string _characterSleepablePair, float _sleepLength, string _campingEventUID, int _dungeonEnemyCount) { if (ConfigElements.predictableArkRotation.Value) { updatePredictedGameTime((float)EnvironmentConditions.GameTime + _sleepLength); } } } [HarmonyPatch(typeof(DefeatScenarioChangeScene), "WaitBeforeLoadSceneRoutine")] public class adjustArkOfTheExiledEventPatchWaitBeforeLoadSceneRoutine { private static void Prefix(DefeatScenarioChangeScene __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown if (ConfigElements.predictableArkRotation.Value) { float num = (float)EnvironmentConditions.GameTime; updatePredictedGameTime(num); DefeatScenario defeatScenario = __instance.DefeatScenario; if ((Object)(object)defeatScenario == (Object)null) { Log.LogMessage((object)"Defeat scenario is null"); } else if (defeatScenario is DefeatScenarioRespawn) { DefeatScenarioRespawn val = (DefeatScenarioRespawn)defeatScenario; float num2 = val.GetIncreaseTime(); updatePredictedGameTime(num + num2); } } } } [HarmonyPatch(typeof(ActivateDefeatScenario), "OnExecute")] public class adjustArkOfTheExiledEventPatchOnExecute { private static void Prefix(ActivateDefeatScenario __instance, DefeatScenario ___Scenario) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown if (ConfigElements.predictableArkRotation.Value) { float num = (float)EnvironmentConditions.GameTime; updatePredictedGameTime(num); if (___Scenario is DefeatScenarioRespawn) { DefeatScenarioRespawn val = (DefeatScenarioRespawn)___Scenario; float num2 = val.GetIncreaseTime(); updatePredictedGameTime(num + num2); } } } } [HarmonyPatch(typeof(NetworkLevelLoader), "LoadLevel")] [HarmonyPatch(new Type[] { typeof(float), typeof(string), typeof(int), typeof(float), typeof(bool) })] public class adjustArkOfTheExiledEventPatchLoadLevel { private static void Prefix(float _increaseTime, string _levelName, int _spawnPoint, float _spawnOffset, bool _save = true) { if (ConfigElements.predictableArkRotation.Value) { float num = (float)EnvironmentConditions.GameTime; updatePredictedGameTime(num + _increaseTime); } } } [HarmonyPatch(typeof(NetworkLevelLoader), "RequestSwitchArea")] [HarmonyPatch(new Type[] { typeof(string), typeof(int), typeof(float), typeof(bool) })] public class adjustArkOfTheExiledEventPatchRequestSwitchArea { private static void Prefix(string _levelName, int _spawnPoint, float _spawnOffset, bool _moveBag) { if (ConfigElements.predictableArkRotation.Value) { float newGameTime = (float)EnvironmentConditions.GameTime; updatePredictedGameTime(newGameTime); } } } [CompilerGenerated] private sealed class <DelaySceneHandlingMethod>d__44 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CalderaTweaksPlugin <>4__this; private bool <hasTeleported>5__1; private DictionaryExt<string, string> <playercharacters>5__2; private int <i>5__3; private string <key>5__4; private string <value>5__5; private Character <character>5__6; private CharacterCamera <camera>5__7; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelaySceneHandlingMethod>d__44(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <playercharacters>5__2 = null; <key>5__4 = null; <value>5__5 = null; <character>5__6 = null; <camera>5__7 = null; <>1__state = -2; } private bool MoveNext() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Invalid comparison between Unknown and I4 //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: 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_0409: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_048f: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Expected O, but got Unknown //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Expected O, but got Unknown //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0561: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <hasTeleported>5__1 = false; if (teleportQueued && (int)teleportScene == AreaManager.Instance.CurrentArea.ID) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; } goto IL_01cc; case 1: <>1__state = -1; teleportQueued = false; <hasTeleported>5__1 = true; <playercharacters>5__2 = CharacterManager.Instance.PlayerCharacters; <i>5__3 = 0; while (<i>5__3 < <playercharacters>5__2.Count) { <key>5__4 = <playercharacters>5__2.Keys.ElementAt(<i>5__3); <value>5__5 = <playercharacters>5__2.Values.ElementAt(<i>5__3); <character>5__6 = CharacterManager.Instance.GetCharacter(<value>5__5); if ((Object)(object)<character>5__6 != (Object)null) { <character>5__6.Teleport(teleportPositon, teleportRotation); <camera>5__7 = <character>5__6.CharacterCamera; if ((Object)(object)<camera>5__7 != (Object)null) { <camera>5__7.ResetCameraToPlayer(); } <camera>5__7 = null; } <key>5__4 = null; <value>5__5 = null; <character>5__6 = null; <i>5__3++; } <playercharacters>5__2 = null; goto IL_01cc; case 2: <>1__state = -1; goto IL_021d; case 3: <>1__state = -1; goto IL_027b; case 4: <>1__state = -1; goto IL_02f1; case 5: <>1__state = -1; goto IL_0382; case 6: <>1__state = -1; goto IL_0514; case 7: { <>1__state = -1; goto IL_0572; } IL_0572: <>4__this.AddTeleportToCalderaFromDG7(); break; IL_02f1: <>4__this.RefineryShortcut(); <>4__this.AntHillShortcut(); <>4__this.CalderaToChalcedonyCaveShortcut(); <>4__this.CalderaToTowerOfRegrets(); <>4__this.TweakingRandomHitboxes(); goto IL_032e; IL_032e: if (AreaManager.Instance.CurrentArea.SceneName == "Caldera_Dungeon5") { if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 5; return true; } goto IL_0382; } goto IL_04c3; IL_01cc: if (AreaManager.Instance.CurrentArea.SceneName == "NewSirocco") { if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } goto IL_021d; } goto IL_022a; IL_0514: <>4__this.SteambathToOilyCavern(); goto IL_0521; IL_0521: if (!(AreaManager.Instance.CurrentArea.SceneName == "Caldera_Dungeon7")) { break; } if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 7; return true; } goto IL_0572; IL_021d: <>4__this.SceneHandlingMethod(); goto IL_022a; IL_022a: if (AreaManager.Instance.CurrentArea.SceneName == "CalderaDungeonsSmall") { if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 3; return true; } goto IL_027b; } goto IL_02a0; IL_0382: <>4__this.AddTeleportToCalderaFromDG5(); <>4__this.CreateCollisionBox("Environment/MapBounds/MapBound", new Vector3(-173.9026f, -33.1076f, -52.5051f), new Vector3(0f, 127.5113f, 0f), new Vector3(24.4598f, 15.685f, 1.9862f)); <>4__this.CreateCollisionBox("Environment/MapBounds/MapBound", new Vector3(-160.4779f, -32.5731f, -52.5051f), new Vector3(0f, 246.555f, 0f), new Vector3(38.8229f, 15.485f, 1.9862f)); <>4__this.CreateCollisionBox("Environment/MapBounds/MapBound", new Vector3(-149.2002f, -32.5731f, -73.4059f), new Vector3(0f, 222.6665f, 0f), new Vector3(10.5066f, 15.485f, 1.9862f)); <>4__this.CreateCollisionBox("Environment/MapBounds/MapBound", new Vector3(-149.2826f, -32.5731f, -81.5515f), new Vector3(0f, 318.2129f, 0f), new Vector3(10.2393f, 15.485f, 1.9862f)); goto IL_04c3; IL_04c3: if (AreaManager.Instance.CurrentArea.SceneName == "Caldera_Dungeon1") { if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 6; return true; } goto IL_0514; } goto IL_0521; IL_027b: <>4__this.RemoveChestRigidBodyComponent(); <>4__this.NewSiroccoMinesShortCut(); <>4__this.OilyCavernToSteamBath(); goto IL_02a0; IL_02a0: if (AreaManager.Instance.CurrentArea.SceneName == "Caldera") { if (!<hasTeleported>5__1) { <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 4; return true; } goto IL_02f1; } goto IL_032e; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string GUID = "johbenji.calderatweaks"; public const string NAME = "Caldera Tweaks"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; private static int payChestID = -78005; private static string paychestName = "Stash Pack Paywalled"; private static int freeChestID = -78006; private static string freechestName = "Stash Pack NoPaywall"; public static Vector3 teleportPositon = new Vector3(0f, 0f, 0f); public static Vector3 teleportRotation = new Vector3(0f, 0f, 0f); public static bool teleportQueued = false; public static AreaEnum teleportScene; private static float estimatedGameTime = 0f; public static CalderaTweaksPlugin Instance { get; private set; } internal void Awake() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) Instance = this; ConfigElements.Init(((BaseUnityPlugin)this).Config); Log = ((BaseUnityPlugin)this).Logger; SL.OnSceneLoaded += SceneManager_sceneLoaded; setSampleWeight(); setLightWeightKitStoreDropTable(); setStash(); setLighKitLegacy(); setCalygreyArenaRewards(); new Harmony("johbenji.calderatweaks").PatchAll(); } private void setCalygreyArenaRewards() { if (ConfigElements.calygreyArenaRareMaterials.Value > 0f) { string sourceUID = "DropTable_Caldera_Equipment_WeaponSmoke_1"; string text = "DT_johbenji.CalygreyArenaRareMaterials"; List<int> itemIDs = new List<int> { 6000360, 6000370, 6000400, 6000350, 6000450, 6000430, 6000390, 6000440, 6000410 }; setDropTableItems(text, itemIDs, ConfigElements.calygreyArenaRareMaterials.Value); setItemSource(text + "DTA", sourceUID, text); } } private void setLighKitLegacy() { //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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.kitLegacy.Value) { ((ContentTemplate)new SL_Item { Target_ItemID = 5010100, New_ItemID = 5010100, Name = "Cooking Pot", Description = "Heavy pot that enables the preparation of recipes with more than one ingredient, to be used on a lit campfire.", LegacyItemID = 5010105 }).ApplyTemplate(); ((ContentTemplate)new SL_Item { Target_ItemID = 5010200, New_ItemID = 5010200, Name = "Alchemy Kit", Description = "Tools used to distill ingredients into potions, to be used on a lit campfire.", LegacyItemID = 5010205 }).ApplyTemplate(); } } private void setLightWeightKitStoreDropTable() { setStore(ConfigElements.alchemyStoreLAlchemyKitChance.Value, 5010205, "NewSiroccoAlchemyStoreLAlchemyKitDT", "FOpFrLmF1kucItj8NJXfjQ_3-Finished"); setStore(ConfigElements.foodStoreLCookingKitChance.Value, 5010105, "NewSiroccoFoodStoreLCookingKitDT", "LfgxRx6-dkKEUTdxntBEgQ_3-Finished"); setStore(ConfigElements.generalStoreLAlchemyKitChance.Value, 5010205, "NewSiroccoGeneralStoreLAlchemyKitDT", "9AIXwwQGCkuX3T0ZOCSbfQ_3-Finished"); setStore(ConfigElements.generalStoreLCookingKitChance.Value, 5010105, "NewSiroccoGeneralStoreLCookingPotDT", "9AIXwwQGCkuX3T0ZOCSbfQ_3-Finished"); } private void setStash() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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) if (ConfigElements.giantsSaunaStash.Value || ConfigElements.giantsSaunaStashPay.Value) { createTreasureChest(paychestName, payChestID); createTreasureChest(freechestName, freeChestID); if (ConfigElements.giantsSaunaStashPay.Value) { ((ContentTemplate)new SL_ItemSpawn { IdentifierName = "johbenji_saunachest_pay", ItemID = payChestID, Quantity = 1, SceneToSpawnIn = "CalderaDungeonsSmall", SpawnPosition = new Vector3(1491.341f, 0.2659f, 14.9281f), SpawnRotation = new Vector3(0f, 180f, 0f), ForceNonPickable = false, TryLightFueledContainer = true }).ApplyTemplate(); } if (ConfigElements.giantsSaunaStash.Value) { ((ContentTemplate)new SL_ItemSpawn { IdentifierName = "johbenji_saunachest_free", ItemID = freeChestID, Quantity = 1, SceneToSpawnIn = "CalderaDungeonsSmall", SpawnPosition = new Vector3(1485.221f, 0.03f, 21.4986f), SpawnRotation = new Vector3(0f, 90f, 0f), ForceNonPickable = false, TryLightFueledContainer = true }).ApplyTemplate(); } } } private void createTreasureChest(string name, int itemID) { //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_0011: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: 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_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Expected O, but got Unknown //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: 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_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0400: 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_0418: 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) ((ContentTemplate)new SL_TreasureChest { Target_ItemID = 5300050, New_ItemID = itemID, Name = name, Description = "This backpack allows for tranfering of items to and from an owner's home Stash. In reality it is less a backpack and more a small hole torn through the ethereal plane.", LegacyItemID = -1, IsPickable = true, IsUsable = false, QtyRemovedOnUse = 1, GroupItemInDisplay = false, HasPhysicsWhenWorld = false, RepairedInRest = true, BehaviorOnNoDurability = (BehaviorOnNoDurabilityType)0, CastType = (SpellCastType)(-1), CastModifier = (SpellCastModifier)0, CastLocomotionEnabled = false, OverrideSellModifier = -1f, Tags = new List<string> { "StashPack", "Item" }.ToArray(), StatsHolder = (SL_ItemStats)new SL_EquipmentStats { BaseValue = 100, RawWeight = 2f, MaxDurability = -1, Damage_Resistance = new List<float> { 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f }.ToArray(), Impact_Resistance = 0f, Damage_Protection = 0f, Damage_Bonus = new List<float> { 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f }.ToArray(), Impact_Bonus = 0f, Stamina_Use_Penalty = 0f, Mana_Use_Modifier = 0f, Mana_Regen = 0f, Movement_Penalty = 0f, Pouch_Bonus = 0f, Heat_Protection = 0f, Cold_Protection = 0f, Corruption_Protection = 0f, Health_Regen = 0f, Cooldown_Reduction = 0f, BarrierProtection = 0f, GlobalStatusEffectResistance = 0f, StaminaRegenModifier = 0f }, ExtensionsEditBehaviour = (EditBehaviours)0, ItemExtensions = new List<SL_ItemExtension> { (SL_ItemExtension)new SL_Preserver { NullifyPerish = true } }.ToArray(), EffectBehaviour = (EditBehaviours)1, ItemVisuals = new SL_ItemVisual { ResourcesPrefabPath = "Assets/_Prefabs/_ItemsAssets/1000000_Containers/1000000_Chests/1000000_ChestSimpleA_v", Position = new Vector3(0f, -0.0389f, 0f), Rotation = new Vector3(270f, 180.00002f, 0f), Scale = new Vector3(1f, 1f, 1f) }, SpecialType = (SpecialContainerTypes)4, OpenSound = (Sounds)0, AllowOverCapacity = true, CanContainMoney = true, CanReceiveCharacterItems = true, CanRemoveItems = true, NonSavableContent = false, ShowMoneyIfEmpty = false, VisibleIfEmpty = true, HoldInteractionTime = 0f }).ApplyTemplate(); } private void setStore(float probability, int itemID, string dT_UIDbase, string merchantUID) { if (probability > 0f) { string text = dT_UIDbase + merchantUID; setDropTable(text, itemID, calcEmptyDiceValue(probability), calcDiceValue(probability)); setItemSource(text + "DTA", merchantUID, text); } } private int calcDiceValue(float probability) { float num = probability * 1000f; return Mathf.RoundToInt(num); } private int calcEmptyDiceValue(float probability) { float num = probability * 1000f; int num2 = Mathf.RoundToInt(num); return 1000 - num2; } private void setDropTableItems(string dropTableUID, List<int> itemIDs, float probability) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0099: 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_00a5: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown if (probability == 1f) { int index = Random.Range(0, itemIDs.Count); ((ContentTemplate)new SL_DropTable { UID = dropTableUID, GuaranteedDrops = new List<SL_ItemDrop> { new SL_ItemDrop { MaxQty = 1, MinQty = 1, DroppedItemID = itemIDs[index] } } }).ApplyTemplate(); return; } float num = probability / (float)itemIDs.Count; (int, int, int) tuple = DiceConverter.ProbabilityToDie(num, 20); int item = tuple.Item1; int item2 = tuple.Item2; List<SL_ItemDropChance> list = new List<SL_ItemDropChance>(); for (int i = 0; i < itemIDs.Count; i++) { list.Add(new SL_ItemDropChance { MinQty = 1, MaxQty = 1, DroppedItemID = itemIDs[i], DiceValue = item }); } ((ContentTemplate)new SL_DropTable { UID = dropTableUID, RandomTables = new List<SL_RandomDropGenerator> { new SL_RandomDropGenerator { MinNumberOfDrops = 1, MaxNumberOfDrops = 1, NoDrop_DiceValue = item2, Drops = list } } }).ApplyTemplate(); } private void setDropTable(string dropTableUID, int itemID, int emptyDice, int loadedDice) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00b2: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown if (emptyDice == 0) { ((ContentTemplate)new SL_DropTable { UID = dropTableUID, GuaranteedDrops = new List<SL_ItemDrop> { new SL_ItemDrop { MaxQty = 1, MinQty = 1, DroppedItemID = itemID } } }).ApplyTemplate(); } else { ((ContentTemplate)new SL_DropTable { UID = dropTableUID, RandomTables = new List<SL_RandomDropGenerator> { new SL_RandomDropGenerator { MinNumberOfDrops = 1, MaxNumberOfDrops = 1, NoDrop_DiceValue = emptyDice, Drops = new List<SL_ItemDropChance> { new SL_ItemDropChance { MinQty = 1, MaxQty = 1, DroppedItemID = itemID, DiceValue = loadedDice } } } } }).ApplyTemplate(); } } private void setItemSource(string identifier, string sourceUID, string dropTableUID) { //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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) ((ContentTemplate)new SL_DropTableAddition { IdentifierName = identifier, SelectorTargets = new List<string> { sourceUID }, DropTableUIDsToAdd = new List<string> { dropTableUID } }).ApplyTemplate(); } private void setSampleWeight() { setSampleTemplate(6000340, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000341, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000342, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000343, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000344, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000345, "Ore Sample", "A sample of unidentified ore...", ConfigElements.oreSampleWeight.Value); setSampleTemplate(6000380, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000381, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000382, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000383, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000384, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000385, "Plant Sample", "A sample of an unidentified root...", ConfigElements.plantSampleWeight.Value); setSampleTemplate(6000420, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); setSampleTemplate(6000421, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); setSampleTemplate(6000422, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); setSampleTemplate(6000423, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); setSampleTemplate(6000424, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); setSampleTemplate(6000425, "Molepig Specimen", "An unidentified little runt from a Molepig Warren. It seems cozy in your pack...", ConfigElements.molepigSampleWeight.Value); } private void setSampleTemplate(int itemID, string name, string description, float weight) { //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_000d: 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) //IL_001b: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((ContentTemplate)new SL_Item { Target_ItemID = itemID, New_ItemID = itemID, Name = name, Description = description, StatsHolder = new SL_ItemStats { BaseValue = 30, RawWeight = weight, MaxDurability = -1 } }).ApplyTemplate(); } public static void addQuestEvent(string Name) { for (int i = 0; i < QuestEventDictionary.Sections.Count; i++) { for (int j = 0; j < QuestEventDictionary.Sections[i].Events.Count; j++) { QuestEventSignature val = QuestEventDictionary.Sections[i].Events[j]; if (val != null && val.EventName == Name) { QuestEventManager.Instance.AddEvent(val.EventUID, 1, true); return; } } } } public static void addQuestEventStack(string Name) { for (int i = 0; i < QuestEventDictionary.Sections.Count; i++) { for (int j = 0; j < QuestEventDictionary.Sections[i].Events.Count; j++) { QuestEventSignature val = QuestEventDictionary.Sections[i].Events[j]; if (val != null && val.EventName == Name) { int eventCurrentStack = QuestEventManager.Instance.GetEventCurrentStack(val.EventUID); QuestEventManager.Instance.SetQuestEventStack(val.EventUID, eventCurrentStack + 1, true); return; } } } } private int IncrementEventIfCount(string EventName, int requiredCount, int incrementNumber) { QuestEventManager instance = QuestEventManager.Instance; int num = 0; IList<QuestEventData> currentQuestEvents = instance.CurrentQuestEvents; bool flag = false; for (int i = 0; i < currentQuestEvents.Count; i++) { QuestEventData val = currentQuestEvents[i]; if (!(val.Name == EventName)) { continue; } flag = true; num = val.StackCount; if (num == requiredCount) { for (int j = 0; j < incrementNumber; j++) { addQuestEventStack(EventName); num++; } } } return num; } internal void SceneManager_sceneLoaded() { ((MonoBehaviour)Instance).StartCoroutine(DelaySceneHandlingMethod()); SkipBreathOfDarknessStep(); } private void SkipBreathOfDarknessStep() { bool questStarted = SkipKillingAncientDwellers(); SkipSulphuric(questStarted); SkipGrotto(questStarted); SkipEldest(questStarted); } private bool SkipKillingAncientDwellers() { QuestEventManager instance = QuestEventManager.Instance; IList<QuestEventData> currentQuestEvents = instance.CurrentQuestEvents; bool flag = false; for (int i = 0; i < currentQuestEvents.Count; i++) { QuestEventData val = currentQuestEvents[i]; if (val.Name == "Caldera_AncientDwellOut") { flag = true; } } if (!flag) { return false; } if (!ConfigElements.breathOfDarknessQuestSkipDwellers.Value) { return true; } bool flag2 = false; bool flag3 = false; for (int j = 0; j < currentQuestEvents.Count; j++) { QuestEventData val2 = currentQuestEvents[j]; if (val2.Name == "Caldera_Hidden") { flag2 = true; } if (val2.Name == "Caldera_HiddenFeedback") { flag3 = true; } if (flag2 && flag3) { break; } } if (!flag2) { addQuestEvent("Caldera_Hidden"); } if (!flag3) { addQuestEvent("Caldera_HiddenFeedback"); } return true; } private void SkipSulphuric(bool questStarted) { if (questStarted && ConfigElements.breathOfDarknessQuestSkipSulphuric.Value) { IncrementEventIfCount("Caldera_Hidden", 1, 2); } } private void SkipGrotto(bool questStarted) { if (questStarted && ConfigElements.breathOfDarknessQuestSkipGrotto.Value) { IncrementEventIfCount("Caldera_Hidden", 3, 2); } } private void SkipEldest(bool questStarted) { if (questStarted && ConfigElements.breathOfDarknessQuestSkipEldest.Value) { IncrementEventIfCount("Caldera_Hidden", 5, 2); } } public static int GetVanillaArkRotation() { QuestEventManager instance = QuestEventManager.Instance; List<string> list = new List<string> { "Caldera_FortressPosA", "Caldera_FortressPosB", "Caldera_FortressPosC", "Caldera_FortressPosD", "Caldera_FortressPosE", "Caldera_FortressPosF" }; int num = -1; IList<QuestEventData> currentQuestEvents = instance.CurrentQuestEvents; for (int i = 0; i < currentQuestEvents.Count; i++) { QuestEventData val = currentQuestEvents[i]; if (val.Name == "Caldera_FortressPosA") { num = 0; } else if (val.Name == "Caldera_FortressPosB") { num = 1; } else if (val.Name == "Caldera_FortressPosC") { num = 2; } else if (val.Name == "Caldera_FortressPosD") { num = 3; } else if (val.Name == "Caldera_FortressPosE") { num = 4; } else if (val.Name == "Caldera_FortressPosF") { num = 5; } if (num != -1) { return num; } } Log.LogMessage((object)"No events found that are matched"); return -1; } public static int GetNewArk() { int num = Mathf.FloorToInt(ConfigElements.arkRotationSpeed.Value / 24f * estimatedGameTime); int[] array = new int[6] { 0, 1, 2, 3, 4, 5 }; return array[num % 6]; } public static void UpdateArkInEvent(int arkRotation) { QuestEventManager instance = QuestEventManager.Instance; List<string> list = new List<string> { "Caldera_FortressPosA", "Caldera_FortressPosB", "Caldera_FortressPosC", "Caldera_FortressPosD", "Caldera_FortressPosE", "Caldera_FortressPosF" }; IList<QuestEventData> currentQuestEvents = instance.CurrentQuestEvents; for (int i = 0; i < currentQuestEvents.Count; i++) { QuestEventData val = currentQuestEvents[i]; if (list.Contains(val.Name)) { instance.RemoveEvent(val.EventUID, true); } } addQuestEvent(list[arkRotation]); } private void DeactivateAllButNewArk(int arkIDToRetain) { GameObject val = GameObject.Find("Environment/Dungeons/Big/MovingForteressPositions"); if ((Object)(object)val == (Object)null) { return; } Transform transform = val.transform; if ((Object)(object)transform == (Object)null) { return; } int value = -1; Dictionary<string, int> dictionary = new Dictionary<string, int>(); dictionary.Add("PositionA", 0); dictionary.Add("PositionB", 1); dictionary.Add("PositionC", 2); dictionary.Add("PositionD", 3); dictionary.Add("PositionE", 4); dictionary.Add("PositionF", 5); for (int i = 0; i < transform.childCount; i++) { Transform child = transform.GetChild(i); if ((Object)(object)child == (Object)null || !dictionary.TryGetValue(((Object)child).name, out value)) { continue; } GameObject gameObject = ((Component)child).gameObject; if (!((Object)(object)gameObject == (Object)null)) { if (value != arkIDToRetain) { gameObject.SetActive(false); } else { gameObject.SetActive(true); } } } } [IteratorStateMachine(typeof(<DelaySceneHandlingMethod>d__44))] private IEnumerator DelaySceneHandlingMethod() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelaySceneHandlingMethod>d__44(0) { <>4__this = this }; } private void TweakingRandomHitboxes() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (603)"); RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (605)"); RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (606)"); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (600)", new Vector3(693.5f, 64.0023f, 622.63f), new Vector3(0f, 51.9372f, 0f), new Vector3(10.9254f, 90.4947f, 3.6858f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (601)", new Vector3(701.49f, 64.0023f, 617.33f), new Vector3(0f, 61.2616f, 0f), new Vector3(8.4016f, 90.4947f, 5.9603f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (602)", new Vector3(707.9442f, 66.0096f, 617.739f), new Vector3(0f, 348.674f, 0f), new Vector3(18.2016f, 90.4947f, 4.6985f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (604)", new Vector3(723.9719f, 62.906f, 613.1046f), new Vector3(0f, 134.9256f, 0f), new Vector3(1.5436f, 91.9201f, 23.0184f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (609)", new Vector3(729.4995f, 63.6023f, 593.5978f), new Vector3(0f, 12.6605f, 0f), new Vector3(0.8818f, 90.4947f, 24.6563f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneLava/Cube (610)", new Vector3(725.8568f, 63.7879f, 560.5002f), new Vector3(0f, 352.1253f, 0f), new Vector3(8.4273f, 90.4947f, 41.4586f)); } private void CalderaToTowerOfRegrets() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0274: 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_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: 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_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutTowerOfRegrets.Value) { GameObject fromAssetBundle = CalderaTweaksPlugin.GetFromAssetBundle<GameObject>("permittivity-calderatweaks", "environment", "johbenji_bridge"); GameObject val = Object.Instantiate<GameObject>(fromAssetBundle); val.transform.position = new Vector3(631.6663f, 16.8363f, 1269.801f); val.transform.rotation = Quaternion.Euler(0f, 347.5929f, 0f); val.transform.localScale = new Vector3(1f, 1f, 1f); val.layer = LayerMask.NameToLayer("LargeTerrainEnvironment"); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (1074)", new Vector3(629.6788f, 22.2473f, 1268.13f), new Vector3(0f, 342.8861f, 0f), new Vector3(1f, 3.4091f, 9.565f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (1071)", new Vector3(623.8945f, 22.6384f, 1278.638f), new Vector3(0f, 233.4728f, 0f), new Vector3(15.3728f, 2.6691f, 1f)); RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (1072)"); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (437)", new Vector3(689.9014f, 40.4128f, 1447.794f), new Vector3(0f, 352.1488f, 1.4433f), new Vector3(1.9395f, 74.4018f, 21.9476f)); RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (435)"); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (450)", new Vector3(686.1935f, 41.4066f, 1452.427f), new Vector3(0f, 269.3703f, 0f), new Vector3(29.7878f, 45.6991f, 1.5329f)); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (127)", new Vector3(685.728f, 26.1166f, 1436.21f), new Vector3(0f, 347.3135f, 0f), new Vector3(12.136f, 33.1138f, 2.5171f)); GameObject fromAssetBundle2 = CalderaTweaksPlugin.GetFromAssetBundle<GameObject>("permittivity-calderatweaks", "environment", "johbenji_bridge"); GameObject val2 = Object.Instantiate<GameObject>(fromAssetBundle2); val2.transform.position = new Vector3(694.6957f, 15.0765f, 1448.184f); val2.transform.rotation = Quaternion.Euler(8.4074f, 357.5752f, 0f); val2.transform.localScale = new Vector3(1.4f, 1.56f, 1.2f); val2.layer = LayerMask.NameToLayer("LargeTerrainEnvironment"); setCave(new Vector3(692.3339f, 45.6215f, 1391.194f), new Vector3(684.808f, 47.5157f, 1355.508f), new Vector3(0f, 165.9378f, 0f), new Vector3(694.2794f, 44.8094f, 1390.551f), Quaternion.Euler(0f, 284.1978f, 0f), new Vector3(0.7f, 0.9f, 0.3f), (Vector3?)new Vector3(0.4f, 0.4f, 0.4f)); setCave(new Vector3(684.4941f, 47.8672f, 1356.666f), new Vector3(690.3641f, 44.5339f, 1391.996f), new Vector3(0f, 312.6658f, 0f), new Vector3(684.7529f, 47.4684f, 1359.089f), Quaternion.Euler(0f, 176.2018f, 0f), new Vector3(0.7f, 0.9f, 0.3f), (Vector3?)new Vector3(0.4f, 0.4f, 0.4f)); RemoveCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (451)"); AdjustCollisionBox("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (153)", new Vector3(674.0522f, 26.1166f, 1412.679f), new Vector3(0f, 65.3276f, 0f), new Vector3(26.7402f, 33.1138f, 3.0444f)); } } private void RemoveCollisionBox(string path) { GameObject val = GameObject.Find(path); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } private void CreateCollisionBox(string pathToExistingBox, Vector3 position, Vector3 rotation, Vector3 scale) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find(pathToExistingBox); if ((Object)(object)val != (Object)null) { GameObject val2 = Object.Instantiate<GameObject>(val); if ((Object)(object)val2 != (Object)null) { val2.transform.position = position; val2.transform.rotation = Quaternion.Euler(rotation); val2.transform.localScale = scale; } } } private void AdjustCollisionBox(string path, Vector3 position, Vector3 rotation, Vector3 scale) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find(path); if ((Object)(object)val != (Object)null) { val.transform.position = position; val.transform.rotation = Quaternion.Euler(rotation); val.transform.localScale = scale; } } private void OilyCavernToSteamBath() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutSteamBath.Value) { setCaveFrame(new Vector3(-38.5494f, -4.7395f, -52.126f), new Vector3(-220.0266f, -40.2744f, -0.8917f), new Vector3(0f, 60.0187f, 0f), new Vector3(-39.5208f, -4.7342f, -53.956f), Quaternion.Euler(359.7455f, 25.2872f, 353.8593f), new Vector3(0.8f, 0.6f, 0.7f), (AreaEnum)603); } } private void SteambathToOilyCavern() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutSteamBath.Value) { setCaveFrame(new Vector3(-220.8329f, -40.4828f, -4.0615f), new Vector3(-38.6749f, -4.9177f, -49.695f), new Vector3(0f, 30f, 0f), new Vector3(-220.7733f, -40.6517f, -5.52f), Quaternion.Euler(0f, 337.137f, 0f), new Vector3(0.8f, 0.6f, 0.7f), (AreaEnum)650); } } private void ChalcedonyCaveShortCut() { //IL_0011: 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_0039: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) setCave(new Vector3(-157.2397f, -35.8848f, -74.9938f), new Vector3(-312.2836f, 4.4144f, 8.2811f), new Vector3(0f, 81.1785f, 0f), new Vector3(-159.4049f, -36.2456f, -79.7631f), Quaternion.Euler(0f, 22.6092f, 0f), new Vector3(0.8f, 0.6f, 0.7f)); setCave(new Vector3(-314.004f, 4.6734f, 8.4477f), new Vector3(-157.5998f, -36.22f, -74.313f), new Vector3(0f, 43.8923f, 0f), new Vector3(-318.9112f, 4.2967f, 6.9892f), Quaternion.Euler(0f, 71.1785f, 0f), new Vector3(0.8f, 0.6f, 0.7f)); } private void AddTeleportToCalderaFromDG5() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Trigger"); val.transform.position = new Vector3(-170.8278f, -35.6546f, -66.0925f); BoxCollider val2 = val.AddComponent<BoxCollider>(); val2.size = new Vector3(1f, 2f, 1f); ((Collider)val2).isTrigger = true; InteractionActivator val3 = val.AddComponent<InteractionActivator>(); InteractionTriggerBase val4 = val.AddComponent<InteractionTriggerBase>(); InteractionSwitchAreaCustom interactionSwitchAreaCustom = (InteractionSwitchAreaCustom)(object)(val3.BasicInteraction = (IInteraction)(object)val.AddComponent<InteractionSwitchAreaCustom>()); ((InteractionSwitchArea)interactionSwitchAreaCustom).Area = (AreaEnum)602; ((InteractionSwitchArea)interactionSwitchAreaCustom).DistanceBetweenPlayers = 5f; ((InteractionSwitchArea)interactionSwitchAreaCustom).FastTravelTime = 0; ((InteractionSwitchArea)interactionSwitchAreaCustom).SpawnOffset = 0.5f; ((InteractionSwitchArea)interactionSwitchAreaCustom).SpawnPoint = 0; ((InteractionBase)interactionSwitchAreaCustom).AwakeInit(); interactionSwitchAreaCustom.position = new Vector3(698.4728f, 70.6011f, 482.7674f); interactionSwitchAreaCustom.rotation = new Vector3(0f, 54f, 0f); } private void CalderaToChalcedonyCaveShortcut() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutChalcedonyMine.Value) { setCaveFrame(new Vector3(696.8574f, 70.4476f, 478.9635f), new Vector3(-170.629f, -35.6238f, -65.059f), new Vector3(0f, 43.8923f, 0f), new Vector3(696.8574f, 70.4476f, 478.9635f), Quaternion.Euler(0f, 355.7726f, 0f), new Vector3(0.8f, 0.6f, 0.7f), (AreaEnum)607); } } private void setCaveFrame(Vector3 enterPosition, Vector3 exitPosition, Vector3 exitRotation, Vector3 cavePosition, Quaternion caveRotation, Vector3 caveScale, AreaEnum area) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) GameObject fromAssetBundle = CalderaTweaksPlugin.GetFromAssetBundle<GameObject>("permittivity-calderatweaks", "environment", "johbenji_dungeonframe"); GameObject val = Object.Instantiate<GameObject>(fromAssetBundle); val.transform.position = cavePosition; val.transform.rotation = caveRotation; val.transform.localScale = caveScale; val.layer = LayerMask.NameToLayer("LargeTerrainEnvironment"); GameObject val2 = new GameObject("Trigger"); val2.transform.parent = val.transform; val2.transform.position = enterPosition; BoxCollider val3 = val2.AddComponent<BoxCollider>(); val3.size = new Vector3(1f, 2f, 1f); ((Collider)val3).isTrigger = true; InteractionActivator val4 = val2.AddComponent<InteractionActivator>(); InteractionTriggerBase val5 = val2.AddComponent<InteractionTriggerBase>(); InteractionSwitchAreaCustom interactionSwitchAreaCustom = (InteractionSwitchAreaCustom)(object)(val4.BasicInteraction = (IInteraction)(object)val2.AddComponent<InteractionSwitchAreaCustom>()); ((InteractionSwitchArea)interactionSwitchAreaCustom).Area = area; ((InteractionSwitchArea)interactionSwitchAreaCustom).DistanceBetweenPlayers = 5f; ((InteractionSwitchArea)interactionSwitchAreaCustom).FastTravelTime = 0; ((InteractionSwitchArea)interactionSwitchAreaCustom).SpawnOffset = 0.5f; ((InteractionSwitchArea)interactionSwitchAreaCustom).SpawnPoint = 0; ((InteractionBase)interactionSwitchAreaCustom).AwakeInit(); interactionSwitchAreaCustom.position = exitPosition; interactionSwitchAreaCustom.rotation = exitRotation; } private void RefineryShortcut() { //IL_0053: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_0138: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: 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_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutOutflowPipe.Value) { removeObjectFromScene("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (30)"); removeObjectFromScene("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (29)"); removeObjectFromScene("Environment/Assets/MapBounds/prf_CalderaColliders/ZoneWater/Cube (1322)"); Material[] materials = getMaterials("Environment/Assets/PropsArea/OilFactory/mdl_env_buildingMetalVigilSmallPlatform (2)/mdl_env_buildingMetalVigilSmallPlatform_LOD0"); createBridge(new Vector3(1471.316f, 29.4725f, 312.0653f), new Vector3(0f, 90f, 0f), new Vector3(1f, 1f, 1f), materials); createBridge(new Vector3(1458.728f, 27.2725f, 312.1653f), new Vector3(345.8663f, 90f, 351.8792f), new Vector3(1f, 1f, 1f), materials); createBridge(new Vector3(1446.902f, 26.1452f, 311.8653f), new Vector3(334.3392f, 271.4579f, 0.9346f), new Vector3(1f, 1f, 1f), materials); AdjustCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1443.013f, 33.3707f, 306.0083f), new Vector3(0f, 198.8496f, 0f), new Vector3(1.9607f, 15.38f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1448.846f, 31.6707f, 305.8297f), new Vector3(0f, 176.6892f, 0f), new Vector3(8.4534f, 16.68f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1463.063f, 31.6707f, 306.0297f), new Vector3(0f, 180.7097f, 0f), new Vector3(20.4007f, 16.68f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1462.863f, 31.6707f, 318.2781f), new Vector3(0f, 180.7097f, 0f), new Vector3(20.4007f, 16.68f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1446.88f, 31.6707f, 317.9781f), new Vector3(0f, 177.641f, 0f), new Vector3(11.5679f, 16.68f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1453.104f, 25.129f, 311.7737f), new Vector3(352.3064f, 0f, 0f), new Vector3(0.5f, 1.9f, 8.7127f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1471.088f, 31.6707f, 324.6938f), new Vector3(0f, 87.402f, 0f), new Vector3(11.5679f, 17.1236f, 3.5684f)); CreateCollisionBox("Environment/Assets/PropsArea/Rocks/OilHoleCustom/Colliders/Cube (19)", new Vector3(1475.785f, 30.4525f, 297.6025f), new Vector3(0f, 67.0843f, 0f), new Vector3(20.4007f, 16.68f, 3.5684f)); } } private void AntHillShortcut() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) if (ConfigElements.shortcutMyrmitaur.Value) { blackPlaneTeleporter(new Vector3(1245.981f, 61.8663f, 1540.37f), new Vector3(1235.962f, 57.1338f, 1448.388f), new Vector3(0f, 154.9043f, 0f), new Vector3(1245.994f, 63.4993f, 1538.693f), new Vector3(90f, 14.8528f, 0f), new Vector3(1f, 1f, 1f)); blackPlaneTeleporter(new Vector3(1234.638f, 56.2838f, 1451.358f), new Vector3(1246.708f, 62.5874f, 1543.056f), new Vector3(0f, 3.0337f, 0f), new Vector3(1232.74f, 56.5404f, 1452.806f), new Vector3(90f, 180f, 0f), new Vector3(1f, 1f, 1f)); setCaveFrame(new Vector3(877.7232f, 54.9527f, 1637.683f), new Vector3(-124.2129f, -10.1554f, 113.4543f), new Vector3(0f, 182.8328f, 0f), new Vector3(876.6763f, 54.0805f, 1639.489f), Quaternion.Euler(0f, 116.2535f, 0.1f), new Vector3(1.2f, 0.9f, 0.4f), (AreaEnum)608); } } private void blackPlaneTeleporter(Vector3 enterPosition, Vector3 exitPosition, Vector3 exitRotation, Vector3 planePosition, Vector3 planeRotation, Vector3 planeScale) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0080: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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) GameObject fromAssetBundle = CalderaTweaksPlugin.GetFromAssetBundle<GameObject>("permittivity-calderatweaks", "environment", "johbenji_plane"); GameObject val = Object.Instantiate<GameObject>(fromAssetBundle); val.transform.position = planePosition; val.transform.rotation = Quaternion.Euler(planeRotation); val.transform.localScale = planeScale; val.layer = LayerMask.NameToLayer("LargeTerrainEnvironment"); GameObject val2 = new GameObject("Trigger"); val2.transform.parent = val.transform; val2.transform.position = enterPosition; BoxCollider val3 = val2.AddComponent<BoxCollider>(); val3.size = new Vector3(1f, 2f, 1f); ((Collider)val3).isTrigger = true; InteractionActivator val4 = val2.AddComponent<InteractionActivator>(); InteractionTriggerBase val5 = val2.AddComponent<InteractionTriggerBase>(); Teleporter teleporter = (Teleporter)(object)(val4.BasicInteraction = (IInteraction)(object)val2.AddComponent<Teleporter>()); ((EventActivator)val4).m_overrideBasicText = "Enter"; teleporter.position = exitPosition; teleporter.rotation = exitRotation; } private void createBridge(Vector3 position, Vector3 rotation, Vector3 localscale, Material[] material) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) GameObject fromAssetBundle = CalderaTweaksPlugin.GetFromAssetBundle<GameObject>("permittivity-calderatweaks", "environment", "johbenji_pylonplatform"); GameObject val = Object.Instantiate<GameObject>(fromAssetBundle); val.transform.position = position; val.transform.rotation = Quaternion.Euler(rotation); val.transform.localScale = localscale; val.layer = LayerMask.NameToLayer("LargeTerrainEnvironment"); setMaterials(val, material); } private void setMaterials(GameObject gobject, Material[] materials) { if ((Object)(object)gobject != (Object)null) { MeshRenderer component = gobject.GetComponent<MeshRenderer>(); if ((Object)(object)component != (Object)null) { ((Renderer)component).materials = materials; } } } private Material[] getMaterials(string path) { GameObject val = GameObject.Find(path); if ((Object)(object)val != (Object)null) { MeshRenderer component = val.GetComponent<MeshRenderer>(); if ((Object)(object)component != (Object)null) { return ((Renderer)component).materials; } } return null; } private void removeObjectFromScene(string path) { GameObject val = GameObject.Find(path); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } private void NewSiroccoMinesShortCut() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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) if (ConfigElements.shortcutRiverOfRed.Value) { setCave(new Vector3(2346.651f, -13.5258f, 198.5633f), new Vector3(656.5908f, -6.765f, 60.0234f), new Vector3(0f, 188f, 0f), new Vector3(2341.094f, -14.2212f, 202.7751f), Quaternion.Euler(0f, 119.9354f, 0f), new Vector3(1f, 1f, 1f)); setCave(new Vector3(657.2622f, -6.6434f, 60.7846f), new Vector3(2347.897f, -13.9494f, 196.5019f), new Vector3(0f, 141.2724f, 0f), new Vector3(657.4185f, -7.4741f, 63.991f), Quaternion.Euler(0f, 180f, 0f), new Vector3(0.7f, 1f, 0.5f)); } } private void AddTeleportToCalderaFromDG7() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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) if (ConfigElements.shortcutOilRefinery.Value) { setCave(new Vector3(-153.2478f, -20.8231f, 83.2344f), new Vector3(-2.2285f, -4.629f, 13.1438f), new Vector3(0f, 83f, 0f), new Vector3(-149.9078f, -21.9188f, 83.6695f), Quaternion.Euler(0f, 250f, 0f), new Vector3(1.1273f, 1.35f, 0.4545f), (Vector3?)new Vector3(0.4f, 0.4f, 0.4f)); setCave(new Vector3(-4.738f, -4.6383f, 12.2652f), new Vector3(-156.5998f, -20.4989f, 83.4474f), new Vector3(0f, 268f, 0f), new Vector3(-7.044f, -5.9253f, 12.7464f), Quaternion.Euler(0f, 82.5256f, 0f), new Vector3(0.78f, 1.1f, 0.3073f), (Vector3?)new Vector3(0.4f, 0.4f, 0.4f)); } } private void setCave(Vector3 enterPosition, Vector3 exitPosition, Vector3 exitRotation, Vector3 cavePosition, Quaternion caveRotation, Vector3 caveScale, Vector3? colorVector = null) { //IL_0023: Unknown result type (might be due