using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Realtime; using UnityEngine; using Zorro.Core; using pworld.Scripts.Extensions; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RSMind.FoodRandomizer")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.3.0")] [assembly: AssemblyInformationalVersion("1.0.3+e6fb64af38d5a0a6fd0ae5976c974e25ab102bf4")] [assembly: AssemblyProduct("RSMind.FoodRandomizer")] [assembly: AssemblyTitle("FoodRandomizer")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.3.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace FoodRandomizer { [BepInPlugin("RSMind.FoodRandomizer", "FoodRandomizer", "1.0.3")] public class Plugin : BaseUnityPlugin, IInRoomCallbacks { public enum BerryShuffleModes { ShuffleInType, ShuffleAll, RandomByType, Chaos, Off } public enum MushroomShuffleModes { ShuffleInType, ShuffleAll, RandomPaired, Chaos, Off } public enum ShroomberryModes { Vanilla, RandomBalanced, RandomMinimal, Chaos } public const string PROPKEY_SHUFFLE_SEED = "food_shuffle_seed"; public static ConfigEntry BerryMode = null; public static ConfigEntry MushroomMode = null; public static ConfigEntry ShroomberryMode = null; public static ConfigEntry mushroomMinHunger = null; public static ConfigEntry mushroomMaxHunger = null; public static ConfigEntry mushroomPoisonChance = null; public static ConfigEntry mushroomMinPoisonDelay = null; public static ConfigEntry mushroomMaxPoisonDelay = null; public static ConfigEntry mushroomMinPoisonDuration = null; public static ConfigEntry mushroomMaxPoisonDuration = null; public static ConfigEntry berryMinHunger = null; public static ConfigEntry berryMaxHunger = null; public static ConfigEntry berryBonusChance = null; public static ConfigEntry berryMinBonus = null; public static ConfigEntry berryMaxBonus = null; public static ConfigEntry berryDelayedPoisonChance = null; public static ConfigEntry berryMinPoisonDelay = null; public static ConfigEntry berryMaxPoisonDelay = null; public static ConfigEntry berryMinPoisonDuration = null; public static ConfigEntry berryMaxPoisonDuration = null; public static ConfigEntry berryInstantPoisonChance = null; public static ConfigEntry berryMinInstantPoison = null; public static ConfigEntry berryMaxInstantPoison = null; public static ConfigEntry berryInjuryHealChance = null; public static ConfigEntry berryMinInjuryHeal = null; public static ConfigEntry berryMaxInjuryHeal = null; public static ConfigEntry berryHotHealChance = null; public static ConfigEntry berryMinHotHeal = null; public static ConfigEntry berryMaxHotHeal = null; public static ConfigEntry crispberryMinHunger = null; public static ConfigEntry crispberryMaxHunger = null; public static ConfigEntry crispberryBonusChance = null; public static ConfigEntry crispberryMinBonus = null; public static ConfigEntry crispberryMaxBonus = null; public static ConfigEntry crispberryDelayedPoisonChance = null; public static ConfigEntry crispberryMinPoisonDelay = null; public static ConfigEntry crispberryMaxPoisonDelay = null; public static ConfigEntry crispberryMinPoisonDuration = null; public static ConfigEntry crispberryMaxPoisonDuration = null; public static ConfigEntry crispberryInstantPoisonChance = null; public static ConfigEntry crispberryMinInstantPoison = null; public static ConfigEntry crispberryMaxInstantPoison = null; public static ConfigEntry crispberryInjuryHealChance = null; public static ConfigEntry crispberryMinInjuryHeal = null; public static ConfigEntry crispberryMaxInjuryHeal = null; public static ConfigEntry crispberryHotHealChance = null; public static ConfigEntry crispberryMinHotHeal = null; public static ConfigEntry crispberryMaxHotHeal = null; public static ConfigEntry berrynanaMinHunger = null; public static ConfigEntry berrynanaMaxHunger = null; public static ConfigEntry berrynanaBonusChance = null; public static ConfigEntry berrynanaMinBonus = null; public static ConfigEntry berrynanaMaxBonus = null; public static ConfigEntry berrynanaDelayedPoisonChance = null; public static ConfigEntry berrynanaMinPoisonDelay = null; public static ConfigEntry berrynanaMaxPoisonDelay = null; public static ConfigEntry berrynanaMinPoisonDuration = null; public static ConfigEntry berrynanaMaxPoisonDuration = null; public static ConfigEntry berrynanaInstantPoisonChance = null; public static ConfigEntry berrynanaMinInstantPoison = null; public static ConfigEntry berrynanaMaxInstantPoison = null; public static ConfigEntry berrynanaInjuryHealChance = null; public static ConfigEntry berrynanaMinInjuryHeal = null; public static ConfigEntry berrynanaMaxInjuryHeal = null; public static ConfigEntry berrynanaHotHealChance = null; public static ConfigEntry berrynanaMinHotHeal = null; public static ConfigEntry berrynanaMaxHotHeal = null; public static ConfigEntry clusterberryMinHunger = null; public static ConfigEntry clusterberryMaxHunger = null; public static ConfigEntry clusterberryBonusChance = null; public static ConfigEntry clusterberryMinBonus = null; public static ConfigEntry clusterberryMaxBonus = null; public static ConfigEntry clusterberryDelayedPoisonChance = null; public static ConfigEntry clusterberryMinPoisonDelay = null; public static ConfigEntry clusterberryMaxPoisonDelay = null; public static ConfigEntry clusterberryMinPoisonDuration = null; public static ConfigEntry clusterberryMaxPoisonDuration = null; public static ConfigEntry clusterberryInstantPoisonChance = null; public static ConfigEntry clusterberryMinInstantPoison = null; public static ConfigEntry clusterberryMaxInstantPoison = null; public static ConfigEntry clusterberryInjuryHealChance = null; public static ConfigEntry clusterberryMinInjuryHeal = null; public static ConfigEntry clusterberryMaxInjuryHeal = null; public static ConfigEntry clusterberryHotHealChance = null; public static ConfigEntry clusterberryMinHotHeal = null; public static ConfigEntry clusterberryMaxHotHeal = null; public static ConfigEntry kingberryMinHunger = null; public static ConfigEntry kingberryMaxHunger = null; public static ConfigEntry kingberryBonusChance = null; public static ConfigEntry kingberryMinBonus = null; public static ConfigEntry kingberryMaxBonus = null; public static ConfigEntry kingberryDelayedPoisonChance = null; public static ConfigEntry kingberryMinPoisonDelay = null; public static ConfigEntry kingberryMaxPoisonDelay = null; public static ConfigEntry kingberryMinPoisonDuration = null; public static ConfigEntry kingberryMaxPoisonDuration = null; public static ConfigEntry kingberryInstantPoisonChance = null; public static ConfigEntry kingberryMinInstantPoison = null; public static ConfigEntry kingberryMaxInstantPoison = null; public static ConfigEntry kingberryInjuryHealChance = null; public static ConfigEntry kingberryMinInjuryHeal = null; public static ConfigEntry kingberryMaxInjuryHeal = null; public static ConfigEntry kingberryHotHealChance = null; public static ConfigEntry kingberryMinHotHeal = null; public static ConfigEntry kingberryMaxHotHeal = null; public static ConfigEntry prickleberryMinHunger = null; public static ConfigEntry prickleberryMaxHunger = null; public static ConfigEntry prickleberryBonusChance = null; public static ConfigEntry prickleberryMinBonus = null; public static ConfigEntry prickleberryMaxBonus = null; public static ConfigEntry prickleberryDelayedPoisonChance = null; public static ConfigEntry prickleberryMinPoisonDelay = null; public static ConfigEntry prickleberryMaxPoisonDelay = null; public static ConfigEntry prickleberryMinPoisonDuration = null; public static ConfigEntry prickleberryMaxPoisonDuration = null; public static ConfigEntry prickleberryInstantPoisonChance = null; public static ConfigEntry prickleberryMinInstantPoison = null; public static ConfigEntry prickleberryMaxInstantPoison = null; public static ConfigEntry prickleberryInjuryHealChance = null; public static ConfigEntry prickleberryMinInjuryHeal = null; public static ConfigEntry prickleberryMaxInjuryHeal = null; public static ConfigEntry prickleberryHotHealChance = null; public static ConfigEntry prickleberryMinHotHeal = null; public static ConfigEntry prickleberryMaxHotHeal = null; public static ConfigEntry winterberryMinHunger = null; public static ConfigEntry winterberryMaxHunger = null; public static ConfigEntry winterberryBonusChance = null; public static ConfigEntry winterberryMinBonus = null; public static ConfigEntry winterberryMaxBonus = null; public static ConfigEntry winterberryDelayedPoisonChance = null; public static ConfigEntry winterberryMinPoisonDelay = null; public static ConfigEntry winterberryMaxPoisonDelay = null; public static ConfigEntry winterberryMinPoisonDuration = null; public static ConfigEntry winterberryMaxPoisonDuration = null; public static ConfigEntry winterberryInstantPoisonChance = null; public static ConfigEntry winterberryMinInstantPoison = null; public static ConfigEntry winterberryMaxInstantPoison = null; public static ConfigEntry winterberryInjuryHealChance = null; public static ConfigEntry winterberryMinInjuryHeal = null; public static ConfigEntry winterberryMaxInjuryHeal = null; public static ConfigEntry winterberryHotHealChance = null; public static ConfigEntry winterberryMinHotHeal = null; public static ConfigEntry winterberryMaxHotHeal = null; internal static Dictionary VanillaStats = null; internal static Plugin instance; internal PhotonView view; private static readonly List ConfigItems = new List { "BerryMode", "MushroomMode", "ShroomberryMode", "mushroomMinHunger", "mushroomMaxHunger", "mushroomPoisonChance", "mushroomMinPoisonDelay", "mushroomMaxPoisonDelay", "mushroomMinPoisonDuration", "mushroomMaxPoisonDuration", "berryMinHunger", "berryMaxHunger", "berryBonusChance", "berryMinBonus", "berryMaxBonus", "berryDelayedPoisonChance", "berryMinPoisonDelay", "berryMaxPoisonDelay", "berryMinPoisonDuration", "berryMaxPoisonDuration", "berryInstantPoisonChance", "berryMinInstantPoison", "berryMaxInstantPoison", "berryInjuryHealChance", "berryMinInjuryHeal", "berryMaxInjuryHeal", "berryHotHealChance", "berryMinHotHeal", "berryMaxHotHeal", "crispberryMinHunger", "crispberryMaxHunger", "crispberryBonusChance", "crispberryMinBonus", "crispberryMaxBonus", "crispberryDelayedPoisonChance", "crispberryMinPoisonDelay", "crispberryMaxPoisonDelay", "crispberryMinPoisonDuration", "crispberryMaxPoisonDuration", "crispberryInstantPoisonChance", "crispberryMinInstantPoison", "crispberryMaxInstantPoison", "crispberryInjuryHealChance", "crispberryMinInjuryHeal", "crispberryMaxInjuryHeal", "crispberryHotHealChance", "crispberryMinHotHeal", "crispberryMaxHotHeal", "berrynanaMinHunger", "berrynanaMaxHunger", "berrynanaBonusChance", "berrynanaMinBonus", "berrynanaMaxBonus", "berrynanaDelayedPoisonChance", "berrynanaMinPoisonDelay", "berrynanaMaxPoisonDelay", "berrynanaMinPoisonDuration", "berrynanaMaxPoisonDuration", "berrynanaInstantPoisonChance", "berrynanaMinInstantPoison", "berrynanaMaxInstantPoison", "berrynanaInjuryHealChance", "berrynanaMinInjuryHeal", "berrynanaMaxInjuryHeal", "berrynanaHotHealChance", "berrynanaMinHotHeal", "berrynanaMaxHotHeal", "clusterberryMinHunger", "clusterberryMaxHunger", "clusterberryBonusChance", "clusterberryMinBonus", "clusterberryMaxBonus", "clusterberryDelayedPoisonChance", "clusterberryMinPoisonDelay", "clusterberryMaxPoisonDelay", "clusterberryMinPoisonDuration", "clusterberryMaxPoisonDuration", "clusterberryInstantPoisonChance", "clusterberryMinInstantPoison", "clusterberryMaxInstantPoison", "clusterberryInjuryHealChance", "clusterberryMinInjuryHeal", "clusterberryMaxInjuryHeal", "clusterberryHotHealChance", "clusterberryMinHotHeal", "clusterberryMaxHotHeal", "kingberryMinHunger", "kingberryMaxHunger", "kingberryBonusChance", "kingberryMinBonus", "kingberryMaxBonus", "kingberryDelayedPoisonChance", "kingberryMinPoisonDelay", "kingberryMaxPoisonDelay", "kingberryMinPoisonDuration", "kingberryMaxPoisonDuration", "kingberryInstantPoisonChance", "kingberryMinInstantPoison", "kingberryMaxInstantPoison", "kingberryInjuryHealChance", "kingberryMinInjuryHeal", "kingberryMaxInjuryHeal", "kingberryHotHealChance", "kingberryMinHotHeal", "kingberryMaxHotHeal", "prickleberryMinHunger", "prickleberryMaxHunger", "prickleberryBonusChance", "prickleberryMinBonus", "prickleberryMaxBonus", "prickleberryDelayedPoisonChance", "prickleberryMinPoisonDelay", "prickleberryMaxPoisonDelay", "prickleberryMinPoisonDuration", "prickleberryMaxPoisonDuration", "prickleberryInstantPoisonChance", "prickleberryMinInstantPoison", "prickleberryMaxInstantPoison", "prickleberryInjuryHealChance", "prickleberryMinInjuryHeal", "prickleberryMaxInjuryHeal", "prickleberryHotHealChance", "prickleberryMinHotHeal", "prickleberryMaxHotHeal", "winterberryMinHunger", "winterberryMaxHunger", "winterberryBonusChance", "winterberryMinBonus", "winterberryMaxBonus", "winterberryDelayedPoisonChance", "winterberryMinPoisonDelay", "winterberryMaxPoisonDelay", "winterberryMinPoisonDuration", "winterberryMaxPoisonDuration", "winterberryInstantPoisonChance", "winterberryMinInstantPoison", "winterberryMaxInstantPoison", "winterberryInjuryHealChance", "winterberryMinInjuryHeal", "winterberryMaxInjuryHeal", "winterberryHotHealChance", "winterberryMinHotHeal", "winterberryMaxHotHeal" }; private static readonly HashSet ActionFilter = new HashSet { "Action_RestoreHunger", "Action_GiveExtraStamina", "Action_InflictPoison", "Action_ModifyStatus" }; private static readonly Dictionary BerryTypePool = new Dictionary { { "Apple Berry Red", "crispberry" }, { "Apple Berry Green", "crispberry" }, { "Apple Berry Yellow", "crispberry" }, { "Berrynana Blue", "berrynana" }, { "Berrynana Brown", "berrynana" }, { "Berrynana Pink", "berrynana" }, { "Berrynana Yellow", "berrynana" }, { "Clusterberry Black", "clusterberry" }, { "Clusterberry Red", "clusterberry" }, { "Clusterberry Yellow", "clusterberry" }, { "Kingberry Green", "kingberry" }, { "Kingberry Purple", "kingberry" }, { "Kingberry Yellow", "kingberry" }, { "Winterberry Orange", "winterberry" }, { "Winterberry Yellow", "winterberry" }, { "Prickleberry_Red", "prickleberry" }, { "Prickleberry_Gold", "prickleberry" } }; private static readonly Dictionary BerryAllPool = new Dictionary { { "Apple Berry Red", "berry" }, { "Apple Berry Green", "berry" }, { "Apple Berry Yellow", "berry" }, { "Berrynana Blue", "berry" }, { "Berrynana Brown", "berry" }, { "Berrynana Pink", "berry" }, { "Berrynana Yellow", "berry" }, { "Clusterberry Black", "berry" }, { "Clusterberry Red", "berry" }, { "Clusterberry Yellow", "berry" }, { "Kingberry Green", "berry" }, { "Kingberry Purple", "berry" }, { "Kingberry Yellow", "berry" }, { "Winterberry Orange", "berry" }, { "Winterberry Yellow", "berry" }, { "Prickleberry_Red", "berry" }, { "Prickleberry_Gold", "berry" } }; private static readonly Dictionary MushroomTypePool = new Dictionary { { "Mushroom Chubby", "Mushroom Chubby" }, { "Mushroom Cluster", "Mushroom Cluster" }, { "Mushroom Cluster Poison", "Mushroom Cluster" }, { "Mushroom Lace", "Mushroom Bugle" }, { "Mushroom Lace Poison", "Mushroom Bugle" }, { "Mushroom Normie", "Mushroom Button" }, { "Mushroom Normie Poison", "Mushroom Button" } }; private static readonly Dictionary MushroomAllPool = new Dictionary { { "Mushroom Chubby", "Mushroom" }, { "Mushroom Cluster", "Mushroom" }, { "Mushroom Cluster Poison", "Mushroom" }, { "Mushroom Lace", "Mushroom" }, { "Mushroom Lace Poison", "Mushroom" }, { "Mushroom Normie", "Mushroom" }, { "Mushroom Normie Poison", "Mushroom" } }; public const string Id = "RSMind.FoodRandomizer"; internal static ManualLogSource Log { get; private set; } = null; public static string Name => "FoodRandomizer"; public static string Version => "1.0.3"; private void Awake() { //IL_1216: Unknown result type (might be due to invalid IL or missing references) //IL_121c: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; BerryMode = ((BaseUnityPlugin)this).Config.Bind("General", "Berry Shuffle Mode", BerryShuffleModes.RandomByType, "Shuffle in type will use only effects from variants (Red/Green/Yellow crispberry shuffle). Shuffle all will shuffle all berries. Random by type will randomize using a type's individual parameters. Chaos will randomize by global parameters."); MushroomMode = ((BaseUnityPlugin)this).Config.Bind("General", "Mushroom Shuffle Mode", MushroomShuffleModes.RandomPaired, "Shuffle in type will randomly swap each pair's toxicity (including Chubby). Shuffle all will shuffle the effects of all mushrooms. Random paired randomizes the effects of mushrooms, but guarantees one in each pair is healthy. Chaos randomizes without any guarantees."); ShroomberryMode = ((BaseUnityPlugin)this).Config.Bind("General", "Shroomberry Mode", ShroomberryModes.RandomBalanced, "Vanilla uses vanilla behavior. Random balanced randomizes the effects, but guarantees that there are at least 2 positive and 2 negative effects. Random minimal guarantees at least 1 positive and 1 negative effect. Chaos fully randomizes effects."); mushroomMinHunger = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Minimum Hunger", 1, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); mushroomMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Maximum Hunger", 8, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); mushroomMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Minimum Poison Delay", 5, "The lower bounds, in seconds, of randomized poison delay."); mushroomMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Maximum Poison Delay", 15, "The upper bounds, in seconds, of randomized poison delay."); mushroomMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Minimum Poison Duration", 6, "The lower bounds, in seconds, of randomized poison duration. This determines the total poison applied."); mushroomMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Maximum Poison Duration", 18, "The upper bounds, in seconds, of randomized poison duration. This determines the total poison applied."); mushroomPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Mushrooms", "Chaos Mode-Poison Chance", 50, "The % chance a mushroom is poisonous."); berryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Hunger", 1, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); berryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Hunger", 12, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); berryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Bonus Chance", 29, "The % chance a berry grants bonus stamina."); berryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Bonus Stamina", 4, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); berryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Bonus Stamina", 14, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); berryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Delayed Poison Chance", 18, "The % chance a berry inflicts delayed poison."); berryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Poison Delay", 2, "The lower bounds, in seconds, of delayed poison delay."); berryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Poison Delay", 3, "The upper bounds, in seconds, of delayed poison delay."); berryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Poison Duration", 4, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); berryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Poison Duration", 10, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); berryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Instant Poison Chance", 6, "The % chance a berry inflicts instant poison."); berryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Instant Poison", 2, "The lower bounds, in 2.5% ticks, of instant poison."); berryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Instant Poison", 2, "The upper bounds, in 2.5% ticks, of instant poison."); berryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Injury Heal Chance", 18, "The % chance a berry heals injury."); berryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Injury Heal", 4, "The lower bounds, in 2.5% ticks, of injury reduction."); berryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Injury Heal", 8, "The upper bounds, in 2.5% ticks, of injury reduction."); berryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Heat Heal Chance", 24, "The % chance a berry heals heat."); berryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Minimum Heat Heal", 4, "The lower bounds, in 2.5% ticks, of heat reduction."); berryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Berry Chaos Mode", "Maximum Heat Heal", 20, "The upper bounds, in 2.5% ticks, of heat reduction."); crispberryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Hunger", 2, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); crispberryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Hunger", 2, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); crispberryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Bonus Chance", 33, "The % chance a crispberry grants bonus stamina."); crispberryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Bonus Stamina", 2, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); crispberryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Bonus Stamina", 6, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); crispberryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Delayed Poison Chance", 33, "The % chance a cripsberry inflicts delayed poison."); crispberryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Poison Delay", 1, "The lower bounds, in seconds, of delayed poison delay."); crispberryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Poison Delay", 3, "The upper bounds, in seconds, of delayed poison delay."); crispberryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Poison Duration", 2, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); crispberryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Poison Duration", 6, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); crispberryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Instant Poison Chance", 0, "The % chance a crispberry inflicts instant poison."); crispberryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Instant Poison", 0, "The lower bounds, in 2.5% ticks, of instant poison."); crispberryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Instant Poison", 0, "The upper bounds, in 2.5% ticks, of instant poison."); crispberryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Injury Heal Chance", 0, "The % chance a crispberry heals injury."); crispberryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Injury Heal", 0, "The lower bounds, in 2.5% ticks, of injury reduction."); crispberryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Injury Heal", 0, "The upper bounds, in 2.5% ticks, of injury reduction."); crispberryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Heat Heal Chance", 0, "The % chance a crispberry heals heat."); crispberryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Minimum Heat Heal", 0, "The lower bounds, in 2.5% ticks, of heat reduction."); crispberryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Crispberries", "Maximum Heat Heal", 0, "The upper bounds, in 2.5% ticks, of heat reduction."); berrynanaMinHunger = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Hunger", 4, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); berrynanaMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Hunger", 12, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); berrynanaBonusChance = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Bonus Chance", 25, "The % chance a berrynana grants bonus stamina."); berrynanaMinBonus = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Bonus Stamina", 2, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); berrynanaMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Bonus Stamina", 6, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); berrynanaDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Delayed Poison Chance", 25, "The % chance a berrynana inflicts delayed poison."); berrynanaMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Poison Delay", 1, "The lower bounds, in seconds, of delayed poison delay."); berrynanaMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Poison Delay", 3, "The upper bounds, in seconds, of delayed poison delay."); berrynanaMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Poison Duration", 3, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); berrynanaMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Poison Duration", 9, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); berrynanaInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Instant Poison Chance", 0, "The % chance a berrynana inflicts instant poison."); berrynanaMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Instant Poison", 0, "The lower bounds, in 2.5% ticks, of instant poison."); berrynanaMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Instant Poison", 0, "The upper bounds, in 2.5% ticks, of instant poison."); berrynanaInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Injury Heal Chance", 0, "The % chance a berrynana heals injury."); berrynanaMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Injury Heal", 0, "The lower bounds, in 2.5% ticks, of injury reduction."); berrynanaMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Injury Heal", 0, "The upper bounds, in 2.5% ticks, of injury reduction."); berrynanaHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Heat Heal Chance", 0, "The % chance a berrynana heals heat."); berrynanaMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Minimum Heat Heal", 0, "The lower bounds, in 2.5% ticks, of heat reduction."); berrynanaMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Berrynanas", "Maximum Heat Heal", 0, "The upper bounds, in 2.5% ticks, of heat reduction."); clusterberryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Hunger", 3, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); clusterberryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Hunger", 8, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); clusterberryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Bonus Chance", 33, "The % chance a clusterberry grants bonus stamina."); clusterberryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Bonus Stamina", 2, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); clusterberryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Bonus Stamina", 6, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); clusterberryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Delayed Poison Chance", 0, "The % chance a clusterberry inflicts delayed poison."); clusterberryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Poison Delay", 0, "The lower bounds, in seconds, of delayed poison delay."); clusterberryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Poison Delay", 0, "The upper bounds, in seconds, of delayed poison delay."); clusterberryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Poison Duration", 0, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); clusterberryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Poison Duration", 0, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); clusterberryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Instant Poison Chance", 0, "The % chance a clusterberry inflicts instant poison."); clusterberryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Instant Poison", 0, "The lower bounds, in 2.5% ticks, of instant poison."); clusterberryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Instant Poison", 0, "The upper bounds, in 2.5% ticks, of instant poison."); clusterberryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Injury Heal Chance", 33, "The % chance a clusterberry heals injury."); clusterberryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Injury Heal", 6, "The lower bounds, in 2.5% ticks, of injury reduction."); clusterberryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Injury Heal", 10, "The upper bounds, in 2.5% ticks, of injury reduction."); clusterberryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Heat Heal Chance", 0, "The % chance a clusterberry heals heat."); clusterberryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Minimum Heat Heal", 0, "The lower bounds, in 2.5% ticks, of heat reduction."); clusterberryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Clusterberries", "Maximum Heat Heal", 0, "The upper bounds, in 2.5% ticks, of heat reduction."); kingberryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Hunger", 12, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); kingberryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Hunger", 12, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); kingberryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Bonus Chance", 33, "The % chance a kingberry grants bonus stamina."); kingberryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Bonus Stamina", 8, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); kingberryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Bonus Stamina", 20, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); kingberryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Delayed Poison Chance", 33, "The % chance a kingberry inflicts delayed poison."); kingberryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Poison Delay", 2, "The lower bounds, in seconds, of delayed poison delay."); kingberryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Poison Delay", 6, "The upper bounds, in seconds, of delayed poison delay."); kingberryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Poison Duration", 5, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); kingberryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Poison Duration", 15, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); kingberryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Instant Poison Chance", 33, "The % chance a kingberry inflicts instant poison."); kingberryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Instant Poison", 1, "The lower bounds, in 2.5% ticks, of instant poison."); kingberryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Instant Poison", 3, "The upper bounds, in 2.5% ticks, of instant poison."); kingberryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Injury Heal Chance", 0, "The % chance a kingberry heals injury."); kingberryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Injury Heal", 0, "The lower bounds, in 2.5% ticks, of injury reduction."); kingberryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Injury Heal", 0, "The upper bounds, in 2.5% ticks, of injury reduction."); kingberryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Heat Heal Chance", 0, "The % chance a kingberry heals heat."); kingberryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Minimum Heat Heal", 0, "The lower bounds, in 2.5% ticks, of heat reduction."); kingberryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Kingberries", "Maximum Heat Heal", 0, "The upper bounds, in 2.5% ticks, of heat reduction."); prickleberryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Hunger", 4, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); prickleberryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Hunger", 8, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); prickleberryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Bonus Chance", 0, "The % chance a prickleberry grants bonus stamina."); prickleberryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Bonus Stamina", 0, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); prickleberryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Bonus Stamina", 0, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); prickleberryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Delayed Poison Chance", 0, "The % chance a prickleberry inflicts delayed poison."); prickleberryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Poison Delay", 0, "The lower bounds, in seconds, of delayed poison delay."); prickleberryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Poison Delay", 0, "The upper bounds, in seconds, of delayed poison delay."); prickleberryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Poison Duration", 0, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); prickleberryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Poison Duration", 0, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); prickleberryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Instant Poison Chance", 0, "The % chance a prickleberry inflicts instant poison."); prickleberryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Instant Poison", 0, "The lower bounds, in 2.5% ticks, of instant poison."); prickleberryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Instant Poison", 0, "The upper bounds, in 2.5% ticks, of instant poison."); prickleberryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Injury Heal Chance", 50, "The % chance a prickleberry heals injury."); prickleberryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Injury Heal", 2, "The lower bounds, in 2.5% ticks, of injury reduction."); prickleberryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Injury Heal", 6, "The upper bounds, in 2.5% ticks, of injury reduction."); prickleberryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Heat Heal Chance", 100, "The % chance a prickleberry heals heat."); prickleberryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Minimum Heat Heal", 4, "The lower bounds, in 2.5% ticks, of heat reduction."); prickleberryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Prickleberries", "Maximum Heat Heal", 4, "The upper bounds, in 2.5% ticks, of heat reduction."); winterberryMinHunger = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Hunger", 6, "The lower bounds, in 2.5% ticks, of randomized hunger reduction."); winterberryMaxHunger = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Hunger", 12, "The upper bounds, in 2.5% ticks, of randomized hunger reduction."); winterberryBonusChance = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Bonus Chance", 50, "The % chance a berry grants bonus stamina."); winterberryMinBonus = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Bonus Stamina", 10, "The lower bounds, in 2.5% ticks, of randomized bonus stamina."); winterberryMaxBonus = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Bonus Stamina", 18, "The upper bounds, in 2.5% ticks, of randomized bonus stamina."); winterberryDelayedPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Delayed Poison Chance", 0, "The % chance a berry inflicts delayed poison."); winterberryMinPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Poison Delay", 0, "The lower bounds, in seconds, of delayed poison delay."); winterberryMaxPoisonDelay = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Poison Delay", 0, "The upper bounds, in seconds, of delayed poison delay."); winterberryMinPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Poison Duration", 0, "The lower bounds, in seconds, of delayed poison duration. This determines the total poison applied."); winterberryMaxPoisonDuration = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Poison Duration", 0, "The upper bounds, in seconds, of delayed poison duration. This determines the total poison applied."); winterberryInstantPoisonChance = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Instant Poison Chance", 0, "The % chance a berry inflicts instant poison."); winterberryMinInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Instant Poison", 0, "The lower bounds, in 2.5% ticks, of instant poison."); winterberryMaxInstantPoison = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Instant Poison", 0, "The upper bounds, in 2.5% ticks, of instant poison."); winterberryInjuryHealChance = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Injury Heal Chance", 50, "The % chance a berry heals injury."); winterberryMinInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Injury Heal", 6, "The lower bounds, in 2.5% ticks, of injury reduction."); winterberryMaxInjuryHeal = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Injury Heal", 10, "The upper bounds, in 2.5% ticks, of injury reduction."); winterberryHotHealChance = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Heat Heal Chance", 100, "The % chance a berry heals heat."); winterberryMinHotHeal = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Minimum Heat Heal", 12, "The lower bounds, in 2.5% ticks, of heat reduction."); winterberryMaxHotHeal = ((BaseUnityPlugin)this).Config.Bind("Winterberries", "Maximum Heat Heal", 20, "The upper bounds, in 2.5% ticks, of heat reduction."); Harmony val = new Harmony("com.rsmind.peak.FoodRandomizer"); val.PatchAll(); PhotonNetwork.AddCallbackTarget((object)this); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } private void OnDestroy() { PhotonNetwork.RemoveCallbackTarget((object)this); ResetItemDatabase(); } public unsafe void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (!((Dictionary)(object)propertiesThatChanged).ContainsKey((object)"food_shuffle_seed")) { return; } Log.LogInfo((object)"FoodRandomiser: Watched properties updated"); ResetItemDatabase(); DictionaryEntryEnumerator enumerator = propertiesThatChanged.GetEnumerator(); try { while (((DictionaryEntryEnumerator)(ref enumerator)).MoveNext()) { DictionaryEntry current = ((DictionaryEntryEnumerator)(ref enumerator)).Current; if ((string)current.Key == "BerryMode") { BerryMode.Value = (BerryShuffleModes)current.Value; } else if ((string)current.Key == "MushroomMode") { MushroomMode.Value = (MushroomShuffleModes)current.Value; } else if ((string)current.Key == "ShroomberryMode") { ShroomberryMode.Value = (ShroomberryModes)current.Value; } else if (ConfigItems.Contains((string)current.Key)) { ((ConfigEntry)typeof(Plugin).GetField((string)current.Key, BindingFlags.Static | BindingFlags.Public).GetValue(null)).Value = (int)current.Value; } } } finally { ((IDisposable)(*(DictionaryEntryEnumerator*)(&enumerator))/*cast due to .constrained prefix*/).Dispose(); } ShuffleItemDatabase((int)propertiesThatChanged[(object)"food_shuffle_seed"]); } internal static void ShuffleItemDatabase(int seed) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Invalid comparison between Unknown and I4 //IL_0b44: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Invalid comparison between Unknown and I4 //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_09c8: Unknown result type (might be due to invalid IL or missing references) //IL_09fc: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Expected O, but got Unknown //IL_0aed: Unknown result type (might be due to invalid IL or missing references) //IL_0af4: Expected O, but got Unknown //IL_0a9f: Unknown result type (might be due to invalid IL or missing references) //IL_0aa6: Expected O, but got Unknown Log.LogInfo((object)$"Got shuffle request, using seed: {seed}"); State state = Random.state; Random.InitState(seed); ItemDatabase val = SingletonAsset.Instance; VanillaStats = new Dictionary(); Dictionary> dictionary = new Dictionary>(); Dictionary dictionary2 = ((BerryMode.Value == BerryShuffleModes.ShuffleInType || BerryMode.Value == BerryShuffleModes.RandomByType) ? BerryTypePool : BerryAllPool); if (BerryMode.Value == BerryShuffleModes.Off) { dictionary2 = new Dictionary(); } if (MushroomMode.Value != MushroomShuffleModes.Off) { Extensions.Merge((IDictionary)dictionary2, (IDictionary)((MushroomMode.Value == MushroomShuffleModes.ShuffleInType || MushroomMode.Value == MushroomShuffleModes.RandomPaired) ? MushroomTypePool : MushroomAllPool)); } Log.LogInfo((object)"Storing vanilla food stats"); foreach (KeyValuePair item in val.itemLookup) { Item value = item.Value; if (!dictionary2.ContainsKey(((Object)value).name)) { continue; } if (!dictionary.ContainsKey(dictionary2[((Object)value).name])) { dictionary.Add(dictionary2[((Object)value).name], new List()); } FoodStats foodStats = new FoodStats(); ItemAction[] components = ((Component)value).GetComponents(); foreach (ItemAction val2 in components) { switch (((object)val2).GetType().Name) { case "Action_RestoreHunger": foodStats.hungerAmount = ((Action_RestoreHunger)val2).restorationAmount; break; case "Action_GiveExtraStamina": foodStats.bonusAmount = ((Action_GiveExtraStamina)val2).amount; break; case "Action_InflictPoison": foodStats.delayedPoisonDuration = ((Action_InflictPoison)val2).inflictionTime; foodStats.poisonDelay = ((Action_InflictPoison)val2).delay; break; case "Action_ModifyStatus": { STATUSTYPE statusType = ((Action_ModifyStatus)val2).statusType; if ((int)statusType != 0) { if ((int)statusType != 3) { if ((int)statusType == 8) { foodStats.hotHeal = ((Action_ModifyStatus)val2).changeAmount; } } else { foodStats.instantPoison = ((Action_ModifyStatus)val2).changeAmount; } } else { foodStats.injuryHeal = ((Action_ModifyStatus)val2).changeAmount; } break; } } } VanillaStats.Add(((Object)value).name, foodStats); dictionary[dictionary2[((Object)value).name]].Add(foodStats); } if (MushroomMode.Value == MushroomShuffleModes.RandomPaired) { Log.LogInfo((object)"Randomizing mushroom stats: Paired"); foreach (string key in dictionary.Keys) { if (!key.StartsWith("Mushroom")) { continue; } foreach (FoodStats item2 in dictionary[key]) { item2.hungerAmount = Random.Range(mushroomMinHunger.Value, mushroomMaxHunger.Value + 1); } int num = Random.Range(0, 2); if (!(key == "Mushroom Chubby") || num != 1) { FoodStats foodStats2 = dictionary[key][num]; foodStats2.poisonDelay = Random.Range(mushroomMinPoisonDelay.Value, mushroomMaxPoisonDelay.Value + 1); foodStats2.delayedPoisonDuration = Random.Range(mushroomMinPoisonDuration.Value, mushroomMaxPoisonDuration.Value + 1); if (!(key == "Mushroom Chubby")) { FoodStats foodStats3 = dictionary[key][(num + 1) % 2]; foodStats3.poisonDelay = 0f; foodStats3.delayedPoisonDuration = 0f; } } } } if (MushroomMode.Value == MushroomShuffleModes.Chaos) { Log.LogInfo((object)"Randomizing mushroom stats: Chaos"); foreach (string key2 in dictionary.Keys) { if (!key2.StartsWith("Mushroom")) { continue; } foreach (FoodStats item3 in dictionary[key2]) { item3.hungerAmount = Random.Range(mushroomMinHunger.Value, mushroomMaxHunger.Value + 1); if (Random.Range(0, 100) < mushroomPoisonChance.Value) { item3.poisonDelay = Random.Range(mushroomMinPoisonDelay.Value, mushroomMaxPoisonDelay.Value + 1); item3.delayedPoisonDuration = Random.Range(mushroomMinPoisonDuration.Value, mushroomMaxPoisonDuration.Value + 1); } else { item3.poisonDelay = 0f; item3.delayedPoisonDuration = 0f; } } } } if (BerryMode.Value == BerryShuffleModes.RandomByType || BerryMode.Value == BerryShuffleModes.Chaos) { Log.LogInfo((object)"Randomizing berry stats"); foreach (string key3 in dictionary.Keys) { if (key3.StartsWith("Mushroom")) { continue; } foreach (FoodStats item4 in dictionary[key3]) { item4.hungerAmount = (float)Random.Range(GetStatValue(key3, "MinHunger"), GetStatValue(key3, "MaxHunger") + 1) * 0.025f; if (Random.Range(0, 100) < GetStatValue(key3, "BonusChance")) { item4.bonusAmount = (float)Random.Range(GetStatValue(key3, "MinBonus"), GetStatValue(key3, "MaxBonus") + 1) * 0.025f; } else { item4.bonusAmount = 0f; } if (Random.Range(0, 100) < GetStatValue(key3, "DelayedPoisonChance")) { item4.poisonDelay = Random.Range(GetStatValue(key3, "MinPoisonDelay"), GetStatValue(key3, "MaxPoisonDelay") + 1); item4.delayedPoisonDuration = Random.Range(GetStatValue(key3, "MinPoisonDuration"), GetStatValue(key3, "MaxPoisonDuration") + 1); } else { item4.poisonDelay = 0f; item4.delayedPoisonDuration = 0f; } if (Random.Range(0, 100) < GetStatValue(key3, "InstantPoisonChance")) { item4.instantPoison = (float)Random.Range(GetStatValue(key3, "MinInstantPoison"), GetStatValue(key3, "MaxInstantPoison") + 1) * 0.025f; } else { item4.instantPoison = 0f; } if (Random.Range(0, 100) < GetStatValue(key3, "InjuryHealChance")) { item4.injuryHeal = (float)Random.Range(GetStatValue(key3, "MinInjuryHeal"), GetStatValue(key3, "MaxInjuryHeal") + 1) * -0.025f; } else { item4.injuryHeal = 0f; } if (Random.Range(0, 100) < GetStatValue(key3, "HotHealChance")) { item4.hotHeal = (float)Random.Range(GetStatValue(key3, "MinHotHeal"), GetStatValue(key3, "MaxHotHeal") + 1) * -0.025f; } else { item4.hotHeal = 0f; } } } } Log.LogInfo((object)"Applying food stats"); foreach (KeyValuePair item5 in val.itemLookup) { Item value2 = item5.Value; if (!dictionary2.ContainsKey(((Object)value2).name)) { continue; } int index = Random.Range(0, dictionary[dictionary2[((Object)value2).name]].Count); FoodStats foodStats4 = dictionary[dictionary2[((Object)value2).name]][index]; dictionary[dictionary2[((Object)value2).name]].RemoveAt(index); ItemAction[] components2 = ((Component)value2).GetComponents(); foreach (ItemAction val3 in components2) { if (ActionFilter.Contains(((object)val3).GetType().Name)) { Object.Destroy((Object)(object)val3); } } Object.Destroy((Object)(object)((Component)value2).GetComponent()); if (foodStats4.hungerAmount != 0f) { Action_RestoreHunger val4 = ((Component)value2).gameObject.AddComponent(); val4.restorationAmount = foodStats4.hungerAmount; ((ItemAction)val4).OnConsumed = true; } if (foodStats4.bonusAmount != 0f) { Action_GiveExtraStamina val5 = ((Component)value2).gameObject.AddComponent(); val5.amount = foodStats4.bonusAmount; ((ItemAction)val5).OnConsumed = true; } if (foodStats4.injuryHeal != 0f) { Action_ModifyStatus val6 = ((Component)value2).gameObject.AddComponent(); val6.statusType = (STATUSTYPE)0; val6.changeAmount = foodStats4.injuryHeal; ((ItemAction)val6).OnConsumed = true; } if (foodStats4.hotHeal != 0f) { Action_ModifyStatus val7 = ((Component)value2).gameObject.AddComponent(); val7.statusType = (STATUSTYPE)8; val7.changeAmount = foodStats4.hotHeal; ((ItemAction)val7).OnConsumed = true; } ItemCooking val8 = ((Component)value2).gameObject.AddComponent(); if (foodStats4.instantPoison != 0f) { Action_ModifyStatus val9 = ((Component)value2).gameObject.AddComponent(); val9.statusType = (STATUSTYPE)3; val9.changeAmount = foodStats4.instantPoison; ((ItemAction)val9).OnConsumed = true; if (!dictionary2[((Object)value2).name].StartsWith("Mushroom")) { CookingBehavior_DisableScripts val10 = new CookingBehavior_DisableScripts(); val10.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val10.scriptsToDisable, (MonoBehaviour)(object)val9).ToArray(); val8.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val8.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val10).ToArray(); } } if (foodStats4.delayedPoisonDuration != 0f) { Action_InflictPoison val11 = ((Component)value2).gameObject.AddComponent(); val11.delay = foodStats4.poisonDelay; val11.inflictionTime = foodStats4.delayedPoisonDuration; val11.poisonPerSecond = 0.025f; ((ItemAction)val11).OnConsumed = true; if (!dictionary2[((Object)value2).name].StartsWith("Mushroom")) { CookingBehavior_DisableScripts val12 = new CookingBehavior_DisableScripts(); val12.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val12.scriptsToDisable, (MonoBehaviour)(object)val11).ToArray(); val8.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val8.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val12).ToArray(); } } Action_AddOrRemoveThorns component = ((Component)value2).GetComponent(); if ((Object)(object)component != (Object)null) { CookingBehavior_DisableScripts val13 = new CookingBehavior_DisableScripts(); val13.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val13.scriptsToDisable, (MonoBehaviour)(object)component).ToArray(); val8.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val8.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val13).ToArray(); } } Random.state = state; } internal static void ResetItemDatabase() { //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Expected O, but got Unknown //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown if (VanillaStats == null) { return; } ItemDatabase val = SingletonAsset.Instance; Dictionary berryTypePool = BerryTypePool; Extensions.Merge((IDictionary)berryTypePool, (IDictionary)MushroomTypePool); foreach (KeyValuePair item in val.itemLookup) { Item value = item.Value; if (!berryTypePool.ContainsKey(((Object)value).name)) { continue; } FoodStats foodStats = VanillaStats[((Object)value).name]; ItemAction[] components = ((Component)value).GetComponents(); foreach (ItemAction val2 in components) { if (ActionFilter.Contains(((object)val2).GetType().Name)) { Object.Destroy((Object)(object)val2); } } Object.Destroy((Object)(object)((Component)value).GetComponent()); if (foodStats.hungerAmount != 0f) { Action_RestoreHunger val3 = ((Component)value).gameObject.AddComponent(); val3.restorationAmount = foodStats.hungerAmount; ((ItemAction)val3).OnConsumed = true; } if (foodStats.bonusAmount != 0f) { Action_GiveExtraStamina val4 = ((Component)value).gameObject.AddComponent(); val4.amount = foodStats.bonusAmount; ((ItemAction)val4).OnConsumed = true; } if (foodStats.injuryHeal != 0f) { Action_ModifyStatus val5 = ((Component)value).gameObject.AddComponent(); val5.statusType = (STATUSTYPE)0; val5.changeAmount = foodStats.injuryHeal; ((ItemAction)val5).OnConsumed = true; } if (foodStats.hotHeal != 0f) { Action_ModifyStatus val6 = ((Component)value).gameObject.AddComponent(); val6.statusType = (STATUSTYPE)8; val6.changeAmount = foodStats.hotHeal; ((ItemAction)val6).OnConsumed = true; } ItemCooking val7 = ((Component)value).gameObject.AddComponent(); if (foodStats.instantPoison != 0f) { Action_ModifyStatus val8 = ((Component)value).gameObject.AddComponent(); val8.statusType = (STATUSTYPE)3; val8.changeAmount = foodStats.instantPoison; ((ItemAction)val8).OnConsumed = true; CookingBehavior_DisableScripts val9 = new CookingBehavior_DisableScripts(); val9.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val9.scriptsToDisable, (MonoBehaviour)(object)val8).ToArray(); val7.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val7.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val9).ToArray(); } if (foodStats.delayedPoisonDuration != 0f) { Action_InflictPoison val10 = ((Component)value).gameObject.AddComponent(); val10.delay = foodStats.poisonDelay; val10.inflictionTime = foodStats.delayedPoisonDuration; val10.poisonPerSecond = 0.025f; ((ItemAction)val10).OnConsumed = true; CookingBehavior_DisableScripts val11 = new CookingBehavior_DisableScripts(); val11.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val11.scriptsToDisable, (MonoBehaviour)(object)val10).ToArray(); val7.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val7.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val11).ToArray(); } Action_AddOrRemoveThorns component = ((Component)value).GetComponent(); if ((Object)(object)component != (Object)null) { CookingBehavior_DisableScripts val12 = new CookingBehavior_DisableScripts(); val12.scriptsToDisable = CollectionExtensions.AddItem((IEnumerable)val12.scriptsToDisable, (MonoBehaviour)(object)component).ToArray(); val7.additionalCookingBehaviors = CollectionExtensions.AddItem((IEnumerable)val7.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)val12).ToArray(); } } } private static int GetStatValue(string category, string variable) { return ((ConfigEntry)typeof(Plugin).GetField(category + variable, BindingFlags.Static | BindingFlags.Public).GetValue(null)).Value; } public void OnPlayerEnteredRoom(Player newPlayer) { } public void OnPlayerLeftRoom(Player otherPlayer) { } public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) { } public void OnMasterClientSwitched(Player newMasterClient) { } } internal class FoodStats { internal float hungerAmount; internal float bonusAmount; internal float delayedPoisonDuration; internal float poisonDelay; internal float instantPoison; internal float injuryHeal; internal float hotHeal; } } namespace FoodRandomizer.Patches { public class Hooks { [HarmonyPatch(typeof(AirportCheckInKiosk), "StartGame")] public class AirportCheckInKiosk_StartGame { public static void Prefix() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Expected O, but got Unknown //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Expected O, but got Unknown //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Expected O, but got Unknown //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Expected O, but got Unknown //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Expected O, but got Unknown //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Expected O, but got Unknown //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Expected O, but got Unknown //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Expected O, but got Unknown //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Expected O, but got Unknown //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Expected O, but got Unknown //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Expected O, but got Unknown //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Expected O, but got Unknown //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Expected O, but got Unknown //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Expected O, but got Unknown //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Expected O, but got Unknown //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Expected O, but got Unknown //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Expected O, but got Unknown //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Expected O, but got Unknown //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Expected O, but got Unknown //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Expected O, but got Unknown //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Expected O, but got Unknown //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Expected O, but got Unknown //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Expected O, but got Unknown //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Expected O, but got Unknown //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Expected O, but got Unknown //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Expected O, but got Unknown //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Expected O, but got Unknown //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Expected O, but got Unknown //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Expected O, but got Unknown //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Expected O, but got Unknown //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Expected O, but got Unknown //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Expected O, but got Unknown //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Expected O, but got Unknown //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Expected O, but got Unknown //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Expected O, but got Unknown //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Expected O, but got Unknown //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Expected O, but got Unknown //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_077f: Expected O, but got Unknown //IL_077f: Unknown result type (might be due to invalid IL or missing references) //IL_0799: Expected O, but got Unknown //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Expected O, but got Unknown //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Expected O, but got Unknown //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Expected O, but got Unknown //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Expected O, but got Unknown //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_081b: Expected O, but got Unknown //IL_081b: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Expected O, but got Unknown //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Expected O, but got Unknown //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Expected O, but got Unknown //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_0883: Expected O, but got Unknown //IL_0883: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Expected O, but got Unknown //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Expected O, but got Unknown //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Expected O, but got Unknown //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Expected O, but got Unknown //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_0905: Expected O, but got Unknown //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Expected O, but got Unknown //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Expected O, but got Unknown //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_0953: Expected O, but got Unknown //IL_0953: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Expected O, but got Unknown //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0987: Expected O, but got Unknown //IL_0987: Unknown result type (might be due to invalid IL or missing references) //IL_09a1: Expected O, but got Unknown //IL_09a1: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Expected O, but got Unknown //IL_09bb: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Expected O, but got Unknown //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Expected O, but got Unknown //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Expected O, but got Unknown //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Expected O, but got Unknown //IL_0a23: Unknown result type (might be due to invalid IL or missing references) //IL_0a3d: Expected O, but got Unknown //IL_0a3d: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Expected O, but got Unknown //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a71: Expected O, but got Unknown //IL_0a71: Unknown result type (might be due to invalid IL or missing references) //IL_0a8b: Expected O, but got Unknown //IL_0a8b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa5: Expected O, but got Unknown //IL_0aa5: Unknown result type (might be due to invalid IL or missing references) //IL_0abf: Expected O, but got Unknown //IL_0abf: Unknown result type (might be due to invalid IL or missing references) //IL_0ad9: Expected O, but got Unknown //IL_0ad9: Unknown result type (might be due to invalid IL or missing references) //IL_0af3: Expected O, but got Unknown //IL_0af3: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Expected O, but got Unknown //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b27: Expected O, but got Unknown //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b41: Expected O, but got Unknown //IL_0b41: Unknown result type (might be due to invalid IL or missing references) //IL_0b5b: Expected O, but got Unknown //IL_0b5b: Unknown result type (might be due to invalid IL or missing references) //IL_0b75: Expected O, but got Unknown //IL_0b75: Unknown result type (might be due to invalid IL or missing references) //IL_0b8f: Expected O, but got Unknown //IL_0b8f: Unknown result type (might be due to invalid IL or missing references) //IL_0ba9: Expected O, but got Unknown //IL_0ba9: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Expected O, but got Unknown //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0bdd: Expected O, but got Unknown //IL_0bdd: Unknown result type (might be due to invalid IL or missing references) //IL_0bf7: Expected O, but got Unknown //IL_0bf7: Unknown result type (might be due to invalid IL or missing references) //IL_0c11: Expected O, but got Unknown //IL_0c11: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Expected O, but got Unknown //IL_0c2b: Unknown result type (might be due to invalid IL or missing references) //IL_0c45: Expected O, but got Unknown //IL_0c45: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Expected O, but got Unknown //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c79: Expected O, but got Unknown //IL_0c79: Unknown result type (might be due to invalid IL or missing references) //IL_0c93: Expected O, but got Unknown //IL_0c93: Unknown result type (might be due to invalid IL or missing references) //IL_0cad: Expected O, but got Unknown //IL_0cad: Unknown result type (might be due to invalid IL or missing references) //IL_0cc7: Expected O, but got Unknown //IL_0cc7: Unknown result type (might be due to invalid IL or missing references) //IL_0ce1: Expected O, but got Unknown //IL_0ce1: Unknown result type (might be due to invalid IL or missing references) //IL_0cfb: Expected O, but got Unknown //IL_0cfb: Unknown result type (might be due to invalid IL or missing references) //IL_0d15: Expected O, but got Unknown //IL_0d15: Unknown result type (might be due to invalid IL or missing references) //IL_0d2f: Expected O, but got Unknown //IL_0d2f: Unknown result type (might be due to invalid IL or missing references) //IL_0d49: Expected O, but got Unknown //IL_0d49: Unknown result type (might be due to invalid IL or missing references) //IL_0d63: Expected O, but got Unknown //IL_0d63: Unknown result type (might be due to invalid IL or missing references) //IL_0d7d: Expected O, but got Unknown //IL_0d7d: Unknown result type (might be due to invalid IL or missing references) //IL_0d97: Expected O, but got Unknown //IL_0d97: Unknown result type (might be due to invalid IL or missing references) //IL_0db1: Expected O, but got Unknown //IL_0db1: Unknown result type (might be due to invalid IL or missing references) //IL_0dcb: Expected O, but got Unknown //IL_0dcb: Unknown result type (might be due to invalid IL or missing references) //IL_0de5: Expected O, but got Unknown //IL_0de5: Unknown result type (might be due to invalid IL or missing references) //IL_0dff: Expected O, but got Unknown //IL_0dff: Unknown result type (might be due to invalid IL or missing references) //IL_0e19: Expected O, but got Unknown //IL_0e19: Unknown result type (might be due to invalid IL or missing references) //IL_0e33: Expected O, but got Unknown //IL_0e33: Unknown result type (might be due to invalid IL or missing references) //IL_0e4d: Expected O, but got Unknown //IL_0e4d: Unknown result type (might be due to invalid IL or missing references) //IL_0e67: Expected O, but got Unknown //IL_0e67: Unknown result type (might be due to invalid IL or missing references) //IL_0e81: Expected O, but got Unknown //IL_0e81: Unknown result type (might be due to invalid IL or missing references) //IL_0e9b: Expected O, but got Unknown //IL_0e9b: Unknown result type (might be due to invalid IL or missing references) //IL_0eb5: Expected O, but got Unknown //IL_0ebc: Expected O, but got Unknown if (PhotonNetwork.IsMasterClient) { Room currentRoom = PhotonNetwork.CurrentRoom; Hashtable val = new Hashtable(); ((Dictionary)val).Add((object)"food_shuffle_seed", (object)Random.Range(0, int.MaxValue)); ((Dictionary)val).Add((object)"BerryMode", (object)Plugin.BerryMode.Value); ((Dictionary)val).Add((object)"MushroomMode", (object)Plugin.MushroomMode.Value); ((Dictionary)val).Add((object)"ShroomberryMode", (object)Plugin.ShroomberryMode.Value); ((Dictionary)val).Add((object)"mushroomMinHunger", (object)Plugin.mushroomMinHunger.Value); ((Dictionary)val).Add((object)"mushroomMaxHunger", (object)Plugin.mushroomMaxHunger.Value); ((Dictionary)val).Add((object)"mushroomPoisonChance", (object)Plugin.mushroomPoisonChance.Value); ((Dictionary)val).Add((object)"mushroomMinPoisonDelay", (object)Plugin.mushroomMinPoisonDelay.Value); ((Dictionary)val).Add((object)"mushroomMaxPoisonDelay", (object)Plugin.mushroomMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"mushroomMinPoisonDuration", (object)Plugin.mushroomMinPoisonDuration.Value); ((Dictionary)val).Add((object)"mushroomMaxPoisonDuration", (object)Plugin.mushroomMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"berryMinHunger", (object)Plugin.berryMinHunger.Value); ((Dictionary)val).Add((object)"berryMaxHunger", (object)Plugin.berryMaxHunger.Value); ((Dictionary)val).Add((object)"berryBonusChance", (object)Plugin.berryBonusChance.Value); ((Dictionary)val).Add((object)"berryMinBonus", (object)Plugin.berryMinBonus.Value); ((Dictionary)val).Add((object)"berryMaxBonus", (object)Plugin.berryMaxBonus.Value); ((Dictionary)val).Add((object)"berryDelayedPoisonChance", (object)Plugin.berryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"berryMinPoisonDelay", (object)Plugin.berryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"berryMaxPoisonDelay", (object)Plugin.berryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"berryMinPoisonDuration", (object)Plugin.berryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"berryMaxPoisonDuration", (object)Plugin.berryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"berryInstantPoisonChance", (object)Plugin.berryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"berryMinInstantPoison", (object)Plugin.berryMinInstantPoison.Value); ((Dictionary)val).Add((object)"berryMaxInstantPoison", (object)Plugin.berryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"berryInjuryHealChance", (object)Plugin.berryInjuryHealChance.Value); ((Dictionary)val).Add((object)"berryMinInjuryHeal", (object)Plugin.berryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"berryMaxInjuryHeal", (object)Plugin.berryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"berryHotHealChance", (object)Plugin.berryHotHealChance.Value); ((Dictionary)val).Add((object)"berryMinHotHeal", (object)Plugin.berryMinHotHeal.Value); ((Dictionary)val).Add((object)"berryMaxHotHeal", (object)Plugin.berryMaxHotHeal.Value); ((Dictionary)val).Add((object)"crispberryMinHunger", (object)Plugin.crispberryMinHunger.Value); ((Dictionary)val).Add((object)"crispberryMaxHunger", (object)Plugin.crispberryMaxHunger.Value); ((Dictionary)val).Add((object)"crispberryBonusChance", (object)Plugin.crispberryBonusChance.Value); ((Dictionary)val).Add((object)"crispberryMinBonus", (object)Plugin.crispberryMinBonus.Value); ((Dictionary)val).Add((object)"crispberryMaxBonus", (object)Plugin.crispberryMaxBonus.Value); ((Dictionary)val).Add((object)"crispberryDelayedPoisonChance", (object)Plugin.crispberryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"crispberryMinPoisonDelay", (object)Plugin.crispberryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"crispberryMaxPoisonDelay", (object)Plugin.crispberryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"crispberryMinPoisonDuration", (object)Plugin.crispberryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"crispberryMaxPoisonDuration", (object)Plugin.crispberryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"crispberryInstantPoisonChance", (object)Plugin.crispberryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"crispberryMinInstantPoison", (object)Plugin.crispberryMinInstantPoison.Value); ((Dictionary)val).Add((object)"crispberryMaxInstantPoison", (object)Plugin.crispberryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"crispberryInjuryHealChance", (object)Plugin.crispberryInjuryHealChance.Value); ((Dictionary)val).Add((object)"crispberryMinInjuryHeal", (object)Plugin.crispberryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"crispberryMaxInjuryHeal", (object)Plugin.crispberryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"crispberryHotHealChance", (object)Plugin.crispberryHotHealChance.Value); ((Dictionary)val).Add((object)"crispberryMinHotHeal", (object)Plugin.crispberryMinHotHeal.Value); ((Dictionary)val).Add((object)"crispberryMaxHotHeal", (object)Plugin.crispberryMaxHotHeal.Value); ((Dictionary)val).Add((object)"berrynanaMinHunger", (object)Plugin.berrynanaMinHunger.Value); ((Dictionary)val).Add((object)"berrynanaMaxHunger", (object)Plugin.berrynanaMaxHunger.Value); ((Dictionary)val).Add((object)"berrynanaBonusChance", (object)Plugin.berrynanaBonusChance.Value); ((Dictionary)val).Add((object)"berrynanaMinBonus", (object)Plugin.berrynanaMinBonus.Value); ((Dictionary)val).Add((object)"berrynanaMaxBonus", (object)Plugin.berrynanaMaxBonus.Value); ((Dictionary)val).Add((object)"berrynanaDelayedPoisonChance", (object)Plugin.berrynanaDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"berrynanaMinPoisonDelay", (object)Plugin.berrynanaMinPoisonDelay.Value); ((Dictionary)val).Add((object)"berrynanaMaxPoisonDelay", (object)Plugin.berrynanaMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"berrynanaMinPoisonDuration", (object)Plugin.berrynanaMinPoisonDuration.Value); ((Dictionary)val).Add((object)"berrynanaMaxPoisonDuration", (object)Plugin.berrynanaMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"berrynanaInstantPoisonChance", (object)Plugin.berrynanaInstantPoisonChance.Value); ((Dictionary)val).Add((object)"berrynanaMinInstantPoison", (object)Plugin.berrynanaMinInstantPoison.Value); ((Dictionary)val).Add((object)"berrynanaMaxInstantPoison", (object)Plugin.berrynanaMaxInstantPoison.Value); ((Dictionary)val).Add((object)"berrynanaInjuryHealChance", (object)Plugin.berrynanaInjuryHealChance.Value); ((Dictionary)val).Add((object)"berrynanaMinInjuryHeal", (object)Plugin.berrynanaMinInjuryHeal.Value); ((Dictionary)val).Add((object)"berrynanaMaxInjuryHeal", (object)Plugin.berrynanaMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"berrynanaHotHealChance", (object)Plugin.berrynanaHotHealChance.Value); ((Dictionary)val).Add((object)"berrynanaMinHotHeal", (object)Plugin.berrynanaMinHotHeal.Value); ((Dictionary)val).Add((object)"berrynanaMaxHotHeal", (object)Plugin.berrynanaMaxHotHeal.Value); ((Dictionary)val).Add((object)"clusterberryMinHunger", (object)Plugin.clusterberryMinHunger.Value); ((Dictionary)val).Add((object)"clusterberryMaxHunger", (object)Plugin.clusterberryMaxHunger.Value); ((Dictionary)val).Add((object)"clusterberryBonusChance", (object)Plugin.clusterberryBonusChance.Value); ((Dictionary)val).Add((object)"clusterberryMinBonus", (object)Plugin.clusterberryMinBonus.Value); ((Dictionary)val).Add((object)"clusterberryMaxBonus", (object)Plugin.clusterberryMaxBonus.Value); ((Dictionary)val).Add((object)"clusterberryDelayedPoisonChance", (object)Plugin.clusterberryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"clusterberryMinPoisonDelay", (object)Plugin.clusterberryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"clusterberryMaxPoisonDelay", (object)Plugin.clusterberryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"clusterberryMinPoisonDuration", (object)Plugin.clusterberryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"clusterberryMaxPoisonDuration", (object)Plugin.clusterberryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"clusterberryInstantPoisonChance", (object)Plugin.clusterberryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"clusterberryMinInstantPoison", (object)Plugin.clusterberryMinInstantPoison.Value); ((Dictionary)val).Add((object)"clusterberryMaxInstantPoison", (object)Plugin.clusterberryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"clusterberryInjuryHealChance", (object)Plugin.clusterberryInjuryHealChance.Value); ((Dictionary)val).Add((object)"clusterberryMinInjuryHeal", (object)Plugin.clusterberryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"clusterberryMaxInjuryHeal", (object)Plugin.clusterberryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"clusterberryHotHealChance", (object)Plugin.clusterberryHotHealChance.Value); ((Dictionary)val).Add((object)"clusterberryMinHotHeal", (object)Plugin.clusterberryMinHotHeal.Value); ((Dictionary)val).Add((object)"clusterberryMaxHotHeal", (object)Plugin.clusterberryMaxHotHeal.Value); ((Dictionary)val).Add((object)"kingberryMinHunger", (object)Plugin.kingberryMinHunger.Value); ((Dictionary)val).Add((object)"kingberryMaxHunger", (object)Plugin.kingberryMaxHunger.Value); ((Dictionary)val).Add((object)"kingberryBonusChance", (object)Plugin.kingberryBonusChance.Value); ((Dictionary)val).Add((object)"kingberryMinBonus", (object)Plugin.kingberryMinBonus.Value); ((Dictionary)val).Add((object)"kingberryMaxBonus", (object)Plugin.kingberryMaxBonus.Value); ((Dictionary)val).Add((object)"kingberryDelayedPoisonChance", (object)Plugin.kingberryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"kingberryMinPoisonDelay", (object)Plugin.kingberryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"kingberryMaxPoisonDelay", (object)Plugin.kingberryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"kingberryMinPoisonDuration", (object)Plugin.kingberryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"kingberryMaxPoisonDuration", (object)Plugin.kingberryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"kingberryInstantPoisonChance", (object)Plugin.kingberryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"kingberryMinInstantPoison", (object)Plugin.kingberryMinInstantPoison.Value); ((Dictionary)val).Add((object)"kingberryMaxInstantPoison", (object)Plugin.kingberryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"kingberryInjuryHealChance", (object)Plugin.kingberryInjuryHealChance.Value); ((Dictionary)val).Add((object)"kingberryMinInjuryHeal", (object)Plugin.kingberryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"kingberryMaxInjuryHeal", (object)Plugin.kingberryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"kingberryHotHealChance", (object)Plugin.kingberryHotHealChance.Value); ((Dictionary)val).Add((object)"kingberryMinHotHeal", (object)Plugin.kingberryMinHotHeal.Value); ((Dictionary)val).Add((object)"kingberryMaxHotHeal", (object)Plugin.kingberryMaxHotHeal.Value); ((Dictionary)val).Add((object)"prickleberryMinHunger", (object)Plugin.prickleberryMinHunger.Value); ((Dictionary)val).Add((object)"prickleberryMaxHunger", (object)Plugin.prickleberryMaxHunger.Value); ((Dictionary)val).Add((object)"prickleberryBonusChance", (object)Plugin.prickleberryBonusChance.Value); ((Dictionary)val).Add((object)"prickleberryMinBonus", (object)Plugin.prickleberryMinBonus.Value); ((Dictionary)val).Add((object)"prickleberryMaxBonus", (object)Plugin.prickleberryMaxBonus.Value); ((Dictionary)val).Add((object)"prickleberryDelayedPoisonChance", (object)Plugin.prickleberryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"prickleberryMinPoisonDelay", (object)Plugin.prickleberryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"prickleberryMaxPoisonDelay", (object)Plugin.prickleberryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"prickleberryMinPoisonDuration", (object)Plugin.prickleberryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"prickleberryMaxPoisonDuration", (object)Plugin.prickleberryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"prickleberryInstantPoisonChance", (object)Plugin.prickleberryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"prickleberryMinInstantPoison", (object)Plugin.prickleberryMinInstantPoison.Value); ((Dictionary)val).Add((object)"prickleberryMaxInstantPoison", (object)Plugin.prickleberryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"prickleberryInjuryHealChance", (object)Plugin.prickleberryInjuryHealChance.Value); ((Dictionary)val).Add((object)"prickleberryMinInjuryHeal", (object)Plugin.prickleberryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"prickleberryMaxInjuryHeal", (object)Plugin.prickleberryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"prickleberryHotHealChance", (object)Plugin.prickleberryHotHealChance.Value); ((Dictionary)val).Add((object)"prickleberryMinHotHeal", (object)Plugin.prickleberryMinHotHeal.Value); ((Dictionary)val).Add((object)"prickleberryMaxHotHeal", (object)Plugin.prickleberryMaxHotHeal.Value); ((Dictionary)val).Add((object)"winterberryMinHunger", (object)Plugin.winterberryMinHunger.Value); ((Dictionary)val).Add((object)"winterberryMaxHunger", (object)Plugin.winterberryMaxHunger.Value); ((Dictionary)val).Add((object)"winterberryBonusChance", (object)Plugin.winterberryBonusChance.Value); ((Dictionary)val).Add((object)"winterberryMinBonus", (object)Plugin.winterberryMinBonus.Value); ((Dictionary)val).Add((object)"winterberryMaxBonus", (object)Plugin.winterberryMaxBonus.Value); ((Dictionary)val).Add((object)"winterberryDelayedPoisonChance", (object)Plugin.winterberryDelayedPoisonChance.Value); ((Dictionary)val).Add((object)"winterberryMinPoisonDelay", (object)Plugin.winterberryMinPoisonDelay.Value); ((Dictionary)val).Add((object)"winterberryMaxPoisonDelay", (object)Plugin.winterberryMaxPoisonDelay.Value); ((Dictionary)val).Add((object)"winterberryMinPoisonDuration", (object)Plugin.winterberryMinPoisonDuration.Value); ((Dictionary)val).Add((object)"winterberryMaxPoisonDuration", (object)Plugin.winterberryMaxPoisonDuration.Value); ((Dictionary)val).Add((object)"winterberryInstantPoisonChance", (object)Plugin.winterberryInstantPoisonChance.Value); ((Dictionary)val).Add((object)"winterberryMinInstantPoison", (object)Plugin.winterberryMinInstantPoison.Value); ((Dictionary)val).Add((object)"winterberryMaxInstantPoison", (object)Plugin.winterberryMaxInstantPoison.Value); ((Dictionary)val).Add((object)"winterberryInjuryHealChance", (object)Plugin.winterberryInjuryHealChance.Value); ((Dictionary)val).Add((object)"winterberryMinInjuryHeal", (object)Plugin.winterberryMinInjuryHeal.Value); ((Dictionary)val).Add((object)"winterberryMaxInjuryHeal", (object)Plugin.winterberryMaxInjuryHeal.Value); ((Dictionary)val).Add((object)"winterberryHotHealChance", (object)Plugin.winterberryHotHealChance.Value); ((Dictionary)val).Add((object)"winterberryMinHotHeal", (object)Plugin.winterberryMinHotHeal.Value); ((Dictionary)val).Add((object)"winterberryMaxHotHeal", (object)Plugin.winterberryMaxHotHeal.Value); currentRoom.SetCustomProperties(val, (Hashtable)null, (WebFlags)null); } } } } [HarmonyPatch(typeof(MushroomManager), "GenerateEffectList")] internal class MushroomManagerPatch { private static void Prefix(MushroomManager __instance) { switch (Plugin.ShroomberryMode.Value) { case Plugin.ShroomberryModes.Vanilla: __instance.minBadEffects = 2; __instance.minGoodEffects = 2; break; case Plugin.ShroomberryModes.RandomBalanced: __instance.minBadEffects = 2; __instance.minGoodEffects = 2; break; case Plugin.ShroomberryModes.RandomMinimal: __instance.minBadEffects = 1; __instance.minGoodEffects = 1; break; case Plugin.ShroomberryModes.Chaos: __instance.minBadEffects = 0; __instance.minGoodEffects = 0; break; } } private static void Postfix(MushroomManager __instance) { if (Plugin.ShroomberryMode.Value != Plugin.ShroomberryModes.Vanilla) { ExtCollections.Shuffle((IList)__instance.mushroomEffects); } } } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ConstantExpectedAttribute : Attribute { public object? Min { get; set; } public object? Max { get; set; } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ExperimentalAttribute : Attribute { public string DiagnosticId { get; } public string? UrlFormat { get; set; } public ExperimentalAttribute(string diagnosticId) { DiagnosticId = diagnosticId; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SetsRequiredMembersAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class StringSyntaxAttribute : Attribute { public const string CompositeFormat = "CompositeFormat"; public const string DateOnlyFormat = "DateOnlyFormat"; public const string DateTimeFormat = "DateTimeFormat"; public const string EnumFormat = "EnumFormat"; public const string GuidFormat = "GuidFormat"; public const string Json = "Json"; public const string NumericFormat = "NumericFormat"; public const string Regex = "Regex"; public const string TimeOnlyFormat = "TimeOnlyFormat"; public const string TimeSpanFormat = "TimeSpanFormat"; public const string Uri = "Uri"; public const string Xml = "Xml"; public string Syntax { get; } public object?[] Arguments { get; } public StringSyntaxAttribute(string syntax) { Syntax = syntax; Arguments = new object[0]; } public StringSyntaxAttribute(string syntax, params object?[] arguments) { Syntax = syntax; Arguments = arguments; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class UnscopedRefAttribute : Attribute { } } namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiresPreviewFeaturesAttribute : Attribute { public string? Message { get; } public string? Url { get; set; } public RequiresPreviewFeaturesAttribute() { } public RequiresPreviewFeaturesAttribute(string? message) { Message = message; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CallerArgumentExpressionAttribute : Attribute { public string ParameterName { get; } public CallerArgumentExpressionAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CollectionBuilderAttribute : Attribute { public Type BuilderType { get; } public string MethodName { get; } public CollectionBuilderAttribute(Type builderType, string methodName) { BuilderType = builderType; MethodName = methodName; } } [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CompilerFeatureRequiredAttribute : Attribute { public const string RefStructs = "RefStructs"; public const string RequiredMembers = "RequiredMembers"; public string FeatureName { get; } public bool IsOptional { get; set; } public CompilerFeatureRequiredAttribute(string featureName) { FeatureName = featureName; } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute { public string[] Arguments { get; } public InterpolatedStringHandlerArgumentAttribute(string argument) { Arguments = new string[1] { argument }; } public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) { Arguments = arguments; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerAttribute : Attribute { } [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal static class IsExternalInit { } [AttributeUsage(AttributeTargets.Method, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ModuleInitializerAttribute : Attribute { } [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class OverloadResolutionPriorityAttribute : Attribute { public int Priority { get; } public OverloadResolutionPriorityAttribute(int priority) { Priority = priority; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] [ExcludeFromCodeCoverage] internal sealed class ParamCollectionAttribute : Attribute { } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiredMemberAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal sealed class RequiresLocationAttribute : Attribute { } [AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SkipLocalsInitAttribute : Attribute { } }