Decompiled source of LittleGameplayTweaks v3.3.1
LittleGameplayTweaks.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.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using EntityStates; using EntityStates.AffixEarthHealer; using EntityStates.BeetleQueenMonster; using EntityStates.Commando; using EntityStates.Croco; using EntityStates.Duplicator; using EntityStates.Huntress; using EntityStates.LemurianBruiserMonster; using EntityStates.LunarTeleporter; using EntityStates.Merc; using EntityStates.Merc.Weapon; using EntityStates.Missions.Arena.NullWard; using EntityStates.ScavMonster; using EntityStates.VoidSurvivor.CorruptMode; using HG; using IL.EntityStates.LemurianBruiserMonster; using IL.RoR2; using LittleGameplayTweaks.Properties; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.AffixEarthHealer; using On.EntityStates.BeetleQueenMonster; using On.EntityStates.Commando; using On.EntityStates.Croco; using On.EntityStates.Duplicator; using On.EntityStates.Huntress; using On.EntityStates.LunarTeleporter; using On.EntityStates.Merc; using On.EntityStates.Merc.Weapon; using On.EntityStates.Missions.Arena.NullWard; using On.EntityStates.ScavMonster; using On.EntityStates.VoidSurvivor.CorruptMode; using On.RoR2; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.EntitlementManagement; using RoR2.EntityLogic; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("LittleGameplayTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LittleGameplayTweaks")] [assembly: AssemblyTitle("LittleGameplayTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace LittleGameplayTweaks { internal static class Assets { public static AssetBundle Bundle; public static PluginInfo PluginInfo; public static string Folder = "GameplayTweaks\\"; internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location); internal static void Init(PluginInfo info) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown PluginInfo = info; if (!Directory.Exists(GetPathToFile("GameplayTweaks"))) { Folder = ""; } if (Directory.Exists(GetPathToFile(Folder + "Languages"))) { Language.SetFolders += new hook_SetFolders(SetFolders); } else { Debug.LogWarning((object)"COULD NOT FIND LANGUAGES FOLDER"); } } private static void SetFolders(orig_SetFolders orig, Language self, IEnumerable<string> newFolders) { IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(GetPathToFile(Folder + "Languages")), self.name); orig.Invoke(self, newFolders.Union(second)); } internal static string GetPathToFile(string folderName) { return Path.Combine(assemblyDir, folderName); } internal static string GetPathToFile(string folderName, string fileName) { return Path.Combine(assemblyDir, folderName, fileName); } } public class WConfig { public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.cfg", true); public static ConfigEntry<bool> LevelMaximum; public static ConfigEntry<int> LevelMaximumFinalBoss; public static ConfigEntry<bool> cheaperTier2; public static ConfigEntry<bool> disableNewContent; public static ConfigEntry<bool> onlyUpdateMostRecentSpawnPools; public static ConfigEntry<bool> portalAfterLimbo; public static ConfigEntry<bool> SulfurPoolsSkin; public static ConfigEntry<bool> DCCSEnemyChanges; public static ConfigEntry<bool> DCCSEnemyChangesLooping; public static ConfigEntry<bool> DCCSEnemyNewFamilies; public static ConfigEntry<bool> FamiliesStage1; public static ConfigEntry<float> DCCSEnemyFamilyChance; public static ConfigEntry<bool> DCCSInteractableChanges; public static ConfigEntry<bool> DCCSCategoryChest; public static ConfigEntry<bool> DCCSInteractableCostChanges; public static ConfigEntry<float> InteractablesMountainMultiplier; public static ConfigEntry<bool> DCCSInteractablesStageCredits; public static ConfigEntry<bool> cfgVoidStagesNoTime; public static ConfigEntry<bool> cfgGoldShoresCredits; public static ConfigEntry<bool> FasterPrinter; public static ConfigEntry<bool> FasterScrapper; public static ConfigEntry<bool> FasterShrines; public static ConfigEntry<int> FasterDeepVoidSignal; public static ConfigEntry<bool> FasterArenaCells; public static ConfigEntry<bool> RegenArenaCells; public static ConfigEntry<bool> InteractableNoLunarCost; public static ConfigEntry<bool> InteractableHealingShrine; public static ConfigEntry<bool> InteractableBloodShrineMoreGold; public static ConfigEntry<bool> InteractableBloodShrineLessCost; public static ConfigEntry<bool> InteractablesCombatShrineHP; public static ConfigEntry<bool> InteractableFastHalcyShrine; public static ConfigEntry<bool> InteractableHalcShrineNerf; public static ConfigEntry<bool> InteractableHalcyShrineHalcy; public static ConfigEntry<int> InteractableRedSoupAmount; public static ConfigEntry<int> MegaDroneCost; public static ConfigEntry<int> TurretDroneCost; public static ConfigEntry<bool> CharactersCaptainKeepInHiddemRealm; public static ConfigEntry<bool> CharactersEngineerWarbanner; public static ConfigEntry<bool> CharactersHuntressLysateCell; public static ConfigEntry<bool> CharactersCommandoInvul; public static ConfigEntry<bool> CharactersVoidFiendEquip; public static ConfigEntry<bool> cfgScavBossItem; public static ConfigEntry<bool> cfgScavMoreItemsElites; public static ConfigEntry<bool> cfgScavNewTwisted; public static ConfigEntry<bool> cfgScavTwistedScaling; public static ConfigEntry<bool> cfgMendingCoreBuff; public static ConfigEntry<bool> cfgElderLemurianBands; public static ConfigEntry<bool> VoidPortalChance; public static ConfigEntry<float> ShopChancePercentage; public static ConfigEntry<float> YellowPercentage; public static ConfigEntry<float> BonusAspectDropRate; public static ConfigEntry<bool> ThirdLunarSeer; public static ConfigEntry<bool> EclipseDifficultyAlways; public static ConfigEntry<bool> cfgPrismaticElites; public static void InitConfig() { LevelMaximum = ConfigFileUNSORTED.Bind<bool>("!Main", "999 Maximum Level", false, "Makes enemy level go up to level 999. This will make looping a lot more dangerous.\n\nWill update mid-run"); LevelMaximumFinalBoss = ConfigFileUNSORTED.Bind<int>("!Main", "Level Maximum for Final Bosses", 200, "Final bosses get bonus stats because of the 99 level limit. So both higher level and bonus stats can make them far too tanky."); LevelMaximum.SettingChanged += LevelMaximum_SettingChanged; cheaperTier2 = ConfigFileUNSORTED.Bind<bool>("!Main", "Cheaper Tier 2 Elites", true, "Makes Tier 2 Elites cost 30x instead of 36x.\n\nWill update mid-run if changed"); cheaperTier2.SettingChanged += CheaperTier2_SettingChanged; disableNewContent = ConfigFileUNSORTED.Bind<bool>("!Main", "Disable New Content", false, "Disable new content added by mod. This needs to be done if you are using this mod as a client/host with people who do not have the mod."); onlyUpdateMostRecentSpawnPools = ConfigFileUNSORTED.Bind<bool>("!Main", "Only update one set of spawn pools", true, "Auto detects what DLC you have and picks and appropriate one."); DCCSEnemyChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Enemy Spawn Pools (Pre Loop)", true, "Adds and changes some enemy variety"); SulfurPoolsSkin = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Sulfur Pool Beetles Skin", true, "ReImplement the unused Sulfur Pools skin"); DCCSEnemyChangesLooping = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Enemy Spawn Pools (Loop)", true, "All stages will have enemies that will only appear after looping"); DCCSEnemyNewFamilies = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Family event additions and changes", true, "Add new family events and reorganizes existing ones"); FamiliesStage1 = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Enemy", "Stage 1 Family Events", true, "Allow most family events to happen on stage 1"); DCCSEnemyFamilyChance = ConfigFileUNSORTED.Bind<float>("Spawnpool - Enemy", "Family event weight", 2.22f, "Weight for family event. Vanilla is 2"); DCCSInteractableChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Interactable Spawn Pools", true, "Mountain Shrine on Sulfur Pools, No Gunner Turret on Stage 4 & 5, Rare Printers and Cleansing Pools are a bit more common."); DCCSCategoryChest = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Category Chest limitation", false, "Only one type of Category chest per stage. This feature was cut from the mod, but config for people who still want it."); DCCSInteractableCostChanges = ConfigFileUNSORTED.Bind<bool>("Spawnpool - Interactables", "Cheaper Interactable Credits", true, "TC280 costs 25 instead of 40.\nShrine of Order costs 5 instead of 30.\nCombat/Blood shrines 15 instead of 20."); InteractablesMountainMultiplier = ConfigFileUNSORTED.Bind<float>("Spawnpool - Interactables", "Mountain Shrine multiplier", 2f, "Multiply Mountain Shrine weight compared to other shrines"); DCCSInteractablesStageCredits = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Makes certain stages have more credits", true, "Plains & Roost & Aquaduct get +20, Sirens & Grove get +30."); cfgVoidStagesNoTime = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Make all 3 Void Stages untimed stages", true, "Untimed but counts as stage completed"); cfgGoldShoresCredits = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Gilded Coast gets interactables", true, "Mostly combat shrines"); FasterPrinter = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Printers", true, ""); FasterScrapper = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Scrappers", true, ""); FasterShrines = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Faster Shrines", true, ""); FasterDeepVoidSignal = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Faster Deep Void Signal", 45, "Vanilla is 60."); FasterArenaCells = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Void Fields Cells - Faster early cells", true, "30s for the first 4, 45s for the next 4, 60s for the last. "); RegenArenaCells = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Void Fields Cells - Regen", true, "Cells give regeneration before actvating so you can heal faster."); InteractableBloodShrineMoreGold = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Blood Shrine reward scale with Difficulty", true, "Normally Blood Shrines Reward is only based on HP quickly making them a bad source of money"); InteractableBloodShrineLessCost = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Blood Shrine 50 70 90", true, "Less cost because 75 blood cost breaks items."); InteractableFastHalcyShrine = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine suck gold faster", true, "Suck gold at rate of 3 instead of 1"); InteractableHalcShrineNerf = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine - Less Monsters", true, "Halcyon Shrines get 300 credits for monsters, which is a lot. A Void Seed as a whole is 120 Credits.\nThis setting takes it down to 80 per wave 240 Total"); InteractableHalcyShrineHalcy = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Halcy Shrine - Spawn Halcyonites", true, "Have a chance to spawn Halcyonties instead of Golems"); InteractablesCombatShrineHP = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Combat Shrine HP scaling in multiplayer", false, "Enemies spawned by combat shrines have multiplied hp per player in vanilla."); InteractableRedSoupAmount = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "RedToWhite Cauldron extra item amount", 1, "This is in addition to the 3 that Vanilla pays out with\nie If you want 5 items total, set it to 2. Set to 0 to disable."); InteractableNoLunarCost = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Free Lunars", false, "Everything that costs Lunar Coins will cost 0"); MegaDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - TC-280 Prototype", 300, "Vanilla is 350"); TurretDroneCost = ConfigFileUNSORTED.Bind<int>("Changes - Interactables", "Cost - Gunner Turret", 25, "Vanilla is 35"); InteractableHealingShrine = ConfigFileUNSORTED.Bind<bool>("Changes - Interactables", "Cost - Shrine of Woods", true, "Make Shrine of Woods cost significantly less"); CharactersCaptainKeepInHiddemRealm = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Captain Hidden Realms", true, "Should Captain be allowed to have fun in Hidden and Void realms."); CharactersHuntressLysateCell = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Huntress Balista Lysate Cell", true, "Lysate Cell will combined 2 casts of Ballista if you have the stock available."); CharactersCommandoInvul = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Commando Invulnerable Tactical Dive", true, "Tactical Dive will make you Invulnerable like in RoRR"); CharactersEngineerWarbanner = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Engineer Warbanner Turrets", true, "Should Engi Turrets inherit Warbanner"); CharactersVoidFiendEquip = ConfigFileUNSORTED.Bind<bool>("Changes - Characters", "Void Fiend 2 Equipment", false, "Void Fiend gets two equipment slots switching between them as he switches modes\nMade this as a joke idk how this would be helpful"); cfgScavBossItem = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Scavs as proper Bosses", true, "Scavs are allowed to spawn as a boss under normal conditions and gain a Boss item"); cfgScavMoreItemsElites = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Boss and Elite scavs get more items", true, "Boss Scavs get a small amount more items while Elite scavs get a lot more."); cfgScavNewTwisted = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "New Twisted Scavengers", true, "Adds new Twisted Scavengers"); cfgScavTwistedScaling = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Fix Twisted Scavengers not scaling harder in Multiplayer", true, "Mithrix and Voidling gets more of a HP boost in Multiplayer, Twisteds do not due to a bug."); cfgMendingCoreBuff = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Mending Healing Orb buff", true, "Healing Core heals more and with some invulnerability so you don't instantly kill it."); cfgElderLemurianBands = ConfigFileUNSORTED.Bind<bool>("Changes - Enemies", "Aquaduct Elder Lemurian Buff", true, "They will be able to activate their bands and scale with level."); EclipseDifficultyAlways = ConfigFileUNSORTED.Bind<bool>("!Main", "Eclipse 8 Difficulty always available", false, "Allows you to choose 8 Eclipse in normal lobbies."); EclipseDifficultyAlways.SettingChanged += EclipseDifficultyAlways_SettingChanged; ThirdLunarSeer = ConfigFileUNSORTED.Bind<bool>("Changes - Stages", "Bazaar : Third Lunar Seer", true, "Future proofing for when they add more stage without really making the bazaar more powerful."); YellowPercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Boss Item TP Percent", 20f, "Percent for a yellow item to replace a green from a teleporter. Vanilla is 15"); BonusAspectDropRate = ConfigFileUNSORTED.Bind<float>("Rates", "Aspect Drop Rate", 0.067f, "Percent Drop rate for Aspects. Vanilla is 0.025 or 1/4000. Does not need to be changed if ZetAspects is changed."); ShopChancePercentage = ConfigFileUNSORTED.Bind<float>("Rates", "Natural Bazaar Portal Chance", 15f, "Vanilla is 5%"); VoidPortalChance = ConfigFileUNSORTED.Bind<bool>("Rates", "More Void Portals", true, "Guaranteed Void Portal on Primordial Teleporters with 20% chance on normal teleporters starting stage 4. Vanilla would be 10% after stage 7."); RiskConfig(); } private static void EclipseDifficultyAlways_SettingChanged(object sender, EventArgs e) { RuleChoiceDef val = RuleCatalog.FindChoiceDef("Difficulty.Eclipse8"); if (val != null) { val.excludeByDefault = !EclipseDifficultyAlways.Value; } } private static void CheaperTier2_SettingChanged(object sender, EventArgs e) { if (CombatDirector.eliteTiers.Length > 1) { if (cheaperTier2.Value) { CombatDirector.eliteTiers[LittleGameplayTweaks.FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 5f; } else { CombatDirector.eliteTiers[LittleGameplayTweaks.FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 6f; } } } private static void LevelMaximum_SettingChanged(object sender, EventArgs e) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (LevelMaximum.Value) { Run.ambientLevelCap = 999; LevelUpEffectManager.OnCharacterLevelUp += new hook_OnCharacterLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnCharacterLevelUp); LevelUpEffectManager.OnRunAmbientLevelUp += new hook_OnRunAmbientLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnRunAmbientLevelUp); } else { Run.ambientLevelCap = 99; LevelUpEffectManager.OnCharacterLevelUp -= new hook_OnCharacterLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnCharacterLevelUp); LevelUpEffectManager.OnRunAmbientLevelUp -= new hook_OnRunAmbientLevelUp(LittleGameplayTweaks.LevelUpEffectManager_OnRunAmbientLevelUp); } } public static void RiskConfig() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Expected O, but got Unknown //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Expected O, but got Unknown ModSettingsManager.SetModDescription("Mostly spawn pool tweaks"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(LevelMaximum, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cheaperTier2, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(disableNewContent, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(EclipseDifficultyAlways, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterPrinter, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterScrapper, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterShrines, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FasterArenaCells, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RegenArenaCells, true)); ModSettingsManager.AddOption((BaseOption)new IntFieldOption(InteractableRedSoupAmount, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableNoLunarCost, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableHealingShrine, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableBloodShrineMoreGold, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableBloodShrineLessCost, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractablesCombatShrineHP, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(InteractableHalcShrineNerf, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractablesStageCredits, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgVoidStagesNoTime, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgGoldShoresCredits, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ThirdLunarSeer, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgMendingCoreBuff, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgElderLemurianBands, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgScavBossItem, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgScavMoreItemsElites, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersCaptainKeepInHiddemRealm, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersEngineerWarbanner, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersHuntressLysateCell, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(CharactersCommandoInvul, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyChanges, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyChangesLooping, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSEnemyNewFamilies, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(FamiliesStage1, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractableChanges, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(DCCSInteractableCostChanges, true)); ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(InteractablesMountainMultiplier, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(onlyUpdateMostRecentSpawnPools, true)); } } public class ConfigStages { public static ConfigFile ConfigFileSTAGES = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Little_Gameplay_Tweaks.Stage_Specific_SpawnPool_Disable.cfg", true); public static ConfigEntry<bool> Stage_1_Golem; public static ConfigEntry<bool> Stage_1_Roost; public static ConfigEntry<bool> Stage_1_Snow; public static ConfigEntry<bool> Stage_1_Lake; public static ConfigEntry<bool> Stage_1_Village; public static ConfigEntry<bool> Stage_2_Goolake; public static ConfigEntry<bool> Stage_2_Swamp; public static ConfigEntry<bool> Stage_2_Ancient; public static ConfigEntry<bool> Stage_2_Temple; public static ConfigEntry<bool> Stage_3_Frozen; public static ConfigEntry<bool> Stage_3_Wisp; public static ConfigEntry<bool> Stage_3_Sulfur; public static ConfigEntry<bool> Stage_3_Tree; public static ConfigEntry<bool> Stage_4_Damp_Abyss; public static ConfigEntry<bool> Stage_4_Ship; public static ConfigEntry<bool> Stage_4_Root_Jungle; public static ConfigEntry<bool> Stage_5_Sky; public static ConfigEntry<bool> Stage_5_Helminth; public static ConfigEntry<bool> Stage_F_Moon; public static ConfigEntry<bool> Stage_F_Meridian; public static ConfigEntry<bool> Stage_X_Arena_Void; public static ConfigEntry<bool> Stage_X_Void_Seed; public static ConfigEntry<bool> Stage_X_GoldShores; public static ConfigEntry<bool> Stage_X_HalcShrine; public static void InitConfig() { Stage_1_Golem = ConfigFileSTAGES.Bind<bool>("Stage 1", "Golem Plains", true, "Stage specific changes as described on the mod pages wiki section"); Stage_1_Roost = ConfigFileSTAGES.Bind<bool>("Stage 1", "Distant Roost", true, "Stage specific changes as described on the mod pages wiki section"); Stage_1_Snow = ConfigFileSTAGES.Bind<bool>("Stage 1", "Snowy Forest", true, "Stage specific changes as described on the mod pages wiki section"); Stage_1_Lake = ConfigFileSTAGES.Bind<bool>("Stage 1", "Verdan Falls", true, "Stage specific changes as described on the mod pages wiki section"); Stage_1_Village = ConfigFileSTAGES.Bind<bool>("Stage 1", "Shattered Abodes", true, "Stage specific changes as described on the mod pages wiki section"); Stage_2_Goolake = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aquaduct", true, "Stage specific changes as described on the mod pages wiki section"); Stage_2_Swamp = ConfigFileSTAGES.Bind<bool>("Stage 2", "Wetlands", true, "Stage specific changes as described on the mod pages wiki section"); Stage_2_Ancient = ConfigFileSTAGES.Bind<bool>("Stage 2", "Aphelian Sanctuary", true, "Stage specific changes as described on the mod pages wiki section"); Stage_2_Temple = ConfigFileSTAGES.Bind<bool>("Stage 2", "Reformed Altar", true, "Stage specific changes as described on the mod pages wiki section"); Stage_3_Frozen = ConfigFileSTAGES.Bind<bool>("Stage 3", "Rally Point", true, "Stage specific changes as described on the mod pages wiki section"); Stage_3_Wisp = ConfigFileSTAGES.Bind<bool>("Stage 3", "Scorched Acres", true, "Stage specific changes as described on the mod pages wiki section"); Stage_3_Sulfur = ConfigFileSTAGES.Bind<bool>("Stage 3", "Sulfur Pool", true, "Stage specific changes as described on the mod pages wiki section"); Stage_3_Tree = ConfigFileSTAGES.Bind<bool>("Stage 3", "Treeborn", true, "Stage specific changes as described on the mod pages wiki section"); Stage_4_Damp_Abyss = ConfigFileSTAGES.Bind<bool>("Stage 4", "Abyssal Depths", true, "Stage specific changes as described on the mod pages wiki section"); Stage_4_Ship = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sirens Call", true, "Stage specific changes as described on the mod pages wiki section"); Stage_4_Root_Jungle = ConfigFileSTAGES.Bind<bool>("Stage 4", "Sundered Grove", true, "Stage specific changes as described on the mod pages wiki section"); Stage_5_Sky = ConfigFileSTAGES.Bind<bool>("Stage 5", "Sky Meadow", true, "Stage specific changes as described on the mod pages wiki section"); Stage_5_Helminth = ConfigFileSTAGES.Bind<bool>("Stage 5", "Helminth", true, "Stage specific changes as described on the mod pages wiki section"); Stage_F_Moon = ConfigFileSTAGES.Bind<bool>("Stage Final", "Commencement", true, "Stage specific changes as described on the mod pages wiki section"); Stage_F_Meridian = ConfigFileSTAGES.Bind<bool>("Stage Final", "Prime Meridian", true, "Stage specific changes as described on the mod pages wiki section"); Stage_X_Arena_Void = ConfigFileSTAGES.Bind<bool>("Other", "Void Fields", true, "Stage specific changes as described on the mod pages wiki section"); } } public static class ArrayUtil { public static T[] Add<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray(); } public static T[] Remove<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Except(items).ToArray(); } } public class WRect { public static readonly Random random = new Random(); public static Rect recnothing = new Rect(0f, 0f, 0f, 0f); public static Rect recwide = new Rect(0f, 0f, 384f, 256f); public static Rect rechalftall = new Rect(0f, 0f, 256f, 320f); public static Rect rechalfwide = new Rect(0f, 0f, 320f, 256f); public static Rect rectall = new Rect(0f, 0f, 256f, 384f); public static Rect rec512 = new Rect(0f, 0f, 512f, 512f); public static Rect rec320 = new Rect(0f, 0f, 320f, 320f); public static Rect rec256 = new Rect(0f, 0f, 256f, 256f); public static Rect rec192 = new Rect(0f, 0f, 192f, 192f); public static Rect rec128 = new Rect(0f, 0f, 128f, 128f); public static Rect rec106 = new Rect(0f, 0f, 106f, 106f); public static Rect rec64 = new Rect(0f, 0f, 64f, 64f); public static Vector2 half = new Vector2(0.5f, 0.5f); } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Wolfo.LittleGameplayTweaks", "LittleGameplayTweaks", "3.3.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class LittleGameplayTweaks : BaseUnityPlugin { public class ItemOrbPhysicsChanger : MonoBehaviour { private int timer = 0; public void FixedUpdate() { timer++; if (timer == 20) { ((Component)this).gameObject.layer = 8; Object.Destroy((Object)(object)this); } } } private static readonly Random random = new Random(); public static List<ExplicitPickupDropTable> AllScavCompatibleBossItems = new List<ExplicitPickupDropTable>(); public void Awake() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_00ee: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown Assets.Init(((BaseUnityPlugin)this).Info); WConfig.InitConfig(); ConfigStages.InitConfig(); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)EquipmentBonusRate); ChangesCharacters.Start(); ChangesInteractables.Start(); ChangesStages.Start(); DCCSEnemies.Start(); DCCSInteractables.Start(); Prismatic.Start(); if (!WConfig.disableNewContent.Value) { TwistedScavs.Start(); } ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)ModSupport); MainMenuController.Start += new hook_Start(OneTimeOnlyLateRunner); SceneDirector.Start += new hook_Start(GameplayQoL_SceneDirector_Start); ClassicStageInfo.Awake += new hook_Awake(ClassicStageInfoMethod); SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/rootjungle/rootjungle.asset").WaitForCompletion(); MusicTrackDef bossTrack = Addressables.LoadAssetAsync<MusicTrackDef>((object)"RoR2/DLC1/Common/muBossfightDLC1_12.asset").WaitForCompletion(); val.bossTrack = bossTrack; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/PickupDroplet.prefab").WaitForCompletion(); val2.AddComponent<ItemOrbPhysicsChanger>(); MapZone.TryZoneStart += new hook_TryZoneStart(PickupTeleportHook); LocalUserManager.AddUser += new hook_AddUser(LocalUserManager_AddUser); } private void LocalUserManager_AddUser(orig_AddUser orig, Player inputPlayer, UserProfile userProfile) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0036: 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_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) orig.Invoke(inputPlayer, userProfile); LocalUserManager.AddUser -= new hook_AddUser(LocalUserManager_AddUser); if (EntitlementManager.localUserEntitlementTracker == null) { return; } bool flag = ((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(Addressables.LoadAssetAsync<EntitlementDef>((object)"RoR2/DLC1/Common/entitlementDLC1.asset").WaitForCompletion()); bool flag2 = ((BaseUserEntitlementTracker<LocalUser>)(object)EntitlementManager.localUserEntitlementTracker).AnyUserHasEntitlement(Addressables.LoadAssetAsync<EntitlementDef>((object)"RoR2/DLC1/Common/entitlementDLC2.asset").WaitForCompletion()); if (WConfig.onlyUpdateMostRecentSpawnPools.Value) { if (flag2) { DCCSInteractables.DoChanges(2); } else if (flag) { DCCSInteractables.DoChanges(1); } else { DCCSInteractables.DoChanges(0); } } else { DCCSInteractables.DoChanges(-1); } Debug.Log((object)(userProfile.name + " has DLC1 : " + flag)); Debug.Log((object)(userProfile.name + " has DLC2 : " + flag2)); if (flag && WConfig.cfgScavNewTwisted.Value) { MultiCharacterSpawnCard val = LegacyResourcesAPI.Load<MultiCharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScavLunar"); val.masterPrefabs = val.masterPrefabs.Add(TwistedScavs.ScavLunarWGoomanMaster, TwistedScavs.ScavLunarWSpeedMaster, TwistedScavs.ScavLunarWTankMaster); } } private void CharacterBody_OnSkillActivated(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill) { orig.Invoke(self, skill); if ((Object)(object)self.skillLocator.utility == (Object)(object)skill && Object.op_Implicit((Object)(object)self.characterMotor)) { self.characterMotor.disableAirControlUntilCollision = false; } } public static void LevelUpEffectManager_OnRunAmbientLevelUp(orig_OnRunAmbientLevelUp orig, Run run) { if (run.ambientLevel < 200f) { orig.Invoke(run); } } public static void LevelUpEffectManager_OnCharacterLevelUp(orig_OnCharacterLevelUp orig, CharacterBody characterBody) { if (characterBody.level < 200f) { orig.Invoke(characterBody); } } public static int FindTier2Elite() { for (int i = 0; i < CombatDirector.eliteTiers.Length; i++) { for (int j = 0; j < CombatDirector.eliteTiers[i].eliteTypes.Length; j++) { if ((Object)(object)CombatDirector.eliteTiers[i].eliteTypes[j] == (Object)(object)Elites.Poison) { Debug.Log((object)("Tier2 Elite Tier at " + i)); return i; } } } Debug.LogWarning((object)"Could not find Tier2 Elite Tier"); return 111; } internal static void ModSupport() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown if (WConfig.cheaperTier2.Value) { try { CombatDirector.eliteTiers[FindTier2Elite()].costMultiplier = CombatDirector.baseEliteCostMultiplier * 5f; } catch { } } if (WConfig.LevelMaximum.Value) { Run.ambientLevelCap = 999; LevelUpEffectManager.OnCharacterLevelUp += new hook_OnCharacterLevelUp(LevelUpEffectManager_OnCharacterLevelUp); LevelUpEffectManager.OnRunAmbientLevelUp += new hook_OnRunAmbientLevelUp(LevelUpEffectManager_OnRunAmbientLevelUp); } DCCSEnemies.ModSupport(); ChangesInteractables.ModSupport(); GameModeCatalog.FindGameModePrefabComponent("WeeklyRun").startingScenes = GameModeCatalog.FindGameModePrefabComponent("ClassicRun").startingScenes; Items.BonusGoldPackOnKill.tags = Items.BonusGoldPackOnKill.tags.Add((ItemTag)4); Items.Infusion.tags = Items.Infusion.tags.Add((ItemTag)4); Items.GoldOnHit.tags = Items.GoldOnHit.tags.Add((ItemTag)4); Items.RegeneratingScrap.tags = Items.RegeneratingScrap.tags.Add((ItemTag)4); Items.NovaOnHeal.tags = Items.NovaOnHeal.tags.Add((ItemTag)4); Items.ShockNearby.tags = Items.ShockNearby.tags.Add((ItemTag)23); Items.CritDamage.tags = Items.CritDamage.tags.Add((ItemTag)4); Items.DroneWeapons.tags = Items.DroneWeapons.tags.Add((ItemTag)4); Items.RoboBallBuddy.tags = Items.RoboBallBuddy.tags.Add((ItemTag)4); Items.MinorConstructOnKill.tags = Items.MinorConstructOnKill.tags.Add((ItemTag)4); Items.CaptainDefenseMatrix.tags = Items.CaptainDefenseMatrix.tags.Add((ItemTag)12); Items.BearVoid.tags = Items.BearVoid.tags.Add((ItemTag)11); if (WConfig.CharactersEngineerWarbanner.Value) { Items.WardOnLevel.tags = Items.WardOnLevel.tags.Remove((ItemTag)13); Items.TPHealingNova.tags = Items.TPHealingNova.tags.Remove((ItemTag)13); Items.TonicAffliction.tags = Items.TonicAffliction.tags.Add((ItemTag)13); } if (WConfig.EclipseDifficultyAlways.Value) { RuleChoiceDef val = RuleCatalog.FindChoiceDef("Difficulty.Eclipse8"); if (val != null) { val.excludeByDefault = false; } } if (WConfig.cfgMendingCoreBuff.Value) { Heal.healCoefficient *= 4f; } } public static void GameplayQoL_SceneDirector_Start(orig_Start orig, SceneDirector self) { //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0556: 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_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)SceneInfo.instance)) { orig.Invoke(self); return; } switch (SceneInfo.instance.sceneDef.baseSceneName) { case "blackbeach": { GameObject val4 = GameObject.Find("/HOLDER: Preplaced Objects"); if (!((Object)(object)val4 != (Object)null)) { break; } UnlockableGranter[] componentsInChildren = val4.GetComponentsInChildren<UnlockableGranter>(true); int num3 = 0; for (int l = 0; l < componentsInChildren.Length; l++) { if (!((Component)componentsInChildren[l]).gameObject.activeSelf) { num3++; } if (num3 == 3) { ((Component)componentsInChildren[1]).gameObject.SetActive(true); } } componentsInChildren = null; GC.Collect(); break; } case "goolake": { if (!WConfig.cfgElderLemurianBands.Value) { break; } Inventory[] array2 = Object.FindObjectsOfType(typeof(Inventory)) as Inventory[]; for (int j = 0; j < array2.Length; j++) { if (NetworkServer.active && (((Object)array2[j]).name.StartsWith("LemurianBruiserFireMaster") || ((Object)array2[j]).name.StartsWith("LemurianBruiserIceMaster"))) { array2[j].GiveItem(Items.UseAmbientLevel, 1); array2[j].GiveItem(ChangesCharacters.MarriageLemurianIdentifier, 1); } } break; } case "bazaar": { SeerStationController[] array3 = Object.FindObjectsOfType(typeof(SeerStationController)) as SeerStationController[]; int num2 = 10; if (WConfig.ThirdLunarSeer.Value) { num2 = 0; } SceneDef nextStageScene = Run.instance.nextStageScene; List<SceneDef> list = new List<SceneDef>(); if ((Object)(object)nextStageScene != (Object)null) { int stageOrder = nextStageScene.stageOrder; Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator(); try { while (enumerator.MoveNext()) { SceneDef current = enumerator.Current; if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && !current.baseSceneName.EndsWith("2")) { list.Add(current); } } } finally { ((IDisposable)enumerator).Dispose(); } } for (int k = 0; k < array3.Length; k++) { if (!((Object)array3[k]).name.StartsWith("SeerStation") || !NetworkServer.active) { continue; } if (list.Count > 0) { SceneDef sceneDef = SceneCatalog.GetSceneDef((SceneIndex)((Component)array3[k]).gameObject.GetComponent<SeerStationController>().NetworktargetSceneDefIndex); if (Object.op_Implicit((Object)(object)sceneDef)) { if (sceneDef.cachedName.StartsWith("blackbeach") || sceneDef.cachedName.StartsWith("golemplains")) { list.Remove(SceneCatalog.FindSceneDef(sceneDef.baseSceneName)); list.Remove(SceneCatalog.FindSceneDef(sceneDef.baseSceneName + "2")); } else { list.Remove(sceneDef); } } } if (num2 == 1) { num2 = 2; GameObject val3 = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/bazaar/SeerStation.prefab").WaitForCompletion(), ((Component)array3[k]).gameObject.transform.parent); val3.transform.localPosition = new Vector3(-45.9807f, -15.22f, 9.5654f); val3.transform.localRotation = new Quaternion(0f, 0.7772f, 0f, 0.6293f); if (list.Count > 0) { val3.GetComponent<SeerStationController>().SetTargetScene(list[random.Next(list.Count)]); ((NetworkBehaviour)val3.GetComponent<SeerStationController>()).OnStartClient(); } else { val3.GetComponent<PurchaseInteraction>().SetAvailable(false); ((NetworkBehaviour)val3.GetComponent<SeerStationController>()).OnStartClient(); } NetworkServer.Spawn(val3); } num2++; } break; } case "moon2": { ShopTerminalBehavior[] array = Object.FindObjectsOfType(typeof(ShopTerminalBehavior)) as ShopTerminalBehavior[]; int num = 0; Transform val = null; Transform val2 = null; for (int i = 0; i < array.Length; i++) { if (((Object)array[i]).name.StartsWith("LunarCauldron,")) { if (num == 0) { val2 = ((Component)array[i]).gameObject.transform; val = ((Component)array[i]).gameObject.transform.parent; } num++; if (((Object)array[i]).name.StartsWith("LunarCauldron, RedToWhite")) { num = 10; ((Component)array[i]).gameObject.GetComponent<ShopTerminalBehavior>().dropVelocity = new Vector3(5f, 10f, 5f); } } } break; } } orig.Invoke(self); } public void OneTimeOnlyLateRunner(orig_Start orig, MainMenuController self) { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Invalid comparison between Unknown and I4 orig.Invoke(self); Items.RegeneratingScrapConsumed.canRemove = false; ExplicitPickupDropTable[] array = Resources.FindObjectsOfTypeAll(typeof(ExplicitPickupDropTable)) as ExplicitPickupDropTable[]; for (int i = 0; i < array.Length; i++) { ((PickupDropTable)array[i]).canDropBeReplaced = false; if (!((Object)array[i]).name.StartsWith("dtBoss")) { continue; } PickupDefEntry[] pickupEntries = array[i].pickupEntries; foreach (PickupDefEntry val in pickupEntries) { Object pickupDef = val.pickupDef; ItemDef val2 = (ItemDef)(object)((pickupDef is ItemDef) ? pickupDef : null); if (Object.op_Implicit((Object)(object)val2) && (int)val2.tier == 4 && val2.DoesNotContainTag((ItemTag)9)) { AllScavCompatibleBossItems.Add(array[i]); } } } MainMenuController.Start -= new hook_Start(OneTimeOnlyLateRunner); } public static void ClassicStageInfoMethod(orig_Awake orig, ClassicStageInfo self) { orig.Invoke(self); if (!WConfig.cfgScavBossItem.Value) { return; } ChangesCharacters.DropTableForBossScav = AllScavCompatibleBossItems[WRect.random.Next(AllScavCompatibleBossItems.Count)]; if (Object.op_Implicit((Object)(object)Run.instance) && Run.instance.stageClearCount > 7) { int num = random.Next(10); if (num > 5) { LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false; } else { LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = true; } } } public static void EquipmentBonusRate() { for (int i = 0; i < EliteCatalog.eliteDefs.Length; i++) { if (EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance == 0.00025f) { EliteCatalog.eliteDefs[i].eliteEquipmentDef.dropOnDeathChance = WConfig.BonusAspectDropRate.Value / 100f; } } } private static bool ColliderPickup(Collider collider) { if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupDropletController>())) { return true; } if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<GenericPickupController>())) { return true; } if (Object.op_Implicit((Object)(object)((Component)collider).GetComponent<PickupPickerController>())) { return true; } return false; } private static void PickupTeleportHook(orig_TryZoneStart orig, MapZone self, Collider collider) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Invalid comparison between Unknown and I4 //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, collider); if ((int)self.zoneType != 0 || !ColliderPickup(collider)) { return; } InfiniteTowerRun component = ((Component)Run.instance).GetComponent<InfiniteTowerRun>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.safeWardController)) { Debug.Log((object)"it tp item back"); TeleportHelper.TeleportGameObject(((Component)collider).gameObject, ((Component)component.safeWardController).transform.position); return; } SpawnCard val = ScriptableObject.CreateInstance<SpawnCard>(); val.hullSize = (HullClassification)0; val.nodeGraphType = (GraphType)0; val.prefab = LegacyResourcesAPI.Load<GameObject>("SpawnCards/HelperPrefab"); DirectorPlacementRule val2 = new DirectorPlacementRule { placementMode = (PlacementMode)3, position = ((Component)collider).transform.position }; GameObject val3 = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(val, val2, RoR2Application.rng)); if (Object.op_Implicit((Object)(object)val3)) { Debug.Log((object)"tp item back"); TeleportHelper.TeleportGameObject(((Component)collider).gameObject, val3.transform.position); Object.Destroy((Object)(object)val3); } Object.Destroy((Object)(object)val); } } public class ChangesCharacters { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_OnEnter <>9__4_1; public static hook_PickupIsNonBlacklistedItem <>9__4_0; public static hook_OnEnter <>9__6_0; public static hook_OnEnter <>9__6_1; public static hook_OnEnter <>9__6_2; public static hook_OnEnter <>9__6_3; public static hook_OnExit <>9__6_4; public static hook_OnEnter <>9__6_5; public static hook_OnExit <>9__6_6; public static hook_OnEnter <>9__6_7; public static StatHookEventHandler <>9__9_0; public static Func<Instruction, bool> <>9__10_1; public static Func<float, FireMegaFireball, float> <>9__10_0; internal void <Enemies>b__4_1(orig_OnEnter orig, Chargeup self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2f); } } internal bool <Enemies>b__4_0(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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) bool flag = orig.Invoke(self, pickupIndex); if (flag) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex); ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20); } return flag; } internal void <Characters>b__6_0(orig_OnEnter orig, GroundLight2 self) { if (self.isComboFinisher) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; } orig.Invoke(self); } internal void <Characters>b__6_1(orig_OnEnter orig, Uppercut self) { orig.Invoke(self); if (self.duration < 0.15f) { self.duration = 0.15f; } } internal void <Characters>b__6_2(orig_OnEnter orig, AimArrowSnipe self) { orig.Invoke(self); int num = ((EntityState)self).skillLocator.special.stock; int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock; if (num > 1) { num = 1; } else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5) { num--; } int stock = baseMaxStock * (num + 1); if (num >= 0) { ((EntityState)self).skillLocator.special.DeductStock(num); } ((EntityState)self).skillLocator.primary.stock = stock; } internal void <Characters>b__6_3(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__6_4(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } } internal void <Characters>b__6_5(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__6_6(orig_OnExit orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } } internal void <Characters>b__6_7(orig_OnEnter orig, CorruptModeBase self) { orig.Invoke(self); if (self is CorruptMode) { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1); } else { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0); } } internal void <MarriedEldersBands>b__9_0(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(MarriageLemurianIdentifier) > 0) { args.damageMultAdd += -0.5f; args.healthMultAdd += -0.5f; } } internal bool <MarriedLemurianBandActivator>b__10_1(Instruction x) { return ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient"); } internal float <MarriedLemurianBandActivator>b__10_0(float damageCoeff, FireMegaFireball entityState) { if (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1) { return 4f; } return damageCoeff; } } public static ItemDef MarriageLemurianIdentifier = ScriptableObject.CreateInstance<ItemDef>(); public static ExplicitPickupDropTable DropTableForBossScav = null; public static void Start() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown Enemies(); Characters(); if (!WConfig.disableNewContent.Value) { MarriedEldersBands(); } if (WConfig.LevelMaximumFinalBoss.Value > 98) { ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(VoidlingLevelLimit); } } private static void VoidlingLevelLimit(orig_BeginEncounter orig, ScriptedCombatEncounter self) { orig.Invoke(self); if (self.grantUniqueBonusScaling && Run.instance.ambientLevelFloor > WConfig.LevelMaximumFinalBoss.Value) { for (int i = 0; i < self.combatSquad.membersList.Count; i++) { self.combatSquad.membersList[i].inventory.RemoveItem(Items.UseAmbientLevel, 1); self.combatSquad.membersList[i].inventory.GiveItem(Items.LevelBonus, WConfig.LevelMaximumFinalBoss.Value); } } } public static void Enemies() { //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_016f: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0018: 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_0037: 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_0053: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) if (WConfig.cfgMendingCoreBuff.Value) { GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerMaster.prefab").WaitForCompletion(); val.AddComponent<GivePickupsOnStart>().itemInfos = (ItemInfo[])(object)new ItemInfo[1] { new ItemInfo { itemString = "UseAmbientLevel", count = 1 } }; CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealerBody.prefab").WaitForCompletion().GetComponent<CharacterBody>(); component.baseArmor += 300f; component.baseMaxHealth *= 3f; component.levelMaxHealth *= 3f; component.baseDamage *= 0.5f; component.levelDamage += component.baseDamage; object obj = <>c.<>9__4_1; if (obj == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, Chargeup self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 2f); } }; <>c.<>9__4_1 = val2; obj = (object)val2; } Chargeup.OnEnter += (hook_OnEnter)obj; } GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBody.prefab").WaitForCompletion(); val3.GetComponent<SetStateOnHurt>().canBeFrozen = true; val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyLunarShard.prefab").WaitForCompletion(); val3.GetComponent<SetStateOnHurt>().canBeFrozen = true; val3 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/FalseSonBoss/FalseSonBossBodyBrokenLunarShard.prefab").WaitForCompletion(); val3.GetComponent<SetStateOnHurt>().canBeFrozen = true; ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(FalseSonAdaptive); ScavengerItemGranter.Start += new hook_Start(GiveScavMoreItems); LegacyResourcesAPI.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscScav").forbiddenAsBoss = false; object obj2 = <>c.<>9__4_0; if (obj2 == null) { hook_PickupIsNonBlacklistedItem val4 = delegate(orig_PickupIsNonBlacklistedItem orig, FindItem self, PickupIndex pickupIndex) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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) bool flag = orig.Invoke(self, pickupIndex); if (flag) { PickupDef pickupDef = PickupCatalog.GetPickupDef(pickupIndex); ItemDef itemDef = ItemCatalog.GetItemDef(pickupDef.itemIndex); return !((Object)(object)itemDef == (Object)null) && itemDef.DoesNotContainTag((ItemTag)8) && itemDef.DoesNotContainTag((ItemTag)20); } return flag; }; <>c.<>9__4_0 = val4; obj2 = (object)val4; } FindItem.PickupIsNonBlacklistedItem += (hook_PickupIsNonBlacklistedItem)obj2; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar1Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar2Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar3Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/ScavLunar4Master").GetComponents<AISkillDriver>()[1].maxTargetHealthFraction = -1f; AISkillDriver[] components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/ScavMaster").GetComponents<AISkillDriver>(); components[1].maxUserHealthFraction = 1f; components[1].minUserHealthFraction = 0.3f; components[1].selectionRequiresOnGround = false; components[1].maxDistance = 1000f; components[1].minDistance = 60f; components = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/EngiWalkerTurretMaster").GetComponents<AISkillDriver>(); components[0].shouldSprint = true; if (components[0].minDistance == 110f) { components[0].minDistance = 50f; } components = LegacyResourcesAPI.Load<GameObject>("Prefabs/charactermasters/EquipmentDroneMaster").GetComponents<AISkillDriver>(); components[0].shouldFireEquipment = true; components[2].shouldFireEquipment = true; components[5].shouldFireEquipment = true; components[6].shouldFireEquipment = true; components = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MajorAndMinorConstruct/MegaConstructMaster.prefab").WaitForCompletion().GetComponents<AISkillDriver>(); if (components.Length > 6) { ((Behaviour)components[6]).enabled = false; } } private static void FalseSonAdaptive(orig_BeginEncounter orig, ScriptedCombatEncounter self) { orig.Invoke(self); if (Run.instance.stageClearCount <= 4 || self.spawns.Length == 0 || !((Object)self.spawns[0].spawnCard).name.StartsWith("cscFalse")) { return; } for (int i = 0; i < self.combatSquad.membersList.Count; i++) { Inventory inventory = self.combatSquad.membersList[i].inventory; if (inventory.GetItemCount(Items.AdaptiveArmor) == 0) { inventory.GiveItem(Items.AdaptiveArmor, 1); } } } public static void Characters() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_0036: 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_005d: 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_0082: 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_008d: Expected O, but got Unknown //IL_00b6: 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_00c1: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_01c8: 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_01d3: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyFireFMJ.asset").WaitForCompletion().mustKeyPress = false; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Croco/CrocoSpit.asset").WaitForCompletion().mustKeyPress = false; Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/LunarSkillReplacements/LunarSecondaryReplacement.asset").WaitForCompletion().mustKeyPress = true; object obj = <>c.<>9__6_0; if (obj == null) { hook_OnEnter val = delegate(orig_OnEnter orig, GroundLight2 self) { if (self.isComboFinisher) { ((BasicMeleeAttack)self).ignoreAttackSpeed = true; } orig.Invoke(self); }; <>c.<>9__6_0 = val; obj = (object)val; } GroundLight2.OnEnter += (hook_OnEnter)obj; object obj2 = <>c.<>9__6_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, Uppercut self) { orig.Invoke(self); if (self.duration < 0.15f) { self.duration = 0.15f; } }; <>c.<>9__6_1 = val2; obj2 = (object)val2; } Uppercut.OnEnter += (hook_OnEnter)obj2; if (WConfig.CharactersHuntressLysateCell.Value) { object obj3 = <>c.<>9__6_2; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, AimArrowSnipe self) { orig.Invoke(self); int num = ((EntityState)self).skillLocator.special.stock; int baseMaxStock = self.primarySkillSlot.skillDef.baseMaxStock; if (num > 1) { num = 1; } else if ((double)((EntityState)self).skillLocator.special.finalRechargeInterval == 0.5) { num--; } int stock = baseMaxStock * (num + 1); if (num >= 0) { ((EntityState)self).skillLocator.special.DeductStock(num); } ((EntityState)self).skillLocator.primary.stock = stock; }; <>c.<>9__6_2 = val3; obj3 = (object)val3; } AimArrowSnipe.OnEnter += (hook_OnEnter)obj3; } if (WConfig.CharactersCaptainKeepInHiddemRealm.Value) { ((ResourceAvailability)(ref SceneCatalog.availability)).CallWhenAvailable((Action)NoOrbitalStrikeBlocking); } object obj4 = <>c.<>9__6_3; if (obj4 == null) { hook_OnEnter val4 = delegate(orig_OnEnter orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__6_3 = val4; obj4 = (object)val4; } Spawn.OnEnter += (hook_OnEnter)obj4; object obj5 = <>c.<>9__6_4; if (obj5 == null) { hook_OnExit val5 = delegate(orig_OnExit orig, Spawn self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f); } }; <>c.<>9__6_4 = val5; obj5 = (object)val5; } Spawn.OnExit += (hook_OnExit)obj5; if (WConfig.CharactersCommandoInvul.Value) { object obj6 = <>c.<>9__6_5; if (obj6 == null) { hook_OnEnter val6 = delegate(orig_OnEnter orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__6_5 = val6; obj6 = (object)val6; } DodgeState.OnEnter += (hook_OnEnter)obj6; object obj7 = <>c.<>9__6_6; if (obj7 == null) { hook_OnExit val7 = delegate(orig_OnExit orig, DodgeState self) { orig.Invoke(self); if (NetworkServer.active) { ((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } }; <>c.<>9__6_6 = val7; obj7 = (object)val7; } DodgeState.OnExit += (hook_OnExit)obj7; LanguageAPI.Add("COMMANDO_UTILITY_DESCRIPTION", "<style=cIsUtility>Roll</style> a short distance. You <style=cIsUtility>cannot be hit</style> while rolling."); } if (!WConfig.CharactersVoidFiendEquip.Value) { return; } object obj8 = <>c.<>9__6_7; if (obj8 == null) { hook_OnEnter val8 = delegate(orig_OnEnter orig, CorruptModeBase self) { orig.Invoke(self); if (self is CorruptMode) { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)1); } else { ((EntityState)self).characterBody.inventory.SetActiveEquipmentSlot((byte)0); } }; <>c.<>9__6_7 = val8; obj8 = (object)val8; } CorruptModeBase.OnEnter += (hook_OnEnter)obj8; } private static void GiveScavMoreItems(orig_Start orig, ScavengerItemGranter self) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Invalid comparison between Unknown and I4 //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Invalid comparison between Unknown and I4 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) if (WConfig.cfgScavMoreItemsElites.Value && NetworkServer.active) { CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody(); Inventory component = ((Component)self).GetComponent<Inventory>(); bool flag = (int)component.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component.currentEquipmentState.equipmentDef.passiveBuffDef) && component.currentEquipmentState.equipmentDef.passiveBuffDef.isElite; if (self.stackRollDataList.Length == 3 && flag) { bool flag2 = (float)component.GetItemCount(Items.BoostHp) >= component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient * 10f - 10f; if (flag2 && component.currentEquipmentState.equipmentDef.passiveBuffDef.eliteDef.healthBoostCoefficient > 10f) { self.stackRollDataList[0].stacks = 7; self.stackRollDataList[0].numRolls = 7; self.stackRollDataList[1].stacks = 5; self.stackRollDataList[1].numRolls = 5; self.stackRollDataList[2].stacks = 2; self.stackRollDataList[2].numRolls = 3; } else if (flag2) { self.stackRollDataList[0].stacks = 5; self.stackRollDataList[0].numRolls = 5; self.stackRollDataList[1].stacks = 3; self.stackRollDataList[1].numRolls = 4; self.stackRollDataList[2].stacks = 2; self.stackRollDataList[2].numRolls = 2; } else if (body.isBoss) { self.stackRollDataList[2].numRolls++; } } } orig.Invoke(self); if (!WConfig.cfgScavBossItem.Value) { return; } CharacterBody body2 = ((Component)self).GetComponent<CharacterMaster>().GetBody(); Inventory component2 = ((Component)self).GetComponent<Inventory>(); if (Object.op_Implicit((Object)(object)body2) && body2.isBoss) { DeathRewards component3 = ((Component)body2).GetComponent<DeathRewards>(); if (Object.op_Implicit((Object)(object)component3)) { component3.bossDropTable = (PickupDropTable)(object)DropTableForBossScav; } ItemDef val = (ItemDef)DropTableForBossScav.pickupEntries[0].pickupDef; int num = 2; if ((int)component2.currentEquipmentIndex != -1 && Object.op_Implicit((Object)(object)component2.currentEquipmentState.equipmentDef.passiveBuffDef) && component2.currentEquipmentState.equipmentDef.passiveBuffDef.isElite) { num = 3; } else { component2.GiveItem(Items.BoostHp, 5); } if (val.DoesNotContainTag((ItemTag)4) && val.DoesNotContainTag((ItemTag)8)) { Debug.Log((object)("Giving Boss Scav " + (object)val)); component2.GiveItem(val, num); } else { Debug.Log((object)(((object)val)?.ToString() + " is Blacklisted for Scavs, resorting to ShinyPearl")); component2.GiveItem(Items.ShinyPearl, num); } } } public unsafe static void NoOrbitalStrikeBlocking() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < SceneCatalog.allSceneDefs.Length; i++) { ((SceneDef)Unsafe.Read<object>((void*)SceneCatalog.allSceneDefs[i])).blockOrbitalSkills = false; } } public static void MarriedEldersBands() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown FireMegaFireball.FixedUpdate += new Manipulator(MarriedLemurianBandActivator); Util.GetBestBodyName += new hook_GetBestBodyName(MarriedLemurianNameHook); ItemDef val = LegacyResourcesAPI.Load<ItemDef>("ItemDefs/AACannon"); ((Object)MarriageLemurianIdentifier).name = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.deprecatedTier = (ItemTier)5; MarriageLemurianIdentifier._itemTierDef = val._itemTierDef; MarriageLemurianIdentifier.nameToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.pickupToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.descriptionToken = "MarriageLemurianIdentifier"; MarriageLemurianIdentifier.hidden = false; MarriageLemurianIdentifier.canRemove = false; MarriageLemurianIdentifier.pickupIconSprite = val.pickupIconSprite; MarriageLemurianIdentifier.pickupModelPrefab = val.pickupModelPrefab; object obj = <>c.<>9__9_0; if (obj == null) { StatHookEventHandler val2 = delegate(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender.inventory != (Object)null && sender.inventory.GetItemCount(MarriageLemurianIdentifier) > 0) { args.damageMultAdd += -0.5f; args.healthMultAdd += -0.5f; } }; <>c.<>9__9_0 = val2; obj = (object)val2; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; CustomItem val3 = new CustomItem(MarriageLemurianIdentifier, (ItemDisplayRule[])(object)new ItemDisplayRule[0]); ItemAPI.Add(val3); } public static void MarriedLemurianBandActivator(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "EntityStates.LemurianBruiserMonster.FireMegaFireball", "damageCoefficient") })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<float, FireMegaFireball, float>>((Func<float, FireMegaFireball, float>)((float damageCoeff, FireMegaFireball entityState) => (((EntityState)entityState).characterBody.inventory.GetItemCount(MarriageLemurianIdentifier) == 1) ? 4f : damageCoeff)); } else { Debug.LogWarning((object)"IL Failed: Buff Married Lemurians"); } } public static string MarriedLemurianNameHook(orig_GetBestBodyName orig, GameObject bodyObject) { string result = orig.Invoke(bodyObject); if (Object.op_Implicit((Object)(object)bodyObject)) { CharacterBody component = bodyObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && component.inventory.GetItemCount(MarriageLemurianIdentifier) > 0) { if (component.inventory.GetItemCount(Items.FireRing) > 0) { return "Kjaro"; } if (component.inventory.GetItemCount(Items.IceRing) > 0) { return "Runald"; } } } return result; } } public class ChangesInteractables { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Func<Instruction, bool> <>9__9_8; public static Manipulator <>9__9_6; public static hook_DropDroplet <>9__9_7; public static Func<Instruction, bool> <>9__9_10; public static Manipulator <>9__9_9; public static hook_AddShrineStack <>9__9_0; public static hook_AddShrineStack <>9__9_1; public static hook_AddShrineStack <>9__9_2; public static hook_AddShrineStack <>9__9_3; public static hook_AddShrineStack <>9__9_4; public static hook_AddShrineStack <>9__9_5; public static hook_Awake <>9__10_0; public static hook_AddShrineStack <>9__10_1; internal void <Faster>b__9_6(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb"); } } internal bool <Faster>b__9_8(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal void <Faster>b__9_7(orig_DropDroplet orig, Duplicating self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true; } } internal void <Faster>b__9_9(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb"); } } internal bool <Faster>b__9_10(Instruction x) { return ILPatternMatchingExt.MatchLdcR4(x, 1.5f); } internal void <Faster>b__9_0(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__9_1(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__9_2(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__9_3(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__9_4(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <Faster>b__9_5(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } } internal void <StupidPriceChanger>b__10_0(orig_Awake orig, PurchaseInteraction self) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 orig.Invoke(self); if ((int)self.costType == 3) { self.cost = 0; } } internal void <StupidPriceChanger>b__10_1(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor interactor) { orig.Invoke(self, interactor); if (self.purchaseCount == 1) { self.costMultiplierPerPurchase = 1.75f; } else if (self.purchaseCount == 2) { self.costMultiplierPerPurchase = 1.93f; } } } public static InteractableSpawnCard RedMultiShopISC = ScriptableObject.CreateInstance<InteractableSpawnCard>(); public static DirectorCard ADTrippleRed = new DirectorCard(); public static readonly GameObject MiliMutliShopMain; public static GameObject MiliMutliShopTerminal; public static InteractableSpawnCard iscShrineGoldFake = Object.Instantiate<InteractableSpawnCard>(LegacyResourcesAPI.Load<InteractableSpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineGoldshoresAccess")); private static Material MatMiliMultiShop; public static void Start() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0083: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Expected O, but got Unknown //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) if (!WConfig.disableNewContent.Value) { RedMultiShopMaker(); } FakeGoldShrine(); StupidPriceChanger(); Faster(); TimedChestController.PreStartClient += new hook_PreStartClient(TimedChestController_PreStartClient); BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/TreasureCache/dtLockbox.asset").WaitForCompletion(); ((PickupDropTable)val).canDropBeReplaced = false; Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Chest1StealthedVariant/Chest1StealthedVariant.prefab").WaitForCompletion().GetComponent<ChestBehavior>() .dropTable = (PickupDropTable)(object)val; ((PickupDropTable)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/DLC1/TreasureCacheVoid/dtVoidLockbox.asset").WaitForCompletion()).canDropBeReplaced = false; ((PickupDropTable)Addressables.LoadAssetAsync<FreeChestDropTable>((object)"RoR2/DLC1/FreeChest/dtFreeChest.asset").WaitForCompletion()).canDropBeReplaced = false; GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/DeepVoidPortalBattery/DeepVoidPortalBattery.prefab").WaitForCompletion(); val2.GetComponent<HoldoutZoneController>().baseChargeDuration = WConfig.FasterDeepVoidSignal.Value; HoldoutZoneController component = val2.GetComponent<HoldoutZoneController>(); component.baseRadius += 5f; GameObject val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/Teleporter1"); GameObject val4 = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Teleporters/LunarTeleporter Variant"); val3.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f; val4.GetComponent<BossGroup>().bossDropChance = WConfig.YellowPercentage.Value / 100f; val3.GetComponent<TeleporterInteraction>().baseShopSpawnChance = WConfig.ShopChancePercentage.Value / 100f; if (WConfig.VoidPortalChance.Value) { val3.GetComponent<PortalSpawner>().minStagesCleared = 4; val4.GetComponent<PortalSpawner>().spawnChance = 0.2f; val4.GetComponent<PortalSpawner>().minStagesCleared = 4; val4.GetComponent<PortalSpawner>().spawnChance = 1f; } if (!WConfig.InteractablesCombatShrineHP.Value) { GameObject val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombat.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSandy Variant.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; val5 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/ShrineCombat/ShrineCombatSnowy Variant.prefab").WaitForCompletion(); val5.GetComponent<CombatSquad>().grantBonusHealthInMultiplayer = false; } LunarTeleporterBaseState.FixedUpdate += new hook_FixedUpdate(LunarTeleporterBaseState_FixedUpdate); } private static void TimedChestController_PreStartClient(orig_PreStartClient orig, TimedChestController self) { orig.Invoke(self); if (Run.instance.stageClearCount > 3) { float lockTime = self.lockTime / 2f * (float)Run.instance.stageClearCount; self.lockTime = lockTime; } } public static void LunarTeleporterBaseState_FixedUpdate(orig_FixedUpdate orig, LunarTeleporterBaseState self) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance)) { if (TeleporterInteraction.instance.isInFinalSequence) { self.genericInteraction.Networkinteractability = (Interactability)0; } else { self.genericInteraction.Networkinteractability = self.preferredInteractability; } } } public static void Faster() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_020b: 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_0216: Expected O, but got Unknown //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //IL_0255: 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_0260: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown if (WConfig.FasterPrinter.Value) { object obj = <>c.<>9__9_6; if (obj == null) { Manipulator val = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val15 = new ILCursor(il); if (val15.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val15.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: PurchaseInteraction.CreateItemTakenOrb"); } }; <>c.<>9__9_6 = val; obj = (object)val; } PurchaseInteraction.CreateItemTakenOrb += (Manipulator)obj; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/Duplicator").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorLarge").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorMilitary").GetComponent<DelayedEvent>()).enabled = false; ((Behaviour)LegacyResourcesAPI.Load<GameObject>("Prefabs/networkedobjects/chest/DuplicatorWild").GetComponent<DelayedEvent>()).enabled = false; object obj2 = <>c.<>9__9_7; if (obj2 == null) { hook_DropDroplet val2 = delegate(orig_DropDroplet orig, Duplicating self) { orig.Invoke(self); if (NetworkServer.active) { ((Component)((EntityState)self).outer).GetComponent<PurchaseInteraction>().Networkavailable = true; } }; <>c.<>9__9_7 = val2; obj2 = (object)val2; } Duplicating.DropDroplet += (hook_DropDroplet)obj2; EntityStateConfiguration val3 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Duplicator.Duplicating"); val3.serializedFieldsCollection.serializedFields[0].fieldValue.stringValue = "0.6"; val3.serializedFieldsCollection.serializedFields[1].fieldValue.stringValue = "1.25"; } if (WConfig.FasterScrapper.Value) { object obj3 = <>c.<>9__9_9; if (obj3 == null) { Manipulator val4 = delegate(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val14 = new ILCursor(il); if (val14.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 1.5f) })) { val14.Next.Operand = 0.75f; } else { Debug.LogWarning((object)"IL Failed: ScrapperController.CreateItemTakenOrb"); } }; <>c.<>9__9_9 = val4; obj3 = (object)val4; } ScrapperController.CreateItemTakenOrb += (Manipulator)obj3; EntityStateConfiguration val5 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.Scrapping"); EntityStateConfiguration val6 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.ScrappingToIdle"); EntityStateConfiguration val7 = LegacyResourcesAPI.Load<EntityStateConfiguration>("EntityStateConfigurations/EntityStates.Scrapper.WaitToBeginScrapping"); val5.serializedFieldsCollection.serializedFields[2].fieldValue.stringValue = "1"; val6.serializedFieldsCollection.serializedFields[2].fieldValue.stringValue = "0.4"; val7.serializedFieldsCollection.serializedFields[0].fieldValue.stringValue = "0.9"; } if (!WConfig.FasterShrines.Value) { return; } object obj4 = <>c.<>9__9_0; if (obj4 == null) { hook_AddShrineStack val8 = delegate(orig_AddShrineStack orig, ShrineBloodBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_0 = val8; obj4 = (object)val8; } ShrineBloodBehavior.AddShrineStack += (hook_AddShrineStack)obj4; object obj5 = <>c.<>9__9_1; if (obj5 == null) { hook_AddShrineStack val9 = delegate(orig_AddShrineStack orig, ShrineBossBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_1 = val9; obj5 = (object)val9; } ShrineBossBehavior.AddShrineStack += (hook_AddShrineStack)obj5; object obj6 = <>c.<>9__9_2; if (obj6 == null) { hook_AddShrineStack val10 = delegate(orig_AddShrineStack orig, ShrineChanceBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_2 = val10; obj6 = (object)val10; } ShrineChanceBehavior.AddShrineStack += (hook_AddShrineStack)obj6; object obj7 = <>c.<>9__9_3; if (obj7 == null) { hook_AddShrineStack val11 = delegate(orig_AddShrineStack orig, ShrineCombatBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_3 = val11; obj7 = (object)val11; } ShrineCombatBehavior.AddShrineStack += (hook_AddShrineStack)obj7; object obj8 = <>c.<>9__9_4; if (obj8 == null) { hook_AddShrineStack val12 = delegate(orig_AddShrineStack orig, ShrineHealingBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_4 = val12; obj8 = (object)val12; } ShrineHealingBehavior.AddShrineStack += (hook_AddShrineStack)obj8; object obj9 = <>c.<>9__9_5; if (obj9 == null) { hook_AddShrineStack val13 = delegate(orig_AddShrineStack orig, ShrineRestackBehavior self, Interactor activator) { orig.Invoke(self, activator); if (NetworkServer.active) { self.refreshTimer = 1f; } }; <>c.<>9__9_5 = val13; obj9 = (object)val13; } ShrineRestackBehavior.AddShrineStack += (hook_AddShrineStack)obj9; } public static void StupidPriceChanger() { //IL_00b6: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Expected O, but got Unknown //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown if (WConfig.InteractableHealingShrine.Value) { LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<PurchaseInteraction>().cost = 10; LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>().costMultiplierPerPurchase = 1.4f; ShrineHealingBehavior component = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/Shrines/ShrineHealing").GetComponent<ShrineHealingBehavior>(); component.maxPurchaseCount++; } LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/BrokenDrones/MegaDroneBroken").GetComponent<PurchaseInteraction>().cost