Decompiled source of ScrappyChests v1.3.0
ScrappyChests.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.ScavBackpack; using HarmonyLib; using Microsoft.CodeAnalysis; using On; using On.EntityStates.ScavBackpack; using On.RoR2; using On.RoR2.Artifacts; using On.RoR2.UI; using RiskOfOptions; using RiskOfOptions.Components.Options; using RiskOfOptions.Components.Panel; using RiskOfOptions.Components.RuntimePrefabs; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Artifacts; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("ScrappyChests")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+1f0f8a9783336260241a8cb4a76bb8a1a80c27e1")] [assembly: AssemblyProduct("ScrappyChests")] [assembly: AssemblyTitle("ScrappyChests")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } [EditorBrowsable(EditorBrowsableState.Never)] public static class IsExternalInit { } } namespace ScrappyChests { public static class ConfigEntryBaseExtensions { public static void AddSettingChanged(this ConfigEntryBase config, EventHandler settingChanged) { if (config is ConfigEntry<bool> val) { val.SettingChanged += settingChanged; return; } if (config is ConfigEntry<float> val2) { val2.SettingChanged += settingChanged; return; } if (config is ConfigEntry<int> val3) { val3.SettingChanged += settingChanged; return; } if (config is ConfigEntry<string> val4) { val4.SettingChanged += settingChanged; return; } throw new NotSupportedException(((object)config).GetType().Name); } } public enum ConfigPresetMoniker { Default, Easy, AllTheChoices, DefaultPrinterSpawnRate, NoPrinters, Hardcore, V1, V1_1, V1_2, Vanilla, Custom } public record ConfigPreset { public ConfigPresetMoniker Moniker { get; init; } public string Description { get; init; } public bool ReplaceChestDropTable { get; init; } = true; public bool ReplaceMultiShopDropTable { get; init; } = true; public bool ReplaceAdaptiveChestDropTable { get; init; } = true; public bool ReplaceChanceShrineDropTable { get; init; } = true; public bool ReplaceLegendaryChestDropTable { get; init; } = true; public bool ReplaceVoidPotentialDropTable { get; init; } = true; public bool ReplaceVoidCradleDropTable { get; init; } = true; public bool ReplaceLunarPodDropTable { get; init; } public bool ReplaceLunarBudsDropTable { get; init; } public float WhitePrinterSpawnMultiplier { get; init; } = 1.5f; public float GreenPrinterSpawnMultiplier { get; init; } = 2.5f; public float RedPrinterSpawnMultiplier { get; init; } = 3f; public float YellowPrinterSpawnMultiplier { get; init; } = 3f; public bool AddVoidItemsToPrinters { get; init; } = true; public bool AddVoidPrintersToVoidSeeds { get; init; } = true; public int MinimumStageForRedPrinters { get; init; } = 2; public float VoidSeedsPrinterWeight { get; init; } = 0.2f; public int VoidSeedsPrinterWhiteWeight { get; init; } = 60; public int VoidSeedsPrinterWhiteCreditCost { get; init; } = 25; public int VoidSeedsPrinterGreenWeight { get; init; } = 36; public int VoidSeedsPrinterGreenCreditCost { get; init; } = 40; public int VoidSeedsPrinterRedWeight { get; init; } = 4; public int VoidSeedsPrinterRedCreditCost { get; init; } = 50; public bool AddVoidItemsToCauldrons { get; init; } = true; public bool AddWhiteCauldronToBazaar { get; init; } = true; public bool AddYellowCauldronToBazaar { get; init; } = true; public bool AddYellowCauldronToMoon { get; init; } = true; public string YellowCauldronCost { get; init; } = "wwgy"; public bool ReplaceLockboxDropTable { get; init; } public bool ReplaceEncrustedCacheDropTable { get; init; } public bool ReplaceCrashedMultishopDropTable { get; init; } public bool ReplaceBossHunterDropTable { get; init; } public float SpeedItemSpawnMultiplier { get; init; } = 1.25f; public bool ReplaceBossDropTable { get; init; } = true; public bool ReplaceAWUDropTable { get; init; } = true; public bool ReplaceScavengerDropTable { get; init; } public bool ReplaceElderLemurianDropTable { get; init; } public bool ReplaceLunarCoinDrops { get; init; } = true; public bool ReplaceNewtAltarsCost { get; init; } = true; public bool ReplaceLunarSeerCost { get; init; } = true; public bool ReplaceLunarPodCost { get; init; } = true; public bool ReplaceLunarBudCost { get; init; } = true; public bool ReplaceSlabCost { get; init; } = true; public bool ReplaceMageCost { get; init; } = true; public bool ReplaceFrogCost { get; init; } = true; public bool ReplaceShrineOfOrderCost { get; init; } public bool ReplaceDoppelgangerDropTable { get; init; } public bool ReplaceSacrificeArtifactDropTable { get; init; } = true; public bool ReplaceSimulacrumOrbDropTable { get; init; } = true; public bool ReplaceVoidFieldsOrbDropTable { get; init; } = true; public bool ReplaceWhiteItems { get; init; } = true; public bool ReplaceGreenItems { get; init; } = true; public bool ReplaceRedItems { get; init; } = true; public bool ReplaceYellowItems { get; init; } = true; public bool ReplaceBlueItems { get; init; } = true; public bool ReplaceVoidTier1Items { get; init; } = true; public bool ReplaceVoidTier2Items { get; init; } = true; public bool ReplaceVoidTier3Items { get; init; } = true; } public static class ConfigPresetDescriptions { public static readonly string Default = "Default configuration for the mod:\r\n- Interactables and monsters drop scrap instead of items\r\n- Bonus printer spawn rate\r\n- Void items can be found in printers and cauldrons\r\n- Extra white and yellow cauldrons in the Bazaar and on the moon\r\n- Interactables that costs lunar coins, cost white items instead"; public static readonly string Easy = "Default configuration except:\r\n- Adaptive chests, legendary chests, void potential, void cradles and bosses drop items\r\n- Lunar interactables cost lunar coins\r\n- Red items are never replaced with scrap"; public static readonly string AllTheChoices = "Default configuration except:\r\n- Multishops, adaptive chests and void potentials drop items"; public static readonly string DefaultPrinterSpawnRate = "Default configuration except:\r\n- Default printer spawn rate"; public static readonly string NoPrinters = "Default configuration except:\r\n- Printers are disabled"; public static readonly string Hardcore = "Default configuration except:\r\n- Every chests and enemies drops scrap\r\n- Default printers spawn rate\r\n- No void printers in void seeds\r\n- No extra cauldrons\r\n- No speed item bonus"; public static readonly string V1 = "Equivalent to the 1.0 version of the mod.\r\n\r\nDefault configuration except:\r\n- Default printers spawn rate\r\n- No void printers in void seeds\r\n- No extra cauldrons\r\n- No void items in printers and cauldrons\r\n- No speed items bonus\r\n- Lunar interactables cost lunar coins\r\n- Void cradles drops void items"; public static readonly string V1_1 = "Equivalent to the 1.1 version of the mod.\r\n\r\nDefault configuration except:\r\n- No void printers in void seeds\r\n- No extra cauldrons\r\n- Lunar interactables cost lunar coins"; public static readonly string V1_2 = "Equivalent to the 1.2 version of the mod.\r\n\r\nDefault configuration except:\r\n- Lunar interactables cost lunar coins (newt altars and lunar seers) "; public static readonly string Vanilla = "Every changes are disabled."; public static readonly string Custom = "Custom configuration"; } public static class ConfigPresets { public static readonly ConfigPreset Default = new ConfigPreset { Moniker = ConfigPresetMoniker.Default, Description = ConfigPresetDescriptions.Default }; public static readonly ConfigPreset Easy = new ConfigPreset { Moniker = ConfigPresetMoniker.Easy, Description = ConfigPresetDescriptions.Easy, ReplaceAdaptiveChestDropTable = false, ReplaceRedItems = false, ReplaceLegendaryChestDropTable = false, ReplaceVoidPotentialDropTable = false, ReplaceVoidCradleDropTable = false, ReplaceBossDropTable = false, ReplaceAWUDropTable = false, ReplaceNewtAltarsCost = false, ReplaceLunarSeerCost = false, ReplaceLunarPodCost = false, ReplaceLunarBudCost = false, ReplaceSlabCost = false, ReplaceMageCost = false, ReplaceFrogCost = false, ReplaceSimulacrumOrbDropTable = false, ReplaceVoidFieldsOrbDropTable = false }; public static readonly ConfigPreset AllTheChoices = new ConfigPreset { Moniker = ConfigPresetMoniker.AllTheChoices, Description = ConfigPresetDescriptions.AllTheChoices, ReplaceMultiShopDropTable = false, ReplaceAdaptiveChestDropTable = false, ReplaceVoidPotentialDropTable = false, ReplaceLunarPodDropTable = true, ReplaceSimulacrumOrbDropTable = false, ReplaceVoidFieldsOrbDropTable = false }; public static readonly ConfigPreset DefaultPrinterSpawnRate = new ConfigPreset { Moniker = ConfigPresetMoniker.DefaultPrinterSpawnRate, Description = ConfigPresetDescriptions.DefaultPrinterSpawnRate, WhitePrinterSpawnMultiplier = 1f, GreenPrinterSpawnMultiplier = 1f, RedPrinterSpawnMultiplier = 1f, YellowPrinterSpawnMultiplier = 1f }; public static readonly ConfigPreset NoPrinters = new ConfigPreset { Moniker = ConfigPresetMoniker.NoPrinters, Description = ConfigPresetDescriptions.NoPrinters, WhitePrinterSpawnMultiplier = 0f, GreenPrinterSpawnMultiplier = 0f, RedPrinterSpawnMultiplier = 0f, YellowPrinterSpawnMultiplier = 0f, AddVoidPrintersToVoidSeeds = false }; public static readonly ConfigPreset Hardcore = new ConfigPreset { Moniker = ConfigPresetMoniker.Hardcore, Description = ConfigPresetDescriptions.Hardcore, ReplaceLunarPodDropTable = true, ReplaceLunarBudsDropTable = true, WhitePrinterSpawnMultiplier = 1f, GreenPrinterSpawnMultiplier = 1f, RedPrinterSpawnMultiplier = 1f, YellowPrinterSpawnMultiplier = 1f, AddVoidPrintersToVoidSeeds = false, MinimumStageForRedPrinters = 5, AddWhiteCauldronToBazaar = false, AddYellowCauldronToBazaar = false, AddYellowCauldronToMoon = false, SpeedItemSpawnMultiplier = 1f, ReplaceLockboxDropTable = true, ReplaceEncrustedCacheDropTable = true, ReplaceCrashedMultishopDropTable = true, ReplaceBossHunterDropTable = true, ReplaceScavengerDropTable = true, ReplaceElderLemurianDropTable = true, ReplaceShrineOfOrderCost = true, ReplaceLunarCoinDrops = false }; public static readonly ConfigPreset V1_2 = new ConfigPreset { Moniker = ConfigPresetMoniker.V1_2, Description = ConfigPresetDescriptions.V1_2, MinimumStageForRedPrinters = 5, ReplaceLunarPodCost = false, ReplaceLunarBudCost = false, ReplaceSlabCost = false, ReplaceMageCost = false, ReplaceFrogCost = false, ReplaceLunarCoinDrops = false }; public static readonly ConfigPreset V1_1 = new ConfigPreset { Moniker = ConfigPresetMoniker.V1_1, Description = ConfigPresetDescriptions.V1_1, AddYellowCauldronToBazaar = false, AddYellowCauldronToMoon = false, AddVoidPrintersToVoidSeeds = false, MinimumStageForRedPrinters = 5, ReplaceNewtAltarsCost = false, ReplaceLunarSeerCost = false, AddWhiteCauldronToBazaar = false, ReplaceLunarPodCost = false, ReplaceLunarBudCost = false, ReplaceSlabCost = false, ReplaceMageCost = false, ReplaceFrogCost = false, ReplaceLunarCoinDrops = false }; public static readonly ConfigPreset V1 = new ConfigPreset { Moniker = ConfigPresetMoniker.V1, Description = ConfigPresetDescriptions.V1, WhitePrinterSpawnMultiplier = 1f, GreenPrinterSpawnMultiplier = 1f, RedPrinterSpawnMultiplier = 1f, YellowPrinterSpawnMultiplier = 1f, AddVoidItemsToPrinters = false, AddVoidItemsToCauldrons = false, AddYellowCauldronToBazaar = false, AddYellowCauldronToMoon = false, AddVoidPrintersToVoidSeeds = false, MinimumStageForRedPrinters = 5, ReplaceNewtAltarsCost = false, ReplaceLunarSeerCost = false, SpeedItemSpawnMultiplier = 1f, ReplaceVoidCradleDropTable = false, AddWhiteCauldronToBazaar = false, ReplaceLunarPodCost = false, ReplaceLunarBudCost = false, ReplaceSlabCost = false, ReplaceMageCost = false, ReplaceFrogCost = false, ReplaceLunarCoinDrops = false }; public static readonly ConfigPreset Vanilla = new ConfigPreset { Moniker = ConfigPresetMoniker.Vanilla, Description = ConfigPresetDescriptions.Vanilla, ReplaceChestDropTable = false, ReplaceMultiShopDropTable = false, ReplaceAdaptiveChestDropTable = false, ReplaceChanceShrineDropTable = false, ReplaceLegendaryChestDropTable = false, ReplaceVoidPotentialDropTable = false, ReplaceVoidCradleDropTable = false, ReplaceLunarPodDropTable = false, ReplaceLunarBudsDropTable = false, WhitePrinterSpawnMultiplier = 1f, GreenPrinterSpawnMultiplier = 1f, RedPrinterSpawnMultiplier = 1f, YellowPrinterSpawnMultiplier = 1f, AddVoidItemsToPrinters = false, AddVoidPrintersToVoidSeeds = false, MinimumStageForRedPrinters = 5, AddVoidItemsToCauldrons = false, AddWhiteCauldronToBazaar = false, AddYellowCauldronToBazaar = false, AddYellowCauldronToMoon = false, ReplaceLockboxDropTable = false, ReplaceEncrustedCacheDropTable = false, ReplaceCrashedMultishopDropTable = false, ReplaceBossHunterDropTable = false, SpeedItemSpawnMultiplier = 1f, ReplaceBossDropTable = false, ReplaceAWUDropTable = false, ReplaceScavengerDropTable = false, ReplaceElderLemurianDropTable = false, ReplaceLunarCoinDrops = false, ReplaceNewtAltarsCost = false, ReplaceLunarSeerCost = false, ReplaceLunarPodCost = false, ReplaceLunarBudCost = false, ReplaceSlabCost = false, ReplaceMageCost = false, ReplaceFrogCost = false, ReplaceDoppelgangerDropTable = false, ReplaceSacrificeArtifactDropTable = false, ReplaceSimulacrumOrbDropTable = false, ReplaceVoidFieldsOrbDropTable = false, ReplaceWhiteItems = false, ReplaceGreenItems = false, ReplaceRedItems = false, ReplaceYellowItems = false, ReplaceBlueItems = false, ReplaceVoidTier1Items = false, ReplaceVoidTier2Items = false, ReplaceVoidTier3Items = false }; public static readonly ConfigPreset[] All = new ConfigPreset[10] { Default, Easy, AllTheChoices, DefaultPrinterSpawnRate, NoPrinters, Hardcore, V1_2, V1_1, V1, Vanilla }; } internal class Configuration { private bool _presetIsChanging; private bool _settingIsChanging; public static Configuration Instance { get; set; } public ConfigEntry<bool> ModEnabled { get; } public ConfigEntry<ConfigPresetMoniker> Preset { get; } public PresetChoiceOption PresetChoiceOption { get; } public ConfigEntry<bool> ReplaceChestDropTable { get; } public ConfigEntry<bool> ReplaceMultiShopDropTable { get; } public ConfigEntry<bool> ReplaceAdaptiveChestDropTable { get; } public ConfigEntry<bool> ReplaceChanceShrineDropTable { get; } public ConfigEntry<bool> ReplaceLegendaryChestDropTable { get; } public ConfigEntry<bool> ReplaceVoidPotentialDropTable { get; } public ConfigEntry<bool> ReplaceVoidCradleDropTable { get; } public ConfigEntry<bool> ReplaceLunarPodDropTable { get; } public ConfigEntry<bool> ReplaceLunarBudsDropTable { get; } public ConfigEntry<float> WhitePrinterSpawnMultiplier { get; } public ConfigEntry<float> GreenPrinterSpawnMultiplier { get; } public ConfigEntry<float> RedPrinterSpawnMultiplier { get; } public ConfigEntry<float> YellowPrinterSpawnMultiplier { get; } public ConfigEntry<int> MinimumStageForRedPrinters { get; } public ConfigEntry<bool> AddVoidItemsToPrinters { get; } public ConfigEntry<bool> AddVoidPrintersToVoidSeeds { get; } public ConfigEntry<float> VoidSeedsPrinterWeight { get; } public ConfigEntry<int> VoidSeedsPrinterWhiteWeight { get; } public ConfigEntry<int> VoidSeedsPrinterWhiteCreditCost { get; } public ConfigEntry<int> VoidSeedsPrinterGreenWeight { get; } public ConfigEntry<int> VoidSeedsPrinterGreenCreditCost { get; } public ConfigEntry<int> VoidSeedsPrinterRedWeight { get; } public ConfigEntry<int> VoidSeedsPrinterRedCreditCost { get; } public ConfigEntry<bool> AddVoidItemsToCauldrons { get; } public ConfigEntry<bool> AddWhiteCauldronToBazaar { get; } public ConfigEntry<bool> AddYellowCauldronToBazaar { get; } public ConfigEntry<bool> AddYellowCauldronToMoon { get; } public ConfigEntry<string> _yellowCauldronCost { get; } public ConfigEntry<bool> ReplaceLockboxDropTable { get; } public ConfigEntry<bool> ReplaceEncrustedCacheDropTable { get; } public ConfigEntry<bool> ReplaceCrashedMultishopDropTable { get; } public ConfigEntry<bool> ReplaceBossHunterDropTable { get; } public ConfigEntry<float> SpeedItemSpawnMultiplier { get; } public ConfigEntry<bool> ReplaceBossDropTable { get; } public ConfigEntry<bool> ReplaceAWUDropTable { get; } public ConfigEntry<bool> ReplaceScavengerDropTable { get; } public ConfigEntry<bool> ReplaceElderLemurianDropTable { get; } public ConfigEntry<bool> ReplaceLunarCoinDrops { get; } public ConfigEntry<bool> ReplaceNewtAltarsCost { get; } public ConfigEntry<bool> ReplaceLunarSeerCost { get; } public ConfigEntry<bool> ReplaceLunarPodCost { get; } public ConfigEntry<bool> ReplaceLunarBudCost { get; } public ConfigEntry<bool> ReplaceSlabCost { get; } public ConfigEntry<bool> ReplaceMageCost { get; } public ConfigEntry<bool> ReplaceFrogCost { get; } public ConfigEntry<bool> ReplaceShrineOfOrderCost { get; } public ConfigEntry<bool> ReplaceDoppelgangerDropTable { get; } public ConfigEntry<bool> ReplaceSacrificeArtifactDropTable { get; } public ConfigEntry<bool> ReplaceSimulacrumOrbDropTable { get; } public ConfigEntry<bool> ReplaceVoidFieldsOrbDropTable { get; } public ConfigEntry<bool> ReplaceWhiteItems { get; } public ConfigEntry<bool> ReplaceGreenItems { get; } public ConfigEntry<bool> ReplaceRedItems { get; } public ConfigEntry<bool> ReplaceYellowItems { get; } public ConfigEntry<bool> ReplaceBlueItems { get; } public ConfigEntry<bool> ReplaceVoidTier1Items { get; } public ConfigEntry<bool> ReplaceVoidTier2Items { get; } public ConfigEntry<bool> ReplaceVoidTier3Items { get; } public ConfigEntry<string> _maxCompletedEclipseLevels { get; } public (int White, int Green, int Red, int Yellow) YellowCauldronCost { get { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; string value = _yellowCauldronCost.Value; for (int i = 0; i < value.Length; i++) { switch (value[i]) { case 'W': case 'w': num++; break; case 'G': case 'g': num2++; break; case 'R': case 'r': num3++; break; case 'Y': case 'y': num4++; break; } } return (num, num2, num3, num4); } } public Dictionary<string, int> MaxCompletedEclipseLevels { get { Dictionary<string, int> dictionary = new Dictionary<string, int>(); string[] array = _maxCompletedEclipseLevels.Value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { string[] array2 = array[i].Split(new char[1] { '=' }); if (array2.Length == 2 && int.TryParse(array2[1], out var result)) { dictionary[array2[0]] = result; } } return dictionary; } set { _maxCompletedEclipseLevels.Value = string.Join(",", from x in value orderby x.Key select $"{x.Key}={x.Value}"); } } public Configuration(ConfigFile config) { ConfigPreset @default = ConfigPresets.Default; ModEnabled = config.Bind<bool>("Configuration", "Mod enabled", true, "Mod enabled"); Preset = config.Bind<ConfigPresetMoniker>("Configuration", "Preset", ConfigPresetMoniker.Default, "Configuration preset"); PresetChoiceOption = new PresetChoiceOption((ConfigEntryBase)(object)Preset); ReplaceChestDropTable = config.Bind<bool>("Chests", "Chest", @default.ReplaceChestDropTable, "Chests will drop scrap instead of items"); ReplaceMultiShopDropTable = config.Bind<bool>("Chests", "Multishop Terminal", @default.ReplaceMultiShopDropTable, "Multishop Terminals will drop scrap instead of items"); ReplaceAdaptiveChestDropTable = config.Bind<bool>("Chests", "Adaptive Chest", @default.ReplaceAdaptiveChestDropTable, "Adaptive Chests will drop scrap instead of items"); ReplaceChanceShrineDropTable = config.Bind<bool>("Chests", "Shrine of Chance", @default.ReplaceChanceShrineDropTable, "Shrine of Chance will drop scrap instead of items"); ReplaceLegendaryChestDropTable = config.Bind<bool>("Chests", "Legendary Chest", @default.ReplaceLegendaryChestDropTable, "Legendary Chests will drop scrap instead of items"); ReplaceVoidPotentialDropTable = config.Bind<bool>("Chests", "Void Potential", @default.ReplaceVoidPotentialDropTable, "Void Potential will drop scrap instead of items"); ReplaceVoidCradleDropTable = config.Bind<bool>("Chests", "Void Cradle", @default.ReplaceVoidCradleDropTable, "Void Cradle will drop scrap instead of items"); ReplaceLunarPodDropTable = config.Bind<bool>("Chests", "Lunar Pod", @default.ReplaceLunarPodDropTable, "Lunar Pods will drop Beads of Fealty instead of items"); ReplaceLunarBudsDropTable = config.Bind<bool>("Chests", "Lunar Bud", @default.ReplaceLunarBudsDropTable, "Lunar Buds in the Bazaar Between Time will always sell Beads of Fealty"); WhitePrinterSpawnMultiplier = config.Bind<float>("Printers", "White printer spawn multiplier", @default.WhitePrinterSpawnMultiplier, "Controls the spawn rate of white printers. 0.0x = never. 1.0x = default spawn rate. 2.0x = 2 times more likely to spawn printers."); GreenPrinterSpawnMultiplier = config.Bind<float>("Printers", "Green printer spawn multiplier", @default.GreenPrinterSpawnMultiplier, "Controls the spawn rate of green printers. 0.0x = never. 1.0x = default spawn rate. 2.0x = 2 times more likely to spawn printers."); RedPrinterSpawnMultiplier = config.Bind<float>("Printers", "Red printer spawn multiplier", @default.RedPrinterSpawnMultiplier, "Controls the spawn rate of ref printers. 0.0x = never. 1.0x = default spawn rate. 2.0x = 2 times more likely to spawn printers."); YellowPrinterSpawnMultiplier = config.Bind<float>("Printers", "Yellow printer spawn multiplier", @default.YellowPrinterSpawnMultiplier, "Controls the spawn rate of yellow printers. 0.0x = never. 1.0x = default spawn rate. 2.0x = 2 times more likely to spawn printers."); MinimumStageForRedPrinters = config.Bind<int>("Printers", "Minimum stage for red printers to spawn", @default.MinimumStageForRedPrinters, "Minimum stage for red printers to spawn. The vanilla value is 5."); AddVoidItemsToPrinters = config.Bind<bool>("Printers", "Add void items to Printers", @default.AddVoidItemsToPrinters, "Add void items to Printers"); AddVoidPrintersToVoidSeeds = config.Bind<bool>("Printers", "Add void printers to void seeds", @default.AddVoidPrintersToVoidSeeds, "Add void printers to void seeds"); VoidSeedsPrinterWeight = config.Bind<float>("Printers", "Void seeds void printers weigth", @default.VoidSeedsPrinterWeight, "Void seeds void printers weigth"); VoidSeedsPrinterWhiteWeight = config.Bind<int>("Printers", "Void seeds white void printers weigth", @default.VoidSeedsPrinterWhiteWeight, "Void seeds white void printers weigth"); VoidSeedsPrinterWhiteCreditCost = config.Bind<int>("Printers", "Void seeds white void printers credit cost", @default.VoidSeedsPrinterWhiteCreditCost, "Void seeds white void printers credit cost"); VoidSeedsPrinterGreenWeight = config.Bind<int>("Printers", "Void seeds green void printers weigth", @default.VoidSeedsPrinterGreenWeight, "Void seeds green void printers weigth"); VoidSeedsPrinterGreenCreditCost = config.Bind<int>("Printers", "Void seeds green void printers credit cost", @default.VoidSeedsPrinterGreenCreditCost, "Void seeds green void printers credit cost"); VoidSeedsPrinterRedWeight = config.Bind<int>("Printers", "Void seeds red void printers weigth", @default.VoidSeedsPrinterRedWeight, "Void seeds red void printers weigth"); VoidSeedsPrinterRedCreditCost = config.Bind<int>("Printers", "Void seeds red void printers credit cost", @default.VoidSeedsPrinterRedCreditCost, "Void seeds red void printers credit cost"); AddVoidItemsToCauldrons = config.Bind<bool>("Cauldrons", "Add void items to Cauldrons", @default.AddVoidItemsToCauldrons, "Add void items to Cauldrons"); AddWhiteCauldronToBazaar = config.Bind<bool>("Cauldrons", "Add white Cauldrons to the Bazaar", @default.AddWhiteCauldronToBazaar, "Add a white Cauldrons to the Bazaar"); AddYellowCauldronToBazaar = config.Bind<bool>("Cauldrons", "Add yellow Cauldrons to the Bazaar", @default.AddYellowCauldronToBazaar, "Add a yellow Cauldrons to the Bazaar"); AddYellowCauldronToMoon = config.Bind<bool>("Cauldrons", "Add yellow Cauldrons to the Moon", @default.AddYellowCauldronToMoon, "Add a yellow Cauldrons to the Moon"); _yellowCauldronCost = config.Bind<string>("Cauldrons", "Yellow Cauldrons Cost", @default.YellowCauldronCost, "Cost to use the yellow Cauldrons\r\n\r\nw: white\r\ng: green\r\nr: red\r\ny: yellow (boss)\r\n\r\nExamples:\r\nywg: 1 yellow, 1 white, 1 green\r\nwwwrr: 3 white, 2 red"); ReplaceLockboxDropTable = config.Bind<bool>("Items", "Rusted Key", @default.ReplaceLockboxDropTable, "Lockboxes will drop scrap instead of items"); ReplaceEncrustedCacheDropTable = config.Bind<bool>("Items", "Encrusted Key", @default.ReplaceEncrustedCacheDropTable, "Encrusted Cache will drop scrap instead of items"); ReplaceCrashedMultishopDropTable = config.Bind<bool>("Items", "Crashed Multishop", @default.ReplaceCrashedMultishopDropTable, "Crashed Multishop will drop scrap instead of items"); ReplaceBossHunterDropTable = config.Bind<bool>("Items", "Trophy Hunters Tricorn", @default.ReplaceBossHunterDropTable, "Trophy Hunter's Tricorn will drop scrap instead of items"); SpeedItemSpawnMultiplier = config.Bind<float>("Items", "Speed items spawn multiplier", @default.SpeedItemSpawnMultiplier, "Controls the spawn rate of speed items. 0.0x = never. 1.0x = default spawn rate. 2.0x = 2 times more likely to spawn speed items."); ReplaceBossDropTable = config.Bind<bool>("Mobs", "Boss", @default.ReplaceBossDropTable, "Defeating a Boss will drop scrap instead of items"); ReplaceAWUDropTable = config.Bind<bool>("Mobs", "Alloy Worship Unit", @default.ReplaceAWUDropTable, "Alloy Worship Unit will drop scrap instead of items"); ReplaceScavengerDropTable = config.Bind<bool>("Mobs", "Scavenger", @default.ReplaceScavengerDropTable, "Scavenger will drop scrap instead of items"); ReplaceElderLemurianDropTable = config.Bind<bool>("Mobs", "Elite Elder Lemurian", @default.ReplaceElderLemurianDropTable, "The Elite Elder Lemurian in the hidden chamber of Abandoned Aqueduct will drop scrap instead of bands"); ReplaceLunarCoinDrops = config.Bind<bool>("Mobs", "Lunar coins drops", @default.ReplaceLunarCoinDrops, "Mobs will drop white scrap instead of Lunar coins"); ReplaceNewtAltarsCost = config.Bind<bool>("Costs", "Newt Altars uses white items", @default.ReplaceNewtAltarsCost, "Newt Altar uses white items as the activation cost instead of lunar coins"); ReplaceLunarSeerCost = config.Bind<bool>("Costs", "Lunar Seer uses white items", @default.ReplaceLunarSeerCost, "Lunar Seer (dream) uses white items as the activation cost instead of lunar coins"); ReplaceLunarPodCost = config.Bind<bool>("Costs", "Lunar pods uses white items", @default.ReplaceLunarPodCost, "Lunar pods uses white items as the activation cost instead of lunar coins"); ReplaceLunarBudCost = config.Bind<bool>("Costs", "Lunar buds uses white items", @default.ReplaceLunarBudCost, "Lunar buds uses white items as the activation cost instead of lunar coins"); ReplaceSlabCost = config.Bind<bool>("Costs", "Slab uses white items", @default.ReplaceSlabCost, "The Slab in the Bazaar Between Time uses white items as the activation cost instead of lunar coins"); ReplaceMageCost = config.Bind<bool>("Costs", "Unlocking artificier uses white items", @default.ReplaceMageCost, "Unlocking artificier uses white items as the activation cost instead of lunar coins"); ReplaceFrogCost = config.Bind<bool>("Costs", "Petting the frog uses white items", @default.ReplaceFrogCost, "Petting the frog uses white items as the activation cost instead of lunar coins"); ReplaceShrineOfOrderCost = config.Bind<bool>("Costs", "Shrine of order uses white items", @default.ReplaceShrineOfOrderCost, "Shrine of order uses white items as the activation cost instead of lunar coins"); ReplaceDoppelgangerDropTable = config.Bind<bool>("Artifacts", "Relentless Doppelganger", @default.ReplaceDoppelgangerDropTable, "The Relentless Doppelganger from the Artifact of Vengeance will drop scrap instead of items"); ReplaceSacrificeArtifactDropTable = config.Bind<bool>("Artifacts", "Artifact of Sacrifice", @default.ReplaceSacrificeArtifactDropTable, "When using the Artifact of Sacrifice, mobs will drop scrap instead of items"); ReplaceSimulacrumOrbDropTable = config.Bind<bool>("Waves", "Simulacrum", @default.ReplaceSimulacrumOrbDropTable, "The orb reward after each wave of Simulacrum will drop scrap instead of items"); ReplaceVoidFieldsOrbDropTable = config.Bind<bool>("Waves", "Void Fields", @default.ReplaceVoidFieldsOrbDropTable, "The orb reward after each wave of the Void Fields will drop scrap instead of items"); ReplaceWhiteItems = config.Bind<bool>("Tiers", "White item", @default.ReplaceWhiteItems, "Replace white item drops with white scrap"); ReplaceGreenItems = config.Bind<bool>("Tiers", "Green item", @default.ReplaceGreenItems, "Replace green item drops with green scrap"); ReplaceRedItems = config.Bind<bool>("Tiers", "Red item", @default.ReplaceRedItems, "Replace red item drops with red scrap"); ReplaceYellowItems = config.Bind<bool>("Tiers", "Yellow item", @default.ReplaceYellowItems, "Replace yellow item drops with yellow scrap"); ReplaceBlueItems = config.Bind<bool>("Tiers", "Blue item", @default.ReplaceBlueItems, "Replace blue item drops with Beads of Fealty"); ReplaceVoidTier1Items = config.Bind<bool>("Tiers", "Void tier 1 item", @default.ReplaceVoidTier1Items, "Replace void tier 1 drops with white scrap"); ReplaceVoidTier2Items = config.Bind<bool>("Tiers", "Void tier 2 item", @default.ReplaceVoidTier2Items, "Replace void tier 2 drops with green scrap"); ReplaceVoidTier3Items = config.Bind<bool>("Tiers", "Void tier 3 item", @default.ReplaceVoidTier3Items, "Replace void tier 3 drops with red scrap"); _maxCompletedEclipseLevels = config.Bind<string>("Eclipse", "Max completed Eclipse levels", "Commando=0,Huntress=0,Bandit2=0,Toolbot=0,Engi=0,Mage=0,Merc=0,Treebot=0,Loader=0,Croco=0,Captain=0,Heretic=0,Railgunner=0,VoidSurvivor=0", "Max eclipse level per survivor reached with Scappy Chests enabled"); Preset.SettingChanged += OnPresetChanged; foreach (var allConfig in GetAllConfigs(ConfigPresets.Default)) { ConfigEntryBase item = allConfig.Config; item.AddSettingChanged(OnSettingChanged); } } public void InitUI(PluginInfo info) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Expected O, but got Unknown //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0237: 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_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Expected O, but got Unknown //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Expected O, but got Unknown //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Expected O, but got Unknown //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Expected O, but got Unknown //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Expected O, but got Unknown //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Expected O, but got Unknown //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Expected O, but got Unknown //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Expected O, but got Unknown //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Expected O, but got Unknown //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Expected O, but got Unknown //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Expected O, but got Unknown //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Expected O, but got Unknown //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Expected O, but got Unknown //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Expected O, but got Unknown //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Expected O, but got Unknown //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Expected O, but got Unknown //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Expected O, but got Unknown //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Expected O, but got Unknown //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Expected O, but got Unknown //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Expected O, but got Unknown //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Expected O, but got Unknown //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Expected O, but got Unknown //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Expected O, but got Unknown //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Expected O, but got Unknown //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Expected O, but got Unknown //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Expected O, but got Unknown //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Expected O, but got Unknown //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Expected O, but got Unknown ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ModEnabled)); ModSettingsManager.AddOption((BaseOption)(object)PresetChoiceOption); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceChestDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceMultiShopDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceAdaptiveChestDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceChanceShrineDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLegendaryChestDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidPotentialDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidCradleDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarPodDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarBudsDropTable)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(WhitePrinterSpawnMultiplier, new StepSliderConfig { min = 0f, max = 5f, increment = 0.05f, formatString = "{0:0.##}x" })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(GreenPrinterSpawnMultiplier, new StepSliderConfig { min = 0f, max = 5f, increment = 0.05f, formatString = "{0:0.##}x" })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(RedPrinterSpawnMultiplier, new StepSliderConfig { min = 0f, max = 5f, increment = 0.05f, formatString = "{0:0.##}x" })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(YellowPrinterSpawnMultiplier, new StepSliderConfig { min = 0f, max = 5f, increment = 0.05f, formatString = "{0:0.##}x" })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(MinimumStageForRedPrinters, new IntSliderConfig { min = 1, max = 10 })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddVoidItemsToPrinters)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddVoidPrintersToVoidSeeds)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(VoidSeedsPrinterWeight, new StepSliderConfig { min = 0f, max = 5f, increment = 0.025f, formatString = "{0:0.###}" })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterWhiteWeight, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterWhiteCreditCost, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterGreenWeight, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterGreenCreditCost, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterRedWeight, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(VoidSeedsPrinterRedCreditCost, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddVoidItemsToCauldrons)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddWhiteCauldronToBazaar)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddYellowCauldronToBazaar)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(AddYellowCauldronToMoon)); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(_yellowCauldronCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLockboxDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceEncrustedCacheDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceCrashedMultishopDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceBossHunterDropTable)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(SpeedItemSpawnMultiplier, new StepSliderConfig { min = 0f, max = 5f, increment = 0.05f, formatString = "{0:0.##}x" })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceBossDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceAWUDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceScavengerDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceElderLemurianDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarCoinDrops)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceNewtAltarsCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarSeerCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarPodCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceLunarBudCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceSlabCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceMageCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceFrogCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceShrineOfOrderCost)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceDoppelgangerDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceSacrificeArtifactDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceSimulacrumOrbDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidFieldsOrbDropTable)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceWhiteItems)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceGreenItems)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceRedItems)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceYellowItems)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceBlueItems)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidTier1Items)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidTier2Items)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(ReplaceVoidTier3Items)); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(_maxCompletedEclipseLevels)); ModSettingsManager.SetModIcon(LoadIconSprite()); Sprite LoadIconSprite() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(2, 2); ImageConversion.LoadImage(val, File.ReadAllBytes(Path.Combine(Path.GetDirectoryName(info.Location), "icon.png"))); return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0f, 0f)); } } private void OnSettingChanged(object sender, EventArgs e) { if (!_presetIsChanging) { _settingIsChanging = true; ConfigPresetMoniker currentPreset = GetCurrentPreset(); Preset.Value = currentPreset; _settingIsChanging = false; } } private IEnumerable<(ConfigEntryBase Config, object PresetValue)> GetAllConfigs(ConfigPreset preset) { yield return ((ConfigEntryBase)(object)ReplaceChestDropTable, preset.ReplaceChestDropTable); yield return ((ConfigEntryBase)(object)ReplaceMultiShopDropTable, preset.ReplaceMultiShopDropTable); yield return ((ConfigEntryBase)(object)ReplaceAdaptiveChestDropTable, preset.ReplaceAdaptiveChestDropTable); yield return ((ConfigEntryBase)(object)ReplaceChanceShrineDropTable, preset.ReplaceChanceShrineDropTable); yield return ((ConfigEntryBase)(object)ReplaceLegendaryChestDropTable, preset.ReplaceLegendaryChestDropTable); yield return ((ConfigEntryBase)(object)ReplaceVoidPotentialDropTable, preset.ReplaceVoidPotentialDropTable); yield return ((ConfigEntryBase)(object)ReplaceVoidCradleDropTable, preset.ReplaceVoidCradleDropTable); yield return ((ConfigEntryBase)(object)ReplaceLunarPodDropTable, preset.ReplaceLunarPodDropTable); yield return ((ConfigEntryBase)(object)ReplaceLunarBudsDropTable, preset.ReplaceLunarBudsDropTable); yield return ((ConfigEntryBase)(object)WhitePrinterSpawnMultiplier, preset.WhitePrinterSpawnMultiplier); yield return ((ConfigEntryBase)(object)GreenPrinterSpawnMultiplier, preset.GreenPrinterSpawnMultiplier); yield return ((ConfigEntryBase)(object)RedPrinterSpawnMultiplier, preset.RedPrinterSpawnMultiplier); yield return ((ConfigEntryBase)(object)YellowPrinterSpawnMultiplier, preset.YellowPrinterSpawnMultiplier); yield return ((ConfigEntryBase)(object)MinimumStageForRedPrinters, preset.MinimumStageForRedPrinters); yield return ((ConfigEntryBase)(object)AddVoidItemsToPrinters, preset.AddVoidItemsToPrinters); yield return ((ConfigEntryBase)(object)AddVoidPrintersToVoidSeeds, preset.AddVoidPrintersToVoidSeeds); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterWeight, preset.VoidSeedsPrinterWeight); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterWhiteWeight, preset.VoidSeedsPrinterWhiteWeight); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterWhiteCreditCost, preset.VoidSeedsPrinterWhiteCreditCost); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterGreenWeight, preset.VoidSeedsPrinterGreenWeight); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterGreenCreditCost, preset.VoidSeedsPrinterGreenCreditCost); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterRedWeight, preset.VoidSeedsPrinterRedWeight); yield return ((ConfigEntryBase)(object)VoidSeedsPrinterRedCreditCost, preset.VoidSeedsPrinterRedCreditCost); yield return ((ConfigEntryBase)(object)AddVoidItemsToCauldrons, preset.AddVoidItemsToCauldrons); yield return ((ConfigEntryBase)(object)AddWhiteCauldronToBazaar, preset.AddWhiteCauldronToBazaar); yield return ((ConfigEntryBase)(object)AddYellowCauldronToBazaar, preset.AddYellowCauldronToBazaar); yield return ((ConfigEntryBase)(object)AddYellowCauldronToMoon, preset.AddYellowCauldronToMoon); yield return ((ConfigEntryBase)(object)_yellowCauldronCost, preset.YellowCauldronCost); yield return ((ConfigEntryBase)(object)ReplaceLockboxDropTable, preset.ReplaceLockboxDropTable); yield return ((ConfigEntryBase)(object)ReplaceEncrustedCacheDropTable, preset.ReplaceEncrustedCacheDropTable); yield return ((ConfigEntryBase)(object)ReplaceCrashedMultishopDropTable, preset.ReplaceCrashedMultishopDropTable); yield return ((ConfigEntryBase)(object)ReplaceBossHunterDropTable, preset.ReplaceBossHunterDropTable); yield return ((ConfigEntryBase)(object)SpeedItemSpawnMultiplier, preset.SpeedItemSpawnMultiplier); yield return ((ConfigEntryBase)(object)ReplaceBossDropTable, preset.ReplaceBossDropTable); yield return ((ConfigEntryBase)(object)ReplaceAWUDropTable, preset.ReplaceAWUDropTable); yield return ((ConfigEntryBase)(object)ReplaceScavengerDropTable, preset.ReplaceScavengerDropTable); yield return ((ConfigEntryBase)(object)ReplaceElderLemurianDropTable, preset.ReplaceElderLemurianDropTable); yield return ((ConfigEntryBase)(object)ReplaceLunarCoinDrops, preset.ReplaceLunarCoinDrops); yield return ((ConfigEntryBase)(object)ReplaceNewtAltarsCost, preset.ReplaceNewtAltarsCost); yield return ((ConfigEntryBase)(object)ReplaceLunarSeerCost, preset.ReplaceLunarSeerCost); yield return ((ConfigEntryBase)(object)ReplaceLunarPodCost, preset.ReplaceLunarPodCost); yield return ((ConfigEntryBase)(object)ReplaceLunarBudCost, preset.ReplaceLunarBudCost); yield return ((ConfigEntryBase)(object)ReplaceSlabCost, preset.ReplaceSlabCost); yield return ((ConfigEntryBase)(object)ReplaceMageCost, preset.ReplaceMageCost); yield return ((ConfigEntryBase)(object)ReplaceFrogCost, preset.ReplaceFrogCost); yield return ((ConfigEntryBase)(object)ReplaceShrineOfOrderCost, preset.ReplaceShrineOfOrderCost); yield return ((ConfigEntryBase)(object)ReplaceDoppelgangerDropTable, preset.ReplaceDoppelgangerDropTable); yield return ((ConfigEntryBase)(object)ReplaceSacrificeArtifactDropTable, preset.ReplaceSacrificeArtifactDropTable); yield return ((ConfigEntryBase)(object)ReplaceSimulacrumOrbDropTable, preset.ReplaceSimulacrumOrbDropTable); yield return ((ConfigEntryBase)(object)ReplaceVoidFieldsOrbDropTable, preset.ReplaceVoidFieldsOrbDropTable); yield return ((ConfigEntryBase)(object)ReplaceWhiteItems, preset.ReplaceWhiteItems); yield return ((ConfigEntryBase)(object)ReplaceGreenItems, preset.ReplaceGreenItems); yield return ((ConfigEntryBase)(object)ReplaceRedItems, preset.ReplaceRedItems); yield return ((ConfigEntryBase)(object)ReplaceYellowItems, preset.ReplaceYellowItems); yield return ((ConfigEntryBase)(object)ReplaceBlueItems, preset.ReplaceBlueItems); yield return ((ConfigEntryBase)(object)ReplaceVoidTier1Items, preset.ReplaceVoidTier1Items); yield return ((ConfigEntryBase)(object)ReplaceVoidTier2Items, preset.ReplaceVoidTier2Items); yield return ((ConfigEntryBase)(object)ReplaceVoidTier3Items, preset.ReplaceVoidTier3Items); } public ConfigPresetMoniker GetCurrentPreset() { ConfigPreset[] all = ConfigPresets.All; foreach (ConfigPreset configPreset in all) { if (GetAllConfigs(configPreset).All(((ConfigEntryBase Config, object PresetValue) x) => EqualityComparer<object>.Default.Equals(x.Config.BoxedValue, x.PresetValue))) { return configPreset.Moniker; } } return ConfigPresetMoniker.Custom; } private void OnPresetChanged(object sender, EventArgs e) { if (Preset.Value == ConfigPresetMoniker.Custom) { PresetChoiceOption.UpdateDescription(ConfigPresetDescriptions.Custom, !_settingIsChanging); return; } ConfigPreset configPreset = ConfigPresets.All.First((ConfigPreset x) => x.Moniker == Preset.Value); PresetChoiceOption.UpdateDescription(configPreset.Description, !_settingIsChanging); _presetIsChanging = true; foreach (var (val, boxedValue) in GetAllConfigs(configPreset)) { val.BoxedValue = boxedValue; } _presetIsChanging = false; } } public class PresetChoiceOption : ChoiceOption { private DropDownController _dropdownController; public PresetChoiceOption(ConfigEntryBase configEntry) : base(configEntry, new ChoiceConfig { description = GetCurrentDescription(configEntry.BoxedValue) }) { }//IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown public override GameObject CreateOptionGameObject(GameObject prefab, Transform parent) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown GameObject val = ((ChoiceOption)this).CreateOptionGameObject(prefab, parent); _dropdownController = val.GetComponentInChildren<DropDownController>(); ((MPButton)val.GetComponentInChildren<HGButton>()).onSelect.AddListener((UnityAction)delegate { string currentDescription = GetCurrentDescription(((ChoiceOption)this).Value); UpdateDescription(currentDescription, updateDescriptionPanel: true); }); return val; } private static string GetCurrentDescription(object value) { ConfigPresetMoniker moniker = (ConfigPresetMoniker)value; return ConfigPresets.All.Where((ConfigPreset x) => x.Moniker == moniker).FirstOrDefault()?.Description ?? ConfigPresetDescriptions.Custom; } public void UpdateDescription(string description, bool updateDescriptionPanel) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) ((BaseOption)this).SetDescription(description, new BaseOptionConfig()); if (updateDescriptionPanel) { ((TMP_Text)((ModOptionsPanelPrefab)typeof(ModOptionPanelController).GetField("_panel", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(((ModSetting)_dropdownController).optionController)).ModOptionsDescriptionPanel.GetComponentInChildren<HGTextMeshProUGUI>()).SetText(description, true); } } } public class Disposable : IDisposable { private readonly Action _dispose; public static Disposable Empty { get; } = new Disposable(delegate { }); public Disposable(Action dispose) { _dispose = dispose; } public void Dispose() { _dispose(); } } public class CompositeDisposable : IDisposable { private readonly List<IDisposable> _disposables; public CompositeDisposable() { _disposables = new List<IDisposable>(); } public void Add(IDisposable disposable) { _disposables.Add(disposable); } public void AddRange(IEnumerable<IDisposable> disposables) { _disposables.AddRange(disposables); } public void Dispose() { foreach (IDisposable disposable in _disposables) { disposable.Dispose(); } } } public static class DropTableHelpers { public static IDisposable ReplaceDropTable(this PickupDropTable dropTable, string caller) { BasicPickupDropTable basicDropTable = default(BasicPickupDropTable); ref BasicPickupDropTable reference = ref basicDropTable; PickupDropTable obj = dropTable; reference = (BasicPickupDropTable)(object)((obj is BasicPickupDropTable) ? obj : null); if (basicDropTable != null) { IDisposable result = CreateSelectorCopy(basicDropTable.selector, delegate(WeightedSelection<PickupIndex> x) { basicDropTable.selector = x; }); ReplaceDropTableSelector(basicDropTable.selector); return result; } ExplicitPickupDropTable explicitDropTable = default(ExplicitPickupDropTable); ref ExplicitPickupDropTable reference2 = ref explicitDropTable; PickupDropTable obj2 = dropTable; reference2 = (ExplicitPickupDropTable)(object)((obj2 is ExplicitPickupDropTable) ? obj2 : null); if (explicitDropTable != null) { IDisposable result2 = CreateSelectorCopy(explicitDropTable.weightedSelection, delegate(WeightedSelection<PickupIndex> x) { explicitDropTable.weightedSelection = x; }); ReplaceDropTableSelector(explicitDropTable.weightedSelection); return result2; } FreeChestDropTable freeChestDropTable = default(FreeChestDropTable); ref FreeChestDropTable reference3 = ref freeChestDropTable; PickupDropTable obj3 = dropTable; reference3 = (FreeChestDropTable)(object)((obj3 is FreeChestDropTable) ? obj3 : null); if (freeChestDropTable != null) { IDisposable result3 = CreateSelectorCopy(freeChestDropTable.selector, delegate(WeightedSelection<PickupIndex> x) { freeChestDropTable.selector = x; }); ReplaceDropTableSelector(freeChestDropTable.selector); return result3; } DoppelgangerDropTable doppelgangerDropTable = default(DoppelgangerDropTable); ref DoppelgangerDropTable reference4 = ref doppelgangerDropTable; PickupDropTable obj4 = dropTable; reference4 = (DoppelgangerDropTable)(object)((obj4 is DoppelgangerDropTable) ? obj4 : null); if (doppelgangerDropTable != null) { IDisposable result4 = CreateSelectorCopy(doppelgangerDropTable.selector, delegate(WeightedSelection<PickupIndex> x) { doppelgangerDropTable.selector = x; }); ReplaceDropTableSelector(doppelgangerDropTable.selector); return result4; } ArenaMonsterItemDropTable arenaMonsterItemDropTable = default(ArenaMonsterItemDropTable); ref ArenaMonsterItemDropTable reference5 = ref arenaMonsterItemDropTable; PickupDropTable obj5 = dropTable; reference5 = (ArenaMonsterItemDropTable)(object)((obj5 is ArenaMonsterItemDropTable) ? obj5 : null); if (arenaMonsterItemDropTable != null) { IDisposable result5 = CreateSelectorCopy(arenaMonsterItemDropTable.selector, delegate(WeightedSelection<PickupIndex> x) { arenaMonsterItemDropTable.selector = x; }); ReplaceDropTableSelector(arenaMonsterItemDropTable.selector); return result5; } Log.Warning("Failed to override " + caller + " dropTable"); Log.Warning(caller + " dropTable is of type " + (((object)dropTable)?.GetType().FullName ?? "null")); return Disposable.Empty; void ReplaceDropTableSelector(WeightedSelection<PickupIndex> selector) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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_0051: Expected I4, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected I4, but got Unknown //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < selector.Count; i++) { ref ChoiceInfo<PickupIndex> reference6 = ref selector.choices[i]; ItemTier itemTier = ((PickupIndex)(ref reference6.value)).pickupDef.itemTier; if ((int)itemTier switch { 0 => Configuration.Instance.ReplaceWhiteItems.Value, 1 => Configuration.Instance.ReplaceGreenItems.Value, 2 => Configuration.Instance.ReplaceRedItems.Value, 4 => Configuration.Instance.ReplaceYellowItems.Value, 3 => Configuration.Instance.ReplaceBlueItems.Value, 6 => Configuration.Instance.ReplaceVoidTier1Items.Value, 7 => Configuration.Instance.ReplaceVoidTier2Items.Value, 8 => Configuration.Instance.ReplaceVoidTier3Items.Value, _ => false, }) { itemTier = ((PickupIndex)(ref reference6.value)).pickupDef.itemTier; string text = (int)itemTier switch { 0 => "ItemIndex.ScrapWhite", 1 => "ItemIndex.ScrapGreen", 2 => "ItemIndex.ScrapRed", 4 => "ItemIndex.ScrapYellow", 3 => "ItemIndex.LunarTrinket", 6 => "ItemIndex.ScrapWhite", 7 => "ItemIndex.ScrapGreen", 8 => "ItemIndex.ScrapRed", _ => throw new Exception("Unreachable"), }; if (text != null) { reference6.value = PickupCatalog.FindPickupIndex(text); } } } UpdateSpeedItemsSpawnRate(selector); Log.Debug(caller + " " + ((object)dropTable).GetType().Name + " (" + ((Object)dropTable).name + ") replaced"); } } public static void UpdateSpeedItemsSpawnRate(WeightedSelection<PickupIndex> selector) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0189: 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_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) if (Configuration.Instance.SpeedItemSpawnMultiplier.Value == 1f) { return; } (ItemIndex, float)[] source = new(ItemIndex, float)[14] { (Items.Hoof.itemIndex, 1f), (Items.SprintBonus.itemIndex, 1f), (Items.AttackSpeedAndMoveSpeed.itemIndex, 1f), (Items.SprintOutOfCombat.itemIndex, 1f), (Items.JumpBoost.itemIndex, 1f), (Items.MoveSpeedOnKill.itemIndex, 1f), (Items.WardOnLevel.itemIndex, 0.33f), (Items.WarCryOnMultiKill.itemIndex, 0.33f), (Items.LunarBadLuck.itemIndex, 0.33f), (Items.AlienHead.itemIndex, 0.33f), (Items.UtilitySkillMagazine.itemIndex, 0.33f), (Items.HalfAttackSpeedHalfCooldowns.itemIndex, 0.33f), (Items.Phasing.itemIndex, 0.25f), (Items.Bandolier.itemIndex, 0.25f) }; (EquipmentIndex, float)[] source2 = new(EquipmentIndex, float)[5] { (Equipment.TeamWarCry.equipmentIndex, 0.5f), (Equipment.Gateway.equipmentIndex, 0.5f), (Equipment.Jetpack.equipmentIndex, 0.5f), (Equipment.FireBallDash.equipmentIndex, 0.5f), (Equipment.Tonic.equipmentIndex, 0.5f) }; for (int i = 0; i < selector.choices.Length; i++) { ref ChoiceInfo<PickupIndex> reference = ref selector.choices[i]; PickupDef pickupDef = ((PickupIndex)(ref reference.value)).pickupDef; float num = (from x in source where x.Item == pickupDef.itemIndex select x.Weigth).Concat(from x in source2 where x.Equipement == pickupDef.equipmentIndex select x.Weigth).FirstOrDefault(); if (num > 0f) { float weight = reference.weight; selector.ModifyChoiceWeight(i, reference.weight + reference.weight * (Configuration.Instance.SpeedItemSpawnMultiplier.Value - 1f) * num); Log.Debug($"{((PickupIndex)(ref reference.value)).pickupDef.nameToken} weight changed from {weight} to {reference.weight}"); } } } public static IDisposable CreateSelectorCopy(WeightedSelection<PickupIndex> selector, Action<WeightedSelection<PickupIndex>> setSelector) { WeightedSelection<PickupIndex> oldSelector = selector; setSelector(new WeightedSelection<PickupIndex>(8) { Capacity = selector.Capacity, choices = selector.choices.ToArray(), totalWeight = selector.totalWeight, Count = selector.Count }); return new Disposable(delegate { setSelector(oldSelector); }); } } public static class ArtifactHooks { [CompilerGenerated] private static class <>O { public static hook_GenerateDropPreReplacement <0>__DoppelgangerDropTable_GenerateDropPreReplacement; public static hook_OnServerCharacterDeath <1>__SacrificeArtifactManager_OnServerCharacterDeath; } public static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown object obj = <>O.<0>__DoppelgangerDropTable_GenerateDropPreReplacement; if (obj == null) { hook_GenerateDropPreReplacement val = DoppelgangerDropTable_GenerateDropPreReplacement; <>O.<0>__DoppelgangerDropTable_GenerateDropPreReplacement = val; obj = (object)val; } DoppelgangerDropTable.GenerateDropPreReplacement += (hook_GenerateDropPreReplacement)obj; object obj2 = <>O.<1>__SacrificeArtifactManager_OnServerCharacterDeath; if (obj2 == null) { hook_OnServerCharacterDeath val2 = SacrificeArtifactManager_OnServerCharacterDeath; <>O.<1>__SacrificeArtifactManager_OnServerCharacterDeath = val2; obj2 = (object)val2; } SacrificeArtifactManager.OnServerCharacterDeath += (hook_OnServerCharacterDeath)obj2; } private static PickupIndex DoppelgangerDropTable_GenerateDropPreReplacement(orig_GenerateDropPreReplacement orig, DoppelgangerDropTable self, Xoroshiro128Plus rng) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (Configuration.Instance.ModEnabled.Value && Configuration.Instance.ReplaceDoppelgangerDropTable.Value) { using (((PickupDropTable)(object)self).ReplaceDropTable("DoppelgangerDropTable_GenerateDropPreReplacement")) { return orig.Invoke(self, rng); } } return orig.Invoke(self, rng); } private static void SacrificeArtifactManager_OnServerCharacterDeath(orig_OnServerCharacterDeath orig, DamageReport damageReport) { if (Configuration.Instance.ModEnabled.Value && Configuration.Instance.ReplaceSacrificeArtifactDropTable.Value) { using (SacrificeArtifactManager.dropTable.ReplaceDropTable("SacrificeArtifactManager_OnServerCharacterDeath")) { orig.Invoke(damageReport); return; } } orig.Invoke(damageReport); } } public static class CauldronHooks { [CompilerGenerated] private static class <>O { public static UnityAction<Scene, LoadSceneMode> <0>__SceneManager_sceneLoaded; public static hook_GetCostTypeDef <1>__CostTypeCatalog_GetCostTypeDef; public static hook_Awake <2>__SceneObjectToggleGroup_Awake; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static BuildCostStringDelegate <>9__2_0; public static IsAffordableDelegate <>9__2_1; public static PayCostDelegate <>9__2_2; internal void <Init>b__2_0(CostTypeDef def, BuildCostStringContext context) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) (int White, int Green, int Red, int Yellow) yellowCauldronCost = Configuration.Instance.YellowCauldronCost; <>c__DisplayClass2_0 <>c__DisplayClass2_ = default(<>c__DisplayClass2_0); <>c__DisplayClass2_.costParts = new List<string>(); <Init>g__AppendCost|2_3(yellowCauldronCost.White, "white", ref <>c__DisplayClass2_); <Init>g__AppendCost|2_3(yellowCauldronCost.Green, "green", ref <>c__DisplayClass2_); <Init>g__AppendCost|2_3(yellowCauldronCost.Red, "red", ref <>c__DisplayClass2_); <Init>g__AppendCost|2_3(yellowCauldronCost.Yellow, "yellow", ref <>c__DisplayClass2_); if (<>c__DisplayClass2_.costParts.Count == 0) { context.stringBuilder.Append("free"); } else { context.stringBuilder.Append(string.Join(", ", <>c__DisplayClass2_.costParts)); } } internal bool <Init>b__2_1(CostTypeDef costTypeDef, IsAffordableContext context) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_1 <>c__DisplayClass2_ = default(<>c__DisplayClass2_1); <>c__DisplayClass2_.component = ((Component)context.activator).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)<>c__DisplayClass2_.component) && Object.op_Implicit((Object)(object)<>c__DisplayClass2_.component.inventory)) { (int, int, int, int) yellowCauldronCost = Configuration.Instance.YellowCauldronCost; if (<Init>g__HasAtLeastXTotalItemsOfTier|2_4((ItemTier)0, yellowCauldronCost.Item1, ref <>c__DisplayClass2_) && <Init>g__HasAtLeastXTotalItemsOfTier|2_4((ItemTier)1, yellowCauldronCost.Item2, ref <>c__DisplayClass2_) && <Init>g__HasAtLeastXTotalItemsOfTier|2_4((ItemTier)2, yellowCauldronCost.Item3, ref <>c__DisplayClass2_)) { return <Init>g__HasAtLeastXTotalItemsOfTier|2_4((ItemTier)4, yellowCauldronCost.Item4, ref <>c__DisplayClass2_); } return false; } return false; } internal void <Init>b__2_2(CostTypeDef costTypeDef, PayCostContext context) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) <>c__DisplayClass2_2 <>c__DisplayClass2_ = default(<>c__DisplayClass2_2); <>c__DisplayClass2_.context = context; (int, int, int, int) yellowCauldronCost = Configuration.Instance.YellowCauldronCost; <Init>g__PayCost|2_5((CostTypeIndex)4, yellowCauldronCost.Item1, ref <>c__DisplayClass2_); <Init>g__PayCost|2_5((CostTypeIndex)5, yellowCauldronCost.Item2, ref <>c__DisplayClass2_); <Init>g__PayCost|2_5((CostTypeIndex)6, yellowCauldronCost.Item3, ref <>c__DisplayClass2_); <Init>g__PayCost|2_5((CostTypeIndex)10, yellowCauldronCost.Item4, ref <>c__DisplayClass2_); <>c__DisplayClass2_.context.cost = yellowCauldronCost.Item1 + yellowCauldronCost.Item2 + yellowCauldronCost.Item3 + yellowCauldronCost.Item4; } } [StructLayout(LayoutKind.Auto)] [CompilerGenerated] private struct <>c__DisplayClass2_0 { public List<string> costParts; } [StructLayout(LayoutKind.Auto)] [CompilerGenerated] private struct <>c__DisplayClass2_1 { public CharacterBody component; } [StructLayout(LayoutKind.Auto)] [CompilerGenerated] private struct <>c__DisplayClass2_2 { public PayCostContext context; } private static readonly CostTypeIndex _yellowSoupCostIndex = (CostTypeIndex)81273; private static CostTypeDef _yellowSoupCostTypeDef; public static void Init() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0095: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_00c1: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown SceneManager.sceneLoaded += SceneManager_sceneLoaded; object obj = <>O.<1>__CostTypeCatalog_GetCostTypeDef; if (obj == null) { hook_GetCostTypeDef val = CostTypeCatalog_GetCostTypeDef; <>O.<1>__CostTypeCatalog_GetCostTypeDef = val; obj = (object)val; } CostTypeCatalog.GetCostTypeDef += (hook_GetCostTypeDef)obj; object obj2 = <>O.<2>__SceneObjectToggleGroup_Awake; if (obj2 == null) { hook_Awake val2 = SceneObjectToggleGroup_Awake; <>O.<2>__SceneObjectToggleGroup_Awake = val2; obj2 = (object)val2; } SceneObjectToggleGroup.Awake += (hook_Awake)obj2; CostTypeDef val3 = new CostTypeDef { costStringFormatToken = "COST_ITEM_FORMAT" }; object obj3 = <>c.<>9__2_0; if (obj3 == null) { BuildCostStringDelegate val4 = delegate(CostTypeDef def, BuildCostStringContext context) { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) (int White, int Green, int Red, int Yellow) yellowCauldronCost3 = Configuration.Instance.YellowCauldronCost; List<string> costParts = new List<string>(); AppendCost(yellowCauldronCost3.White, "white"); AppendCost(yellowCauldronCost3.Green, "green"); AppendCost(yellowCauldronCost3.Red, "red"); AppendCost(yellowCauldronCost3.Yellow, "yellow"); if (costParts.Count == 0) { context.stringBuilder.Append("free"); } else { context.stringBuilder.Append(string.Join(", ", costParts)); } void AppendCost(int count, string tier) { if (count > 0) { string arg = ((count > 1) ? "s" : ""); costParts.Add($"{count} {tier}{arg}"); } } }; <>c.<>9__2_0 = val4; obj3 = (object)val4; } val3.buildCostString = (BuildCostStringDelegate)obj3; val3.saturateWorldStyledCostString = true; object obj4 = <>c.<>9__2_1; if (obj4 == null) { IsAffordableDelegate val5 = delegate(CostTypeDef costTypeDef, IsAffordableContext context) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) CharacterBody component = ((Component)context.activator).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { (int, int, int, int) yellowCauldronCost2 = Configuration.Instance.YellowCauldronCost; if (HasAtLeastXTotalItemsOfTier((ItemTier)0, yellowCauldronCost2.Item1) && HasAtLeastXTotalItemsOfTier((ItemTier)1, yellowCauldronCost2.Item2) && HasAtLeastXTotalItemsOfTier((ItemTier)2, yellowCauldronCost2.Item3)) { return HasAtLeastXTotalItemsOfTier((ItemTier)4, yellowCauldronCost2.Item4); } return false; } return false; bool HasAtLeastXTotalItemsOfTier(ItemTier itemTier, int x) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (x == 0) { return true; } return component.inventory.HasAtLeastXTotalItemsOfTier(itemTier, x); } }; <>c.<>9__2_1 = val5; obj4 = (object)val5; } val3.isAffordable = (IsAffordableDelegate)obj4; object obj5 = <>c.<>9__2_2; if (obj5 == null) { PayCostDelegate val6 = delegate(CostTypeDef costTypeDef, PayCostContext context) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) (int, int, int, int) yellowCauldronCost = Configuration.Instance.YellowCauldronCost; PayCost((CostTypeIndex)4, yellowCauldronCost.Item1); PayCost((CostTypeIndex)5, yellowCauldronCost.Item2); PayCost((CostTypeIndex)6, yellowCauldronCost.Item3); PayCost((CostTypeIndex)10, yellowCauldronCost.Item4); context.cost = yellowCauldronCost.Item1 + yellowCauldronCost.Item2 + yellowCauldronCost.Item3 + yellowCauldronCost.Item4; void PayCost(CostTypeIndex costTypeIndex, int cost) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (cost != 0) { context.cost = cost; CostTypeDef costTypeDef2 = CostTypeCatalog.GetCostTypeDef(costTypeIndex); costTypeDef2.payCost.Invoke(costTypeDef2, context); } } }; <>c.<>9__2_2 = val6; obj5 = (object)val6; } val3.payCost = (PayCostDelegate)obj5; val3.colorIndex = (ColorIndex)13; val3.itemTier = (ItemTier)4; _yellowSoupCostTypeDef = val3; } private static CostTypeDef CostTypeCatalog_GetCostTypeDef(orig_GetCostTypeDef orig, CostTypeIndex costTypeIndex) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (costTypeIndex == _yellowSoupCostIndex) { return _yellowSoupCostTypeDef; } return orig.Invoke(costTypeIndex); } private static void SceneManager_sceneLoaded(Scene scene, LoadSceneMode loadSceneMode) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (!Configuration.Instance.ModEnabled.Value) { return; } Scene activeScene = SceneManager.GetActiveScene(); if (!(((Scene)(ref activeScene)).name != "bazaar")) { if (Configuration.Instance.AddWhiteCauldronToBazaar.Value) { GameObject obj = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarCauldrons/LunarCauldron, RedToWhite Variant.prefab").WaitForCompletion()); obj.transform.position = new Vector3(-95.98551f, -24.7408f, -43.01519f); obj.transform.rotation = Quaternion.Euler(0f, -45f, 0f); NetworkServer.Spawn(obj); } if (Configuration.Instance.AddYellowCauldronToBazaar.Value) { NetworkServer.Spawn(CreateYellowSoup(new Vector3(-103.5473f, -25.05961f, -40.06012f), Quaternion.Euler(0f, -10f, 0f))); } } } private static void SceneObjectToggleGroup_Awake(orig_Awake orig, SceneObjectToggleGroup self) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) if (Configuration.Instance.ModEnabled.Value && Configuration.Instance.AddYellowCauldronToMoon.Value) { Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "moon2") { self.toggleGroups = CollectionExtensions.AddToArray<GameObjectToggleGroup>(self.toggleGroups, new GameObjectToggleGroup { objects = (GameObject[])(object)new GameObject[3] { CreateYellowSoup(new Vector3(-175.1659f, -190.8372f, -348.236f), Quaternion.Euler(0f, 180f, 0f)), CreateYellowSoup(new Vector3(-211.1335f, -142.8229f, -327.5427f), Quaternion.Euler(0f, 45f, 0f)), CreateYellowSoup(new Vector3(-280.2209f, -189.0418f, -324.9852f), Quaternion.Euler(0f, 0f, 0f)) }, minEnabled = 0, maxEnabled = 2 }); } } orig.Invoke(self); } private static GameObject CreateYellowSoup(Vector3 position, Quaternion rotation) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = Object.Instantiate<GameObject>(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/LunarCauldrons/LunarCauldron, WhiteToGreen.prefab").WaitForCompletion()); obj.transform.position = position; obj.transform.rotation = rotation; PurchaseInteraction component = obj.GetComponent<PurchaseInteraction>(); component.costType = _yellowSoupCostIndex; (int, int, int, int) yellowCauldronCost = Configuration.Instance.YellowCauldronCost; component.cost = yellowCauldronCost.Item1 + yellowCauldronCost.Item2 + yellowCauldronCost.Item3 + yellowCauldronCost.Item4; ShopTerminalBehavior component2 = obj.GetComponent<ShopTerminalBehavior>(); component2.dropTable = (PickupDropTable)(object)Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/DuplicatorWild/dtDuplicatorWild.asset").WaitForCompletion(); component2.itemTier = (ItemTier)4; return obj; } [CompilerGenerated] internal static void <Init>g__AppendCost|2_3(int count, string tier, ref <>c__DisplayClass2_0 P_2) { if (count > 0) { string arg = ((count > 1) ? "s" : ""); P_2.costParts.Add($"{count} {tier}{arg}"); } } [CompilerGenerated] internal static bool <Init>g__HasAtLeastXTotalItemsOfTier|2_4(ItemTier itemTier, int x, ref <>c__DisplayClass2_1 P_2) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (x == 0) { return true; } return P_2.component.inventory.HasAtLeastXTotalItemsOfTier(itemTier, x); } [CompilerGenerated] internal static void <Init>g__PayCost|2_5(CostTypeIndex costTypeIndex, int cost, ref <>c__DisplayClass2_2 P_2) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (cost != 0) { P_2.context.cost = cost; CostTypeDef costTypeDef = CostTypeCatalog.GetCostTypeDef(costTypeIndex); costTypeDef.payCost.Invoke(costTypeDef, P_2.context); } } } public static class ChestHooks { [CompilerGenerated] private static class <>O { public static hook_Roll <0>__ChestBehavior_Roll; public static hook_GenerateNewPickupServer_bool <1>__ShopTerminalBehavior_GenerateNewPickupServer_bool; public static hook_GenerateEntriesServer <2>__RouletteChestController_GenerateEntriesServer; public static hook_AddShrineStack <3>__ShrineChanceBehavior_AddShrineStack; public static hook_GenerateDropPreReplacement <4>__FreeChestDropTable_GenerateDropPreReplacement; public static hook_Roll <5>__OptionChestBehavior_Roll; } public static void Init() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //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_00bb: Expected O, but got Unknown object obj = <>O.<0>__ChestBehavior_Roll; if (obj == null) { hook_Roll val = ChestBehavior_Roll; <>O.<0>__ChestBehavior_Roll = val; obj = (object)val; } ChestBehavior.Roll += (hook_Roll)obj; object obj2 = <>O.<1>__ShopTerminalBehavior_GenerateNewPickupServer_bool; if (obj2 == null) { hook_GenerateNewPickupServer_bool val2 = ShopTerminalBehavior_GenerateNewPickupServer_bool; <>O.<1>__ShopTerminalBehavior_GenerateNewPickupServer_bool = val2; obj2 = (object)val2; } ShopTerminalBehavior.GenerateNewPickupServer_bool += (hook_GenerateNewPickupServer_bool)obj2; object obj3 = <>O.<2>__RouletteChestController_GenerateEntriesServer; if (obj3 == null) { hook_GenerateEntriesServer val3 = RouletteChestController_GenerateEntriesServer; <>O.<2>__RouletteChestController_GenerateEntriesServer = val3; obj3 = (object)val3; } RouletteChestController.GenerateEntriesServer += (hook_GenerateEntriesServer)obj3; object obj4 = <>O.<3>__ShrineChanceBehavior_AddShrineStack; if (obj4 == null) { hook_AddShrineStack val4 = ShrineChanceBehavior_AddShrineStack; <>O.<3>__ShrineChanceBehavior_AddShrineStack = val4; obj4 = (object)val4; } ShrineChanceBehavior.AddShrineStack += (hook_AddShrineStack)obj4; object obj5 = <>O.<4>__FreeChestDropTable_GenerateDropPreReplacement; if (obj5 == null) { hook_GenerateDropPreReplacement val5 = FreeChestDropTable_GenerateDropPreReplacement; <>O.<4>__FreeChestDropTable_GenerateDropPreReplacement = val5; obj5 = (object)val5; } FreeChestDropTable.GenerateDropPreReplacement += (hook_GenerateDropPreReplacement)obj5; object obj6 = <>O.<5>__OptionChestBehavior_Roll; if (obj6 == null) { hook_Roll val6 = OptionChestBehavior_Roll; <>O.<5>__OptionChestBehavior_Roll = val6; obj6 = (object)val6; } OptionChestBehavior.Roll += (hook_Roll)obj6; } private static void ChestBehavior_Roll(orig_Roll orig, ChestBehavior self) { if (Configuration.Instance.ModEnabled.Value && Object.op_Implicit((Object)(object)self.dropTable)) { if (((Object)self.dropTable).name == "dtGoldChest") { if (Configuration.Instance.ReplaceLegendaryChestDropTable.Value) { using (self.dropTable.ReplaceDropTable("ChestBehavior_Roll")) { orig.Invoke(self); return; } } } else if (((Object)self.dropTable).name == "dtLockbox") { if (Configuration.Instance.ReplaceLockboxDropTable.Value) { using (self.dropTable.ReplaceDropTable("ChestBehavior_Roll")) { orig.Invoke(self); return; } } } else if (((Object)self.dropTable).name == "dtLunarChest") { if (Configuration.Instance.ReplaceLunarPodDropTable.Value) { using (self.dropTable.ReplaceDropTable("ChestBehavior_Roll")) { orig.Invoke(self); return; } } } else if (((Object)self.dropTable).name == "dtVoidChest") { if (Configuration.Instance.ReplaceVoidCradleDropTable.Value) { using (self.dropTable.ReplaceDropTable("ChestBehavior_Roll")) { orig.Invoke(self); return; } } } else if (Configuration.Instance.ReplaceChestDropTable.Value) { using (self.dropTable.ReplaceDropTable("ChestBehavior_Roll")) { orig.Invoke(self); return; } } } orig.Invoke(self); } private static void ShopTerminalBehavior_GenerateNewPickupServer_bool(orig_GenerateNewPickupServer_bool orig, ShopTerminalBehavior self, bool newHidden) { //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown if (Configuration.Instance.ModEnabled.Value) { if ((Object)(object)self.serverMultiShopController == (Object)null) { if (Configuration.Instance.ReplaceLunarBudsDropTable.Value && ((Object)self.dropTable).name == "dtLunarChest") { using (self.dropTable.ReplaceDropTable("ShopTerminalBehavior_GenerateNewPickupServer_bool")) { orig.Invoke(self, newHidden); return; } } bool flag = Configuration.Instance.AddVoidItemsToPrinters.Value && ((Object)self.dropTable).name.StartsWith("dtDuplicator"); if (!flag) { bool flag2 = Configuration.Instance.AddVoidItemsToCauldrons.Value; if (flag2) { bool flag3; switch (((Object)self.dropTable).name) { case "dtTier1Item": case "dtTier2Item": case "dtTier3Item": flag3 = true; break; default: flag3 = false; break; } flag2 = flag3; } flag = flag2; } if (flag || ((Object)self).name == "VoidShopTerminal") { BasicPickupDropTable basicDropTable = (BasicPickupDropTable)self.dropTable; using (DropTableHelpers.CreateSelectorCopy(basicDropTable.selector, delegate(WeightedSelection<PickupIndex> x) { basicDropTable.selector = x; })) { if (((Object)self).name == "VoidShopTerminal") { basicDropTable.selector.Clear(); } basicDropTable.Add(Run.instance.availableVoidTier1DropList, basicDropTable.tier1Weight); basicDropTable.Add(Run.instance.availableVoidTier2DropList, basicDropTable.tier2Weight); basicDropTable.Add(Run.instance.availableVoidTier3DropList, basicDropTable.tier3Weight); basicDropTable.Add(Run.instance.availableVoidBossDropList, basicDropTable.bossWeight); DropTableHelpers.UpdateSpeedItemsSpawnRate(basicDropTable.selector); Log.Debug("ShopTerminalBehavior_GenerateNewPickupServer_bool " + ((object)basicDropTable).GetType().Name + " replaced"); orig.Invoke(self, newHidden); return; } } } else if (Configuration.Instance.ReplaceMultiShopDropTable.Value) { using (self.dropTable.ReplaceDropTable("ShopTerminalBehavior_GenerateNewPickupServer_bool")) { orig.Invoke(self, newHidden); return; } } } orig.Invoke(self, newHidden); } private static void RouletteChestController_GenerateEntriesSer