Decompiled source of PlantEverything v1.18.2
Advize_PlantEverything.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using JetBrains.Annotations; using Microsoft.CodeAnalysis; using ServerSync; using SoftReferenceableAssets; using TMPro; using UnityEngine; [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyFileVersion("1.18.2.0")] [assembly: Guid("85f3bb36-d51d-4e6c-a523-feb593b3156f")] [assembly: ComVisible(false)] [assembly: AssemblyTrademark("")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyProduct("Valheim Game Modification")] [assembly: AssemblyCompany("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyDescription("")] [assembly: AssemblyTitle("Advize_PlantEverything")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.18.2.0")] [module: <1a860a07-77c3-4a24-aba1-f305405251d3>RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [<4877d133-ed54-40c7-b660-c27d96334b29>Embedded] internal sealed class <4877d133-ed54-40c7-b660-c27d96334b29>EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [<4877d133-ed54-40c7-b660-c27d96334b29>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class <22212778-3fd3-499f-9437-82f4ef29dcef>NullableAttribute : Attribute { public readonly byte[] NullableFlags; public <22212778-3fd3-499f-9437-82f4ef29dcef>NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public <22212778-3fd3-499f-9437-82f4ef29dcef>NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [<4877d133-ed54-40c7-b660-c27d96334b29>Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class <44006564-8c69-4d53-aa62-dd5bf7c634bc>NullableContextAttribute : Attribute { public readonly byte Flag; public <44006564-8c69-4d53-aa62-dd5bf7c634bc>NullableContextAttribute(byte P_0) { Flag = P_0; } } [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [<4877d133-ed54-40c7-b660-c27d96334b29>Embedded] [CompilerGenerated] internal sealed class <1a860a07-77c3-4a24-aba1-f305405251d3>RefSafetyRulesAttribute : Attribute { public readonly int Version; public <1a860a07-77c3-4a24-aba1-f305405251d3>RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Advize_PlantEverything { internal static class ConfigEventHandlers { internal static void CoreSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, re-initializing mod", forceLog: false, (LogLevel)16); PlantEverything.InitPieceRefs(); PlantEverything.InitPieces(); PlantEverything.InitSaplingRefs(); PlantEverything.InitSaplings(); PlantEverything.InitCrops(); PlantEverything.InitVines(); PlantEverything.InitCultivator(); } internal static void PieceSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, re-initializing pieces", forceLog: false, (LogLevel)16); PlantEverything.InitPieceRefs(); PlantEverything.InitPieces(); PlantEverything.InitCultivator(); } internal static void SaplingSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, re-initializing saplings", forceLog: false, (LogLevel)16); PlantEverything.InitSaplingRefs(); PlantEverything.InitSaplings(); PlantEverything.InitCultivator(); } internal static void SeedSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, modifying TreeBase drop tables", forceLog: false, (LogLevel)16); PlantEverything.ModifyTreeDrops(); } internal static void CropSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, re-initializing crops", forceLog: false, (LogLevel)16); PlantEverything.InitCrops(); } internal static void VineSettingChanged(object o, EventArgs e) { PlantEverything.Dbgl("Config setting changed, re-initializing vines", forceLog: false, (LogLevel)16); PlantEverything.InitVines(); } internal static void ExtraResourcesChanged() { PlantEverything.Dbgl("ExtraResourcesChanged", forceLog: false, (LogLevel)16); PlantEverything.deserializedExtraResources.Clear(); foreach (string item2 in PlantEverything.config.SyncedExtraResources.Value) { ExtraResource item = PluginUtils.DeserializeExtraResource(item2); PlantEverything.deserializedExtraResources.Add(item); } if (Object.op_Implicit((Object)(object)ZNetScene.s_instance)) { PlantEverything.InitExtraResourceRefs(ZNetScene.s_instance); PieceSettingChanged(null, null); } } internal static void ExtraResourcesFileOrSettingChanged(object sender, EventArgs e) { PlantEverything.Dbgl("ExtraResources file or setting has changed", forceLog: false, (LogLevel)16); if (PlantEverything.config.IsSourceOfTruth) { if (PlantEverything.config.EnableExtraResources) { PlantEverything.Dbgl("IsSourceOfTruth: true, loading extra resources from disk", forceLog: false, (LogLevel)16); PluginUtils.LoadExtraResources(); } else { PlantEverything.config.SyncedExtraResources.AssignLocalValue(new List<string>()); } } else { PlantEverything.Dbgl("IsSourceOfTruth: false, extra resources will not be loaded from disk", forceLog: false, (LogLevel)16); } } } internal struct ExtraResource { public string prefabName; public string resourceName; public int resourceCost; public bool groundOnly; public string pieceName; public string pieceDescription; internal readonly bool IsValid() { if (prefabName != null && !prefabName.StartsWith("PE_Fake") && resourceName != null) { return resourceCost != 0; } return false; } } internal sealed class ModLocalization { public List<string> LocalizedStrings = new List<string>(); } internal static class PluginUtils { internal static bool HoldingCultivator { get { Player localPlayer = Player.m_localPlayer; return ((localPlayer == null) ? null : ((Humanoid)localPlayer).GetRightItem()?.m_shared.m_name) == "$item_cultivator"; } } internal static AssetBundle LoadAssetBundle(string fileName) { return AssetBundle.LoadFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("Advize_PlantEverything.Assets." + fileName)); } internal static GameObject CreatePrefab(string name) { GameObject obj = PlantEverything.assetBundle.LoadAsset<GameObject>(name); obj.SetActive(true); return obj; } internal static Piece GetOrAddPieceComponent(GameObject go) { return go.GetComponent<Piece>() ?? go.AddComponent<Piece>(); } internal static string GetPrefabName(Component c) { return ((Object)c.transform.root).name.Replace("(Clone)", ""); } internal static bool IsModdedPrefab(Component c) { if (Object.op_Implicit((Object)(object)c)) { return PlantEverything.prefabRefs.ContainsKey(GetPrefabName(c)); } return false; } internal static bool IsModdedPrefabOrSapling(string s) { if (!s.StartsWith("$pe")) { return s.EndsWith("_sapling"); } return true; } internal static void RemoveFromCultivator(List<PrefabDB> prefabs) { if (HoldingCultivator) { SheatheCultivator(); } PieceTable pieceTable = PlantEverything.prefabRefs["Cultivator"].GetComponent<ItemDrop>().m_itemData.m_shared.m_buildPieces; prefabs.ForEach(delegate(PrefabDB x) { pieceTable.m_pieces.Remove(x.Prefab); }); } internal static void SheatheCultivator() { PlantEverything.PELogger.LogWarning((object)"Cultivator updated through config change, unequipping cultivator"); ((Humanoid)Player.m_localPlayer).HideHandItems(false, true); } internal static Piece CreatePiece(PieceDB pdb) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) Piece orAddPieceComponent = GetOrAddPieceComponent(PlantEverything.prefabRefs[pdb.key]); orAddPieceComponent.m_name = (pdb.extraResource ? pdb.pieceName : ("$pe" + pdb.Name + "Name")); orAddPieceComponent.m_description = (pdb.extraResource ? pdb.pieceDescription : ("$pe" + pdb.Name + "Description")); orAddPieceComponent.m_category = (PieceCategory)0; orAddPieceComponent.m_cultivatedGroundOnly = (pdb.key.Contains("berryBush") || pdb.key.Contains("Pickable")) && PlantEverything.config.RequireCultivation; bool num = pdb.isGrounded ?? (!PlantEverything.config.PlaceAnywhere); bool groundOnly = num; orAddPieceComponent.m_groundPiece = num; orAddPieceComponent.m_groundOnly = groundOnly; orAddPieceComponent.m_canBeRemoved = pdb.canBeRemoved.GetValueOrDefault(true); orAddPieceComponent.m_targetNonPlayerBuilt = false; ((StaticTarget)orAddPieceComponent).m_randomTarget = PlantEverything.config.EnemiesTargetPieces; return orAddPieceComponent; } internal static Sprite CreateSprite(string fileName, Rect spriteSection) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) try { Texture2D val = LoadTexture(fileName); Sprite val2; if (PlantEverything.cachedSprites.ContainsKey(val)) { val2 = PlantEverything.cachedSprites[val]; } else { val2 = Sprite.Create(val, spriteSection, Vector2.zero); PlantEverything.cachedSprites.Add(val, val2); } return val2; } catch { PlantEverything.Dbgl("Unable to load texture", forceLog: true, (LogLevel)2); } return null; } private static Texture2D LoadTexture(string fileName) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown //IL_0058: Expected O, but got Unknown Texture2D val; if (PlantEverything.cachedTextures.ContainsKey(fileName)) { val = PlantEverything.cachedTextures[fileName]; } else { Stream? manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Advize_PlantEverything.Assets." + fileName); byte[] array = new byte[manifestResourceStream.Length]; manifestResourceStream.Read(array, 0, array.Length); Texture2D val2 = new Texture2D(0, 0); ImageConversion.LoadImage(val2, array); val = val2; PlantEverything.cachedTextures.Add(fileName, val); } return val; } internal static Texture2D DuplicateTexture(Sprite sprite) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown Rect textureRect = sprite.textureRect; int num = (int)((Rect)(ref textureRect)).width; textureRect = sprite.textureRect; int num2 = (int)((Rect)(ref textureRect)).height; Texture2D texture = sprite.texture; RenderTexture active = RenderTexture.active; RenderTexture temporary = RenderTexture.GetTemporary(((Texture)texture).width, ((Texture)texture).height, 0, (RenderTextureFormat)7, (RenderTextureReadWrite)2); Graphics.Blit((Texture)(object)texture, temporary); RenderTexture.active = temporary; Texture2D val = new Texture2D(((Texture)texture).width, ((Texture)texture).height); val.ReadPixels(new Rect(0f, 0f, (float)((Texture)texture).width, (float)((Texture)texture).height), 0, 0); val.Apply(); RenderTexture.active = active; RenderTexture.ReleaseTemporary(temporary); Texture2D val2 = new Texture2D(num, num2); textureRect = sprite.textureRect; int num3 = (int)((Rect)(ref textureRect)).x; textureRect = sprite.textureRect; Color[] pixels = val.GetPixels(num3, (int)((Rect)(ref textureRect)).y, num, num2); val2.SetPixels(pixels); val2.Apply(); return val2; } internal static Sprite ModifyTextureColor(Texture2D baseTexture, int width, int height, Color targetColor) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(width, height); float num = default(float); float num2 = default(float); float num3 = default(float); Color.RGBToHSV(targetColor, ref num, ref num2, ref num3); Color[] pixels = baseTexture.GetPixels(); float[] array = new float[width * height]; float[] array2 = new float[width * height]; float[] array3 = new float[width * height]; float num4 = default(float); float num5 = default(float); float num6 = default(float); for (int i = 0; i < width * height; i++) { Color.RGBToHSV(pixels[i], ref num4, ref num5, ref num6); array[i] = num - num4; array2[i] = num2 - num5; array3[i] = num3 - num6; } float num7 = default(float); float num8 = default(float); float num9 = default(float); for (int j = 0; j < width; j++) { for (int k = 0; k < height; k++) { Color pixel = baseTexture.GetPixel(j, k); float a = pixel.a; val.SetPixel(j, k, Color.clear); if (pixel.a != 0f) { Color.RGBToHSV(pixel, ref num7, ref num8, ref num9); num7 += array[j + k * width]; num8 += array2[j + k * width]; float num10 = ((array3[j + k * width] > 0f) ? 1.5f : (1f / 3f)); num9 *= num9 + array3[j + k * width] * num10; pixel = Color.HSVToRGB(num7, num8, num9); pixel.a = a; val.SetPixel(j, k, pixel); } } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, (float)width, (float)height), Vector2.zero); } private static string SerializeExtraResource(ExtraResource extraResource, bool prettyPrint = true) { return JsonUtility.ToJson((object)extraResource, prettyPrint); } internal static ExtraResource DeserializeExtraResource(string extraResource) { return JsonUtility.FromJson<ExtraResource>(extraResource); } private static void SaveExtraResources() { string text = Path.Combine(PlantEverything.CustomConfigPath, "PlantEverything_ExtraResources.cfg"); PlantEverything.Dbgl($"deserializedExtraResources.Count is {PlantEverything.deserializedExtraResources.Count}", forceLog: false, (LogLevel)16); string text2 = ""; text2 = text2 + SerializeExtraResource(PlantEverything.deserializedExtraResources[0]) + ";\n\n"; text2 = text2 + SerializeExtraResource(PlantEverything.deserializedExtraResources[1], prettyPrint: false) + ";\n"; File.WriteAllText(text, text2); PlantEverything.Dbgl("Serialized extraResources to " + text, forceLog: true, (LogLevel)16); } internal static void LoadExtraResources() { PlantEverything.Dbgl("LoadExtraResources", forceLog: false, (LogLevel)16); PlantEverything.deserializedExtraResources.Clear(); string text = "PlantEverything_ExtraResources.cfg"; string text2 = Path.Combine(PlantEverything.CustomConfigPath, text); try { string[] array = File.ReadAllText(text2).Split(new char[1] { ';' }); foreach (string text3 in array) { if (!Utility.IsNullOrWhiteSpace(text3)) { ExtraResource item = DeserializeExtraResource(text3); if (item.IsValid()) { PlantEverything.deserializedExtraResources.Add(item); } else if (!item.prefabName.StartsWith("PE_Fake")) { PlantEverything.Dbgl("Invalid resource, " + item.prefabName + ", configured in " + text + ", skipping entry", forceLog: true, (LogLevel)4); } } } PlantEverything.Dbgl("Loaded extra resources from " + text2, forceLog: true, (LogLevel)16); PlantEverything.Dbgl("Assigning local value from deserializedExtraResources", forceLog: false, (LogLevel)16); List<string> resourcesToSync = new List<string>(); PlantEverything.deserializedExtraResources.ForEach(delegate(ExtraResource er) { resourcesToSync.Add(SerializeExtraResource(er)); }); PlantEverything.config.SyncedExtraResources.AssignLocalValue(resourcesToSync); } catch (Exception ex) { if (ex is FileNotFoundException) { PlantEverything.Dbgl("Error loading data from " + text + ". Generating new file with example values", forceLog: true, (LogLevel)4); PlantEverything.deserializedExtraResources = StaticContent.GenerateExampleResources(); SaveExtraResources(); } else { PlantEverything.Dbgl("Error loading data from " + text + ". Additional resources have not been added", forceLog: false, (LogLevel)4); PlantEverything.deserializedExtraResources.Clear(); } } } internal static void LoadLocalizedStrings() { string path = PlantEverything.config.Language + "_PlantEverything.json"; string text = Path.Combine(PlantEverything.CustomConfigPath, path); try { foreach (string localizedString in JsonUtility.FromJson<ModLocalization>(File.ReadAllText(text)).LocalizedStrings) { string[] array = localizedString.Split(new char[1] { ':' }); StaticContent.DefaultLocalizedStrings.Remove(array[0]); StaticContent.DefaultLocalizedStrings.Add(array[0], array[1]); } PlantEverything.Dbgl("Loaded localized strings from " + text, forceLog: false, (LogLevel)16); return; } catch { PlantEverything.Dbgl("EnableLocalization is true but unable to load localized text file, generating new one from default English values", forceLog: true, (LogLevel)16); } SerializeDict(); } private static void SerializeDict() { string text = Path.Combine(PlantEverything.CustomConfigPath, "english_PlantEverything.json"); ModLocalization modLocalization = new ModLocalization(); foreach (KeyValuePair<string, string> defaultLocalizedString in StaticContent.DefaultLocalizedStrings) { modLocalization.LocalizedStrings.Add(defaultLocalizedString.Key + ":" + defaultLocalizedString.Value); } File.WriteAllText(text, JsonUtility.ToJson((object)modLocalization, true)); PlantEverything.Dbgl("Saved english localized strings to " + text, forceLog: false, (LogLevel)16); } } internal static class StaticContent { private const Biome TemperateBiomes = 25; internal const Biome AllBiomes = 895; internal static readonly int PlaceAnywhereHash = StringExtensionMethods.GetStableHashCode("pe_placeAnywhere"); internal static readonly int ModdedVineHash = StringExtensionMethods.GetStableHashCode("pe_ModdedVine"); internal static readonly int VineColorHash = StringExtensionMethods.GetStableHashCode("pe_VineColor"); internal static readonly int BerryColor1Hash = StringExtensionMethods.GetStableHashCode("pe_BerryColor1"); internal static readonly int BerryColor2Hash = StringExtensionMethods.GetStableHashCode("pe_BerryColor2"); internal static readonly int BerryColor3Hash = StringExtensionMethods.GetStableHashCode("pe_BerryColor3"); internal static readonly Vector3 ColorBlackVector3 = new Vector3(0.00012345f, 0.00012345f, 0.00012345f); internal static readonly Color ColorVineGreen = new Color(0.729f, 1f, 0.525f, 1f); internal static readonly Color ColorVineRed = new Color(0.867f, 0f, 0.278f, 1f); internal static readonly Color ColorBerryGreen = new Color(1f, 1f, 1f, 1f); internal static readonly Color ColorBerryRed = new Color(1f, 0f, 0f, 1f); internal static string[] layersForPieceRemoval = new string[4] { "item", "piece_nonsolid", "Default_small", "Default" }; internal static Dictionary<string, string> DefaultLocalizedStrings = new Dictionary<string, string> { { "AncientSaplingName", "Ancient Sapling" }, { "AncientSaplingDescription", "" }, { "YggaSaplingName", "Ygga Sapling" }, { "YggaSaplingDescription", "" }, { "AutumnBirchSaplingName", "Autumn Birch Sapling" }, { "AutumnBirchSaplingDescription", "Plains Variant" }, { "AshwoodSaplingName", "Ashwood Sapling" }, { "AshwoodSaplingDescription", "" }, { "VineAshSaplingName", "Custom Ashvine" }, { "VineAshSaplingDescription", "Plants an Ashvine sapling with the colours defined in the mod config." }, { "RaspberryBushName", "Raspberry Bush" }, { "RaspberryBushDescription", "Plant raspberries to grow raspberry bushes." }, { "BlueberryBushName", "Blueberry Bush" }, { "BlueberryBushDescription", "Plant blueberries to grow blueberry bushes." }, { "CloudberryBushName", "Cloudberry Bush" }, { "CloudberryBushDescription", "Plant cloudberries to grow cloudberry bushes." }, { "PickableMushroomName", "Pickable Mushrooms" }, { "PickableMushroomDescription", "Plant mushrooms to grow more pickable mushrooms." }, { "PickableYellowMushroomName", "Pickable Yellow Mushrooms" }, { "PickableYellowMushroomDescription", "Plant yellow mushrooms to grow more pickable yellow mushrooms." }, { "PickableBlueMushroomName", "Pickable Blue Mushrooms" }, { "PickableBlueMushroomDescription", "Plant blue mushrooms to grow more pickable blue mushrooms." }, { "PickableThistleName", "Pickable Thistle" }, { "PickableThistleDescription", "Plant thistle to grow more pickable thistle." }, { "PickableDandelionName", "Pickable Dandelion" }, { "PickableDandelionDescription", "Plant dandelion to grow more pickable dandelion." }, { "BeechSmallName", "Small Beech Tree" }, { "BeechSmallDescription", "Plant a small beech tree." }, { "FirSmallName", "Small Fir Tree" }, { "FirSmallDescription", "Plant a small fir tree." }, { "FirSmallDeadName", "Small Dead Fir Tree" }, { "FirSmallDeadDescription", "Plant a small dead fir tree." }, { "Bush01Name", "Small Bush 1" }, { "Bush01Description", "Plant a small bush." }, { "Bush02Name", "Small Bush 2" }, { "Bush02Description", "Plant a small bush." }, { "PlainsBushName", "Small Plains Bush" }, { "PlainsBushDescription", "Plant a bush native to the plains." }, { "Shrub01Name", "Small Shrub 1" }, { "Shrub01Description", "Plant a small shrub." }, { "Shrub02Name", "Small Shrub 2" }, { "Shrub02Description", "Plant a small shrub." }, { "YggaShootName", "Small Ygga Shoot" }, { "YggaShootDescription", "Plant a small ygga shoot." }, { "VinesName", "Vines" }, { "VinesDescription", "Plant vines." }, { "AshlandsFernName", "Ashlands Fern" }, { "AshlandsFernDescription", "Plant a fern native to the ashlands." }, { "PickableBranchName", "Pickable Branch" }, { "PickableBranchDescription", "Plant respawning pickable branches." }, { "PickableStoneName", "Pickable Stone" }, { "PickableStoneDescription", "Plant pickable stone." }, { "PickableFlintName", "Pickable Flint" }, { "PickableFlintDescription", "Plant respawning pickable flint." }, { "PickableSmokePuffName", "Pickable Smoke Puff" }, { "PickableSmokePuffDescription", "Plant smoke puffs to grow more pickable smoke puffs." }, { "PickableFiddleheadName", "Pickable Fiddlehead" }, { "PickableFiddleheadDescription", "Plant fiddlehead to grow more pickable fiddlehead." } }; internal static readonly List<string> VanillaPrefabRefs = new List<string> { "Acorn", "AncientSeed", "BeechSeeds", "BirchSeeds", "FirCone", "PineCone", "Sap", "Pickable_Branch", "Pickable_Dandelion", "Pickable_Fiddlehead", "Pickable_Flint", "Pickable_Mushroom", "Pickable_Mushroom_blue", "Pickable_Mushroom_yellow", "Pickable_SmokePuff", "Pickable_Stone", "Pickable_Thistle", "Cultivator", "sfx_build_cultivator", "vfx_Place_wood_pole", "sapling_barley", "sapling_carrot", "sapling_flax", "sapling_jotunpuffs", "sapling_magecap", "sapling_onion", "sapling_seedcarrot", "sapling_seedonion", "sapling_seedturnip", "sapling_turnip", "FernAshlands", "AshlandsTree3", "AshlandsTree4", "AshlandsTree5", "AshlandsTree6_big", "Beech1", "Beech_Sapling", "Beech_small1", "Birch1", "Birch1_aut", "Birch2", "Birch2_aut", "Birch_Sapling", "BlueberryBush", "Bush01", "Bush01_heath", "Bush02_en", "RaspberryBush", "CloudberryBush", "FirTree", "FirTree_Sapling", "FirTree_small", "FirTree_small_dead", "PineTree_Sapling", "Pinetree_01", "YggaShoot1", "YggaShoot2", "YggaShoot3", "YggaShoot_small1", "shrub_2", "shrub_2_heath", "SwampTree1", "vines", "VineAsh", "VineAsh_sapling", "Oak1", "Oak_Sapling" }; internal static readonly List<string> CustomPrefabRefs = new List<string> { "Ancient_Sapling", "Ygga_Sapling", "Autumn_Birch_Sapling", "Ashwood_Sapling", "Pickable_Dandelion_Picked", "Pickable_Thistle_Picked", "Pickable_Mushroom_Picked", "Pickable_Mushroom_yellow_Picked", "Pickable_Mushroom_blue_Picked", "Pickable_SmokePuff_Picked", "Pickable_Fiddlehead_Picked" }; private static Dictionary<GameObject, GameObject> treesToSeeds; internal static bool OverrideVines => PlantEverything.config.AshVineStyle != AshVineStyle.Custom; internal static bool OverrideBerries => PlantEverything.config.VineBerryStyle != VineBerryStyle.Custom; internal static Color VineColorFromConfig { get { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (PlantEverything.config.AshVineStyle != AshVineStyle.Custom) { if (PlantEverything.config.AshVineStyle != AshVineStyle.MeadowsGreen) { return ColorVineRed; } return ColorVineGreen; } return PlantEverything.config.VinesColor; } } internal static List<Color> BerryColorsFromConfig { get { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (PlantEverything.config.VineBerryStyle != VineBerryStyle.Custom) { if (PlantEverything.config.VineBerryStyle != VineBerryStyle.RedGrapes) { return Enumerable.Repeat<Color>(ColorBerryGreen, 3).ToList(); } return Enumerable.Repeat<Color>(ColorBerryRed, 3).ToList(); } return PlantEverything.config.BerryColors.Select((ConfigEntry<Color> x) => x.Value).ToList(); } } internal static Dictionary<GameObject, GameObject> TreesToSeeds { get { object obj = treesToSeeds; if (obj == null) { obj = new Dictionary<GameObject, GameObject> { { PlantEverything.prefabRefs["Birch1"], PlantEverything.prefabRefs["BirchSeeds"] }, { PlantEverything.prefabRefs["Birch2"], PlantEverything.prefabRefs["BirchSeeds"] }, { PlantEverything.prefabRefs["Birch2_aut"], PlantEverything.prefabRefs["BirchSeeds"] }, { PlantEverything.prefabRefs["Birch1_aut"], PlantEverything.prefabRefs["BirchSeeds"] }, { PlantEverything.prefabRefs["Oak1"], PlantEverything.prefabRefs["Acorn"] }, { PlantEverything.prefabRefs["SwampTree1"], PlantEverything.prefabRefs["AncientSeed"] }, { PlantEverything.prefabRefs["Beech1"], PlantEverything.prefabRefs["BeechSeeds"] }, { PlantEverything.prefabRefs["Pinetree_01"], PlantEverything.prefabRefs["PineCone"] }, { PlantEverything.prefabRefs["FirTree"], PlantEverything.prefabRefs["FirCone"] } }; treesToSeeds = (Dictionary<GameObject, GameObject>)obj; } return (Dictionary<GameObject, GameObject>)obj; } } internal static Vector3 ColorToVector3(Color color) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!(color == Color.black)) { return new Vector3(color.r, color.g, color.b); } return ColorBlackVector3; } internal static Color Vector3ToColor(Vector3 vector3) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (!(vector3 == ColorBlackVector3)) { return new Color(vector3.x, vector3.y, vector3.z); } return Color.black; } internal static List<ExtraResource> GenerateExampleResources() { return new List<ExtraResource>(2) { new ExtraResource { prefabName = "PE_FakePrefab1", resourceName = "PretendSeeds1", resourceCost = 1, groundOnly = true, pieceName = "PickableMushrooms", pieceDescription = "Plant this to grow more pickable mushrooms." }, new ExtraResource { prefabName = "PE_FakePrefab2", resourceName = "PretendSeeds2", resourceCost = 2, groundOnly = false } }; } internal static List<PieceDB> GeneratePieceRefs() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) bool enforceBiomes = PlantEverything.config.EnforceBiomes; List<PieceDB> list = new List<PieceDB>(10) { new PieceDB { key = "RaspberryBush", ResourceCost = PlantEverything.config.RaspberryCost, resourceReturn = PlantEverything.config.RaspberryReturn, respawnTime = PlantEverything.config.RaspberryRespawnTime, biome = (Biome)(enforceBiomes ? 1 : 0), icon = true, recover = PlantEverything.config.RecoverResources }, new PieceDB { key = "BlueberryBush", ResourceCost = PlantEverything.config.BlueberryCost, resourceReturn = PlantEverything.config.BlueberryReturn, respawnTime = PlantEverything.config.BlueberryRespawnTime, biome = (Biome)(enforceBiomes ? 8 : 0), icon = true, recover = PlantEverything.config.RecoverResources }, new PieceDB { key = "CloudberryBush", ResourceCost = PlantEverything.config.CloudberryCost, resourceReturn = PlantEverything.config.CloudberryReturn, respawnTime = PlantEverything.config.CloudberryRespawnTime, biome = (Biome)(enforceBiomes ? 16 : 0), icon = true, recover = PlantEverything.config.RecoverResources }, new PieceDB { key = "Pickable_Mushroom", ResourceCost = PlantEverything.config.MushroomCost, resourceReturn = PlantEverything.config.MushroomReturn, respawnTime = PlantEverything.config.MushroomRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableMushroom", isGrounded = true }, new PieceDB { key = "Pickable_Mushroom_yellow", ResourceCost = PlantEverything.config.YellowMushroomCost, resourceReturn = PlantEverything.config.YellowMushroomReturn, respawnTime = PlantEverything.config.YellowMushroomRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableYellowMushroom", isGrounded = true }, new PieceDB { key = "Pickable_Mushroom_blue", ResourceCost = PlantEverything.config.BlueMushroomCost, resourceReturn = PlantEverything.config.BlueMushroomReturn, respawnTime = PlantEverything.config.BlueMushroomRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableBlueMushroom", isGrounded = true }, new PieceDB { key = "Pickable_Thistle", ResourceCost = PlantEverything.config.ThistleCost, resourceReturn = PlantEverything.config.ThistleReturn, respawnTime = PlantEverything.config.ThistleRespawnTime, biome = (Biome)(enforceBiomes ? 8 : 0), recover = PlantEverything.config.RecoverResources, Name = "PickableThistle", isGrounded = true }, new PieceDB { key = "Pickable_Dandelion", ResourceCost = PlantEverything.config.DandelionCost, resourceReturn = PlantEverything.config.DandelionReturn, respawnTime = PlantEverything.config.DandelionRespawnTime, biome = (Biome)(enforceBiomes ? 1 : 0), recover = PlantEverything.config.RecoverResources, Name = "PickableDandelion", isGrounded = true }, new PieceDB { key = "Pickable_SmokePuff", ResourceCost = PlantEverything.config.SmokePuffCost, resourceReturn = PlantEverything.config.SmokePuffReturn, respawnTime = PlantEverything.config.SmokePuffRespawnTime, biome = (Biome)(enforceBiomes ? 32 : 0), recover = PlantEverything.config.RecoverResources, Name = "PickableSmokePuff", isGrounded = true }, new PieceDB { key = "Pickable_Fiddlehead", ResourceCost = PlantEverything.config.FiddleheadCost, resourceReturn = PlantEverything.config.FiddleheadReturn, respawnTime = PlantEverything.config.FiddleheadRespawnTime, biome = (Biome)(enforceBiomes ? 32 : 0), icon = true, recover = PlantEverything.config.RecoverResources, Name = "PickableFiddlehead", isGrounded = true, extraDrops = true } }; if (PlantEverything.config.EnableMiscFlora) { list.AddRange(new <>z__ReadOnlyArray<PieceDB>(new PieceDB[11] { new PieceDB { key = "Beech_small1", Resource = new KeyValuePair<string, int>("BeechSeeds", 1), icon = true, Name = "BeechSmall", canBeRemoved = false }, new PieceDB { key = "FirTree_small", Resource = new KeyValuePair<string, int>("FirCone", 1), icon = true, Name = "FirSmall", canBeRemoved = false }, new PieceDB { key = "FirTree_small_dead", Resource = new KeyValuePair<string, int>("FirCone", 1), icon = true, Name = "FirSmallDead", canBeRemoved = false }, new PieceDB { key = "Bush01", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, canBeRemoved = false }, new PieceDB { key = "Bush01_heath", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, Name = "Bush02", canBeRemoved = false }, new PieceDB { key = "Bush02_en", Resource = new KeyValuePair<string, int>("Wood", 3), icon = true, Name = "PlainsBush", canBeRemoved = false }, new PieceDB { key = "shrub_2", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, Name = "Shrub01", canBeRemoved = false }, new PieceDB { key = "shrub_2_heath", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, Name = "Shrub02", canBeRemoved = false }, new PieceDB { key = "YggaShoot_small1", Resources = new Dictionary<string, int> { { "YggdrasilWood", 1 }, { "Wood", 2 } }, icon = true, Name = "YggaShoot", canBeRemoved = false }, new PieceDB { key = "vines", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, recover = true, Name = "Vines", isGrounded = false, snapPoints = new List<Vector3> { new Vector3(1f, 0.5f, 0f), new Vector3(-1f, 0.5f, 0f), new Vector3(1f, -1f, 0f), new Vector3(-1f, -1f, 0f) } }, new PieceDB { key = "FernAshlands", Resource = new KeyValuePair<string, int>("Wood", 2), icon = true, Name = "AshlandsFern", isGrounded = true, canBeRemoved = false } })); } if (PlantEverything.config.EnableDebris) { list.AddRange(new <>z__ReadOnlyArray<PieceDB>(new PieceDB[3] { new PieceDB { key = "Pickable_Branch", ResourceCost = PlantEverything.config.PickableBranchCost, resourceReturn = PlantEverything.config.PickableBranchReturn, respawnTime = PlantEverything.config.PickableBranchRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableBranch", isGrounded = true }, new PieceDB { key = "Pickable_Stone", ResourceCost = PlantEverything.config.PickableStoneCost, resourceReturn = PlantEverything.config.PickableStoneReturn, respawnTime = PlantEverything.config.PickableStoneRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableStone", isGrounded = true, hideWhenPicked = true }, new PieceDB { key = "Pickable_Flint", ResourceCost = PlantEverything.config.PickableFlintCost, resourceReturn = PlantEverything.config.PickableFlintReturn, respawnTime = PlantEverything.config.PickableFlintRespawnTime, recover = PlantEverything.config.RecoverResources, Name = "PickableFlint", isGrounded = true } })); } if (PlantEverything.config.EnableExtraResources) { string[] array = layersForPieceRemoval; List<string> list2 = new List<string>(array.Length); list2.AddRange(array); List<string> list3 = list2; bool resolveMissingReferences = false; foreach (ExtraResource deserializedExtraResource in PlantEverything.deserializedExtraResources) { if (!PlantEverything.prefabRefs.ContainsKey(deserializedExtraResource.prefabName) || !Object.op_Implicit((Object)(object)PlantEverything.prefabRefs[deserializedExtraResource.prefabName])) { PlantEverything.Dbgl(deserializedExtraResource.prefabName + " is not in dictionary of prefab references or has a null value", forceLog: false, (LogLevel)4); resolveMissingReferences = true; continue; } ObjectDB instance = ObjectDB.instance; object obj; if (instance == null) { obj = null; } else { GameObject itemPrefab = instance.GetItemPrefab(deserializedExtraResource.resourceName); obj = ((itemPrefab != null) ? itemPrefab.GetComponent<ItemDrop>() : null); } if (!Object.op_Implicit((Object)obj)) { PlantEverything.Dbgl(deserializedExtraResource.prefabName + "'s required resource " + deserializedExtraResource.resourceName + " not found", forceLog: false, (LogLevel)4); resolveMissingReferences = true; continue; } list.Add(new PieceDB { key = deserializedExtraResource.prefabName, Resource = new KeyValuePair<string, int>(deserializedExtraResource.resourceName, deserializedExtraResource.resourceCost), isGrounded = deserializedExtraResource.groundOnly, extraResource = true, pieceName = ((deserializedExtraResource.pieceName == "") ? deserializedExtraResource.prefabName : deserializedExtraResource.pieceName), pieceDescription = deserializedExtraResource.pieceDescription }); Collider[] componentsInChildren = PlantEverything.prefabRefs[deserializedExtraResource.prefabName].GetComponentsInChildren<Collider>(); for (int i = 0; i < componentsInChildren.Length; i++) { string item = LayerMask.LayerToName(((Component)componentsInChildren[i]).gameObject.layer); list3.Add(item); } } layersForPieceRemoval = list3.Distinct().ToArray(); PlantEverything.resolveMissingReferences = resolveMissingReferences; } return list; } internal static List<SaplingDB> GenerateCustomSaplingRefs() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) List<SaplingDB> list = new List<SaplingDB>(4); list.Add(new SaplingDB { key = "Ashwood_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomes ? 57 : 895), source = "AshlandsTree3", Resources = new Dictionary<string, int> { { "BeechSeeds", 1 }, { "SulfurStone", 1 } }, icon = true, growTime = PlantEverything.config.AshwoodGrowthTime, growRadius = PlantEverything.config.AshwoodGrowRadius, minScale = PlantEverything.config.AshwoodMinScale, maxScale = PlantEverything.config.AshwoodMaxScale, grownPrefabs = (GameObject[])(object)new GameObject[4] { PlantEverything.prefabRefs["AshlandsTree3"], PlantEverything.prefabRefs["AshlandsTree4"], PlantEverything.prefabRefs["AshlandsTree5"], PlantEverything.prefabRefs["AshlandsTree6_big"] }, tolerateHeat = true }); list.Add(new SaplingDB { key = "Ygga_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomes ? 537 : 895), source = "YggaShoot_small1", Resource = new KeyValuePair<string, int>("Sap", 1), icon = true, growTime = PlantEverything.config.YggaGrowthTime, growRadius = PlantEverything.config.YggaGrowRadius, minScale = PlantEverything.config.YggaMinScale, maxScale = PlantEverything.config.YggaMaxScale, grownPrefabs = (GameObject[])(object)new GameObject[3] { PlantEverything.prefabRefs["YggaShoot1"], PlantEverything.prefabRefs["YggaShoot2"], PlantEverything.prefabRefs["YggaShoot3"] } }); list.Add(new SaplingDB { key = "Ancient_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomes ? 27 : 895), source = "SwampTree1", Resource = new KeyValuePair<string, int>("AncientSeed", 1), icon = true, growTime = PlantEverything.config.AncientGrowthTime, growRadius = PlantEverything.config.AncientGrowRadius, minScale = PlantEverything.config.AncientMinScale, maxScale = PlantEverything.config.AncientMaxScale, grownPrefabs = (GameObject[])(object)new GameObject[1] { PlantEverything.prefabRefs["SwampTree1"] } }); list.Add(new SaplingDB { key = "Autumn_Birch_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomes ? 25 : 895), source = "Birch1_aut", Resource = new KeyValuePair<string, int>("BirchSeeds", 1), icon = true, growTime = PlantEverything.config.AutumnBirchGrowthTime, growRadius = PlantEverything.config.AutumnBirchGrowRadius, minScale = PlantEverything.config.AutumnBirchMinScale, maxScale = PlantEverything.config.AutumnBirchMaxScale, grownPrefabs = (GameObject[])(object)new GameObject[2] { PlantEverything.prefabRefs["Birch1_aut"], PlantEverything.prefabRefs["Birch2_aut"] } }); return list; } internal static List<SaplingDB> GenerateVanillaSaplingRefs() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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) return new List<SaplingDB>(5) { new SaplingDB { key = "Beech_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomesVanilla ? 25 : 895), growTime = PlantEverything.config.BeechGrowthTime, growRadius = PlantEverything.config.BeechGrowRadius, minScale = PlantEverything.config.BeechMinScale, maxScale = PlantEverything.config.BeechMaxScale }, new SaplingDB { key = "PineTree_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomesVanilla ? 25 : 895), growTime = PlantEverything.config.PineGrowthTime, growRadius = PlantEverything.config.PineGrowRadius, minScale = PlantEverything.config.PineMinScale, maxScale = PlantEverything.config.PineMaxScale }, new SaplingDB { key = "FirTree_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomesVanilla ? 29 : 895), growTime = PlantEverything.config.FirGrowthTime, growRadius = PlantEverything.config.FirGrowRadius, minScale = PlantEverything.config.FirMinScale, maxScale = PlantEverything.config.FirMaxScale, tolerateCold = true }, new SaplingDB { key = "Birch_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomesVanilla ? 25 : 895), growTime = PlantEverything.config.BirchGrowthTime, growRadius = PlantEverything.config.BirchGrowRadius, minScale = PlantEverything.config.BirchMinScale, maxScale = PlantEverything.config.BirchMaxScale }, new SaplingDB { key = "Oak_Sapling", biome = (Biome)(PlantEverything.config.EnforceBiomesVanilla ? 25 : 895), growTime = PlantEverything.config.OakGrowthTime, growRadius = PlantEverything.config.OakGrowRadius, minScale = PlantEverything.config.OakMinScale, maxScale = PlantEverything.config.OakMaxScale } }; } internal static List<PrefabDB> GenerateCropRefs() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) bool enableCropOverrides = PlantEverything.config.EnableCropOverrides; bool enforceBiomesVanilla = PlantEverything.config.EnforceBiomesVanilla; return new List<PrefabDB>(10) { new PrefabDB { key = "sapling_barley", biome = (Biome)(enforceBiomesVanilla ? 16 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.BarleyCost), resourceReturn = (enableCropOverrides ? PlantEverything.config.BarleyReturn : 2) }, new PrefabDB { key = "sapling_carrot", biome = (Biome)(enforceBiomesVanilla ? 25 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.CarrotCost), resourceReturn = ((!enableCropOverrides) ? 1 : PlantEverything.config.CarrotReturn) }, new PrefabDB { key = "sapling_flax", biome = (Biome)(enforceBiomesVanilla ? 16 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.FlaxCost), resourceReturn = (enableCropOverrides ? PlantEverything.config.FlaxReturn : 2) }, new PrefabDB { key = "sapling_onion", biome = (Biome)(enforceBiomesVanilla ? 25 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.OnionCost), resourceReturn = ((!enableCropOverrides) ? 1 : PlantEverything.config.OnionReturn) }, new PrefabDB { key = "sapling_seedcarrot", biome = (Biome)(enforceBiomesVanilla ? 25 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.SeedCarrotCost), resourceReturn = (enableCropOverrides ? PlantEverything.config.SeedCarrotReturn : 3) }, new PrefabDB { key = "sapling_seedonion", biome = (Biome)(enforceBiomesVanilla ? 25 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.SeedOnionCost), resourceReturn = (enableCropOverrides ? PlantEverything.config.SeedOnionReturn : 3) }, new PrefabDB { key = "sapling_seedturnip", biome = (Biome)(enforceBiomesVanilla ? 539 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.SeedTurnipCost), resourceReturn = (enableCropOverrides ? PlantEverything.config.SeedTurnipReturn : 3) }, new PrefabDB { key = "sapling_turnip", biome = (Biome)(enforceBiomesVanilla ? 539 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.TurnipCost), resourceReturn = ((!enableCropOverrides) ? 1 : PlantEverything.config.TurnipReturn) }, new PrefabDB { key = "sapling_magecap", biome = (Biome)(enforceBiomesVanilla ? 512 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.MagecapCost), resourceReturn = ((!enableCropOverrides) ? 1 : PlantEverything.config.MagecapReturn), extraDrops = true }, new PrefabDB { key = "sapling_jotunpuffs", biome = (Biome)(enforceBiomesVanilla ? 512 : 895), resourceCost = ((!enableCropOverrides) ? 1 : PlantEverything.config.JotunPuffsCost), resourceReturn = ((!enableCropOverrides) ? 1 : PlantEverything.config.JotunPuffsReturn), extraDrops = true } }; } internal static List<ModdedPlantDB> GenerateCustomPlantRefs(List<GameObject> customPlants) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) List<ModdedPlantDB> list = new List<ModdedPlantDB>(); foreach (GameObject customPlant in customPlants) { Plant component = customPlant.GetComponent<Plant>(); list.Add(new ModdedPlantDB { key = ((Object)customPlant).name, biome = component.m_biome, tolerateCold = component.m_tolerateCold, tolerateHeat = component.m_tolerateHeat, minScale = component.m_minScale, maxScale = component.m_maxScale, growTime = component.m_growTime, growTimeMax = component.m_growTimeMax, growRadius = component.m_growRadius }); PlantEverything.prefabRefs[((Object)customPlant).name] = customPlant; } return list; } } internal sealed class ModConfig { internal class ConfigurationManagerAttributes { public bool? Browsable; [<22212778-3fd3-499f-9437-82f4ef29dcef>Nullable(2)] public string Category; public int? Order; public bool? ReadOnly; } [<44006564-8c69-4d53-aa62-dd5bf7c634bc>NullableContext(2)] [<22212778-3fd3-499f-9437-82f4ef29dcef>Nullable(0)] internal class ConfigManagerHelper { private static Assembly BepinexConfigManager => AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault([<44006564-8c69-4d53-aa62-dd5bf7c634bc>NullableContext(0)] (Assembly a) => a.GetName().Name == "ConfigurationManager"); private static Type ConfigManagerType => BepinexConfigManager?.GetType("ConfigurationManager.ConfigurationManager"); private static object ConfigManager { get { if (!(ConfigManagerType == null)) { return Chainloader.ManagerObject.GetComponent(ConfigManagerType); } return null; } } internal static void ReloadConfigDisplay() { ConfigManager?.GetType().GetMethod("BuildSettingList").Invoke(ConfigManager, Array.Empty<object>()); } } private readonly ConfigFile ConfigFile; private readonly ConfigSync ConfigSync; private readonly ConfigEntry<bool> serverConfigLocked; internal readonly ConfigEntry<int> nexusID; private readonly ConfigEntry<bool> enableDebugMessages; private readonly ConfigEntry<bool> showPickableSpawners; private readonly ConfigEntry<bool> enableMiscFlora; private readonly ConfigEntry<bool> enableDebris; private readonly ConfigEntry<bool> enableExtraResources; private readonly ConfigEntry<bool> snappableVines; private readonly ConfigEntry<bool> enableLocalization; private readonly ConfigEntry<string> language; private readonly ConfigEntry<string> disabledResourceNames; private readonly ConfigEntry<bool> requireCultivation; private readonly ConfigEntry<bool> placeAnywhere; private readonly ConfigEntry<bool> enforceBiomes; private readonly ConfigEntry<bool> enforceBiomesVanilla; private readonly ConfigEntry<bool> plantsRequireShielding; private readonly ConfigEntry<bool> canRemoveFlora; private readonly ConfigEntry<bool> recoverResources; private readonly ConfigEntry<bool> resourcesSpawnEmpty; private readonly ConfigEntry<bool> enemiesTargetPieces; private readonly ConfigEntry<int> raspberryCost; private readonly ConfigEntry<int> blueberryCost; private readonly ConfigEntry<int> cloudberryCost; private readonly ConfigEntry<int> raspberryRespawnTime; private readonly ConfigEntry<int> blueberryRespawnTime; private readonly ConfigEntry<int> cloudberryRespawnTime; private readonly ConfigEntry<int> raspberryReturn; private readonly ConfigEntry<int> blueberryReturn; private readonly ConfigEntry<int> cloudberryReturn; private readonly ConfigEntry<bool> enableCropOverrides; private readonly ConfigEntry<bool> overrideModdedCrops; private readonly ConfigEntry<bool> cropRequireCultivation; private readonly ConfigEntry<bool> cropRequireSunlight; private readonly ConfigEntry<bool> cropRequireGrowthSpace; private readonly ConfigEntry<bool> enemiesTargetCrops; private readonly ConfigEntry<float> cropMinScale; private readonly ConfigEntry<float> cropMaxScale; private readonly ConfigEntry<float> cropGrowTimeMin; private readonly ConfigEntry<float> cropGrowTimeMax; private readonly ConfigEntry<float> cropGrowRadius; private readonly ConfigEntry<int> barleyCost; private readonly ConfigEntry<int> barleyReturn; private readonly ConfigEntry<int> carrotCost; private readonly ConfigEntry<int> carrotReturn; private readonly ConfigEntry<int> flaxCost; private readonly ConfigEntry<int> flaxReturn; private readonly ConfigEntry<int> onionCost; private readonly ConfigEntry<int> onionReturn; private readonly ConfigEntry<int> seedCarrotCost; private readonly ConfigEntry<int> seedCarrotReturn; private readonly ConfigEntry<int> seedOnionCost; private readonly ConfigEntry<int> seedOnionReturn; private readonly ConfigEntry<int> seedTurnipCost; private readonly ConfigEntry<int> seedTurnipReturn; private readonly ConfigEntry<int> turnipCost; private readonly ConfigEntry<int> turnipReturn; private readonly ConfigEntry<int> magecapCost; private readonly ConfigEntry<int> magecapReturn; private readonly ConfigEntry<int> jotunPuffsCost; private readonly ConfigEntry<int> jotunPuffsReturn; private readonly ConfigEntry<int> pickableBranchCost; private readonly ConfigEntry<int> pickableBranchReturn; private readonly ConfigEntry<int> pickableBranchRespawnTime; private readonly ConfigEntry<int> pickableStoneCost; private readonly ConfigEntry<int> pickableStoneReturn; private readonly ConfigEntry<int> pickableStoneRespawnTime; private readonly ConfigEntry<int> pickableFlintCost; private readonly ConfigEntry<int> pickableFlintReturn; private readonly ConfigEntry<int> pickableFlintRespawnTime; private readonly ConfigEntry<int> mushroomCost; private readonly ConfigEntry<int> yellowMushroomCost; private readonly ConfigEntry<int> blueMushroomCost; private readonly ConfigEntry<int> smokePuffCost; private readonly ConfigEntry<int> mushroomRespawnTime; private readonly ConfigEntry<int> yellowMushroomRespawnTime; private readonly ConfigEntry<int> blueMushroomRespawnTime; private readonly ConfigEntry<int> smokePuffRespawnTime; private readonly ConfigEntry<int> mushroomReturn; private readonly ConfigEntry<int> yellowMushroomReturn; private readonly ConfigEntry<int> blueMushroomReturn; private readonly ConfigEntry<int> smokePuffReturn; private readonly ConfigEntry<int> thistleCost; private readonly ConfigEntry<int> dandelionCost; private readonly ConfigEntry<int> fiddleheadCost; private readonly ConfigEntry<int> thistleRespawnTime; private readonly ConfigEntry<int> dandelionRespawnTime; private readonly ConfigEntry<int> fiddleheadRespawnTime; private readonly ConfigEntry<int> thistleReturn; private readonly ConfigEntry<int> dandelionReturn; private readonly ConfigEntry<int> fiddleheadReturn; private readonly ConfigEntry<bool> overrideModdedSaplings; private readonly ConfigEntry<float> moddedSaplingMinScale; private readonly ConfigEntry<float> moddedSaplingMaxScale; private readonly ConfigEntry<float> moddedSaplingGrowthTime; private readonly ConfigEntry<float> moddedSaplingGrowRadius; private readonly ConfigEntry<float> birchMinScale; private readonly ConfigEntry<float> birchMaxScale; private readonly ConfigEntry<float> oakMinScale; private readonly ConfigEntry<float> oakMaxScale; private readonly ConfigEntry<float> ancientMinScale; private readonly ConfigEntry<float> ancientMaxScale; private readonly ConfigEntry<float> birchGrowthTime; private readonly ConfigEntry<float> oakGrowthTime; private readonly ConfigEntry<float> ancientGrowthTime; private readonly ConfigEntry<float> birchGrowRadius; private readonly ConfigEntry<float> oakGrowRadius; private readonly ConfigEntry<float> ancientGrowRadius; private readonly ConfigEntry<float> beechGrowthTime; private readonly ConfigEntry<float> pineGrowthTime; private readonly ConfigEntry<float> firGrowthTime; private readonly ConfigEntry<float> beechMinScale; private readonly ConfigEntry<float> beechMaxScale; private readonly ConfigEntry<float> pineMinScale; private readonly ConfigEntry<float> pineMaxScale; private readonly ConfigEntry<float> firMinScale; private readonly ConfigEntry<float> firMaxScale; private readonly ConfigEntry<float> beechGrowRadius; private readonly ConfigEntry<float> pineGrowRadius; private readonly ConfigEntry<float> firGrowRadius; private readonly ConfigEntry<float> yggaMinScale; private readonly ConfigEntry<float> yggaMaxScale; private readonly ConfigEntry<float> yggaGrowthTime; private readonly ConfigEntry<float> yggaGrowRadius; private readonly ConfigEntry<float> autumnBirchMinScale; private readonly ConfigEntry<float> autumnBirchMaxScale; private readonly ConfigEntry<float> autumnBirchGrowthTime; private readonly ConfigEntry<float> autumnBirchGrowRadius; private readonly ConfigEntry<float> ashwoodMinScale; private readonly ConfigEntry<float> ashwoodMaxScale; private readonly ConfigEntry<float> ashwoodGrowthTime; private readonly ConfigEntry<float> ashwoodGrowRadius; private readonly ConfigEntry<bool> enableSeedOverrides; private readonly ConfigEntry<int> seedDropMin; private readonly ConfigEntry<int> seedDropMax; private readonly ConfigEntry<int> treeDropMin; private readonly ConfigEntry<int> treeDropMax; private readonly ConfigEntry<float> dropChance; private readonly ConfigEntry<bool> oneOfEach; private readonly ConfigEntry<bool> enablePickableTimers; private readonly ConfigEntry<bool> enablePlantTimers; private readonly ConfigEntry<bool> growthAsPercentage; private readonly ConfigEntry<bool> enableVineOverrides; private readonly ConfigEntry<bool> enableCustomVinePiece; private readonly ConfigEntry<AshVineStyle> ashVineStyle; private readonly ConfigEntry<VineBerryStyle> vineBerryStyle; private readonly ConfigEntry<float> vineAttachDistance; private readonly ConfigEntry<float> vineGrowRadius; private readonly ConfigEntry<float> vineGrowthTime; private readonly ConfigEntry<int> vineBerryRespawnTime; private readonly ConfigEntry<int> vineBerryReturn; private readonly ConfigEntry<Color> ashVineCustomColor; private readonly ConfigEntry<Color> leftBerryColor; private readonly ConfigEntry<Color> centerBerryColor; private readonly ConfigEntry<Color> rightBerryColor; private readonly CustomSyncedValue<List<string>> extraResources; private readonly ConfigurationManagerAttributes seedSettingAtrributes = new ConfigurationManagerAttributes(); private readonly List<ConfigurationManagerAttributes> cropSettingAttributes = new List<ConfigurationManagerAttributes>(2) { new ConfigurationManagerAttributes(), new ConfigurationManagerAttributes { Order = 27 } }; private List<ConfigEntry<Color>> _BerryColors; internal bool EnableDebugMessages => enableDebugMessages.Value; internal bool ShowPickableSpawners => showPickableSpawners.Value; internal bool EnableMiscFlora => enableMiscFlora.Value; internal bool EnableDebris => enableDebris.Value; internal bool EnableExtraResources => enableExtraResources.Value; internal bool SnappableVines => snappableVines.Value; internal bool EnableLocalization => enableLocalization.Value; internal string Language => language.Value; internal string[] DisabledResourceNames => disabledResourceNames.Value.Split(new char[1] { ',' }); internal bool RequireCultivation => requireCultivation.Value; internal bool PlaceAnywhere => placeAnywhere.Value; internal bool EnforceBiomes => enforceBiomes.Value; internal bool EnforceBiomesVanilla => enforceBiomesVanilla.Value; internal bool PlantsRequireShielding => plantsRequireShielding.Value; internal bool CanRemoveFlora => canRemoveFlora.Value; internal bool RecoverResources => recoverResources.Value; internal bool ResourcesSpawnEmpty => resourcesSpawnEmpty.Value; internal bool EnemiesTargetPieces => enemiesTargetPieces.Value; internal int RaspberryCost => raspberryCost.Value; internal int BlueberryCost => blueberryCost.Value; internal int CloudberryCost => cloudberryCost.Value; internal int RaspberryRespawnTime => raspberryRespawnTime.Value; internal int BlueberryRespawnTime => blueberryRespawnTime.Value; internal int CloudberryRespawnTime => cloudberryRespawnTime.Value; internal int RaspberryReturn => raspberryReturn.Value; internal int BlueberryReturn => blueberryReturn.Value; internal int CloudberryReturn => cloudberryReturn.Value; internal bool EnableCropOverrides => enableCropOverrides.Value; internal bool OverrideModdedCrops => overrideModdedCrops.Value; internal float CropMinScale => cropMinScale.Value; internal float CropMaxScale => cropMaxScale.Value; internal float CropGrowTimeMin => Mathf.Max(cropGrowTimeMin.Value, 10f); internal float CropGrowTimeMax => Mathf.Max(cropGrowTimeMax.Value, 10f); internal float CropGrowRadius => cropGrowRadius.Value; internal bool CropRequireCultivation => cropRequireCultivation.Value; internal bool CropRequireSunlight => cropRequireSunlight.Value; internal bool CropRequireGrowthSpace => cropRequireGrowthSpace.Value; internal bool EnemiesTargetCrops => enemiesTargetCrops.Value; internal int BarleyCost => barleyCost.Value; internal int BarleyReturn => barleyReturn.Value; internal int CarrotCost => carrotCost.Value; internal int CarrotReturn => carrotReturn.Value; internal int FlaxCost => flaxCost.Value; internal int FlaxReturn => flaxReturn.Value; internal int OnionCost => onionCost.Value; internal int OnionReturn => onionReturn.Value; internal int SeedCarrotCost => seedCarrotCost.Value; internal int SeedCarrotReturn => seedCarrotReturn.Value; internal int SeedOnionCost => seedOnionCost.Value; internal int SeedOnionReturn => seedOnionReturn.Value; internal int SeedTurnipCost => seedTurnipCost.Value; internal int SeedTurnipReturn => seedTurnipReturn.Value; internal int TurnipCost => turnipCost.Value; internal int TurnipReturn => turnipReturn.Value; internal int MagecapCost => magecapCost.Value; internal int MagecapReturn => magecapReturn.Value; internal int JotunPuffsCost => jotunPuffsCost.Value; internal int JotunPuffsReturn => jotunPuffsReturn.Value; internal int PickableBranchCost => pickableBranchCost.Value; internal int PickableBranchReturn => pickableBranchReturn.Value; internal int PickableBranchRespawnTime => pickableBranchRespawnTime.Value; internal int PickableStoneCost => pickableStoneCost.Value; internal int PickableStoneReturn => pickableStoneReturn.Value; internal int PickableStoneRespawnTime => pickableStoneRespawnTime.Value; internal int PickableFlintCost => pickableFlintCost.Value; internal int PickableFlintReturn => pickableFlintReturn.Value; internal int PickableFlintRespawnTime => pickableFlintRespawnTime.Value; internal int MushroomCost => mushroomCost.Value; internal int YellowMushroomCost => yellowMushroomCost.Value; internal int BlueMushroomCost => blueMushroomCost.Value; internal int SmokePuffCost => smokePuffCost.Value; internal int MushroomRespawnTime => mushroomRespawnTime.Value; internal int YellowMushroomRespawnTime => yellowMushroomRespawnTime.Value; internal int BlueMushroomRespawnTime => blueMushroomRespawnTime.Value; internal int SmokePuffRespawnTime => smokePuffRespawnTime.Value; internal int MushroomReturn => mushroomReturn.Value; internal int YellowMushroomReturn => yellowMushroomReturn.Value; internal int BlueMushroomReturn => blueMushroomReturn.Value; internal int SmokePuffReturn => smokePuffReturn.Value; internal int ThistleCost => thistleCost.Value; internal int DandelionCost => dandelionCost.Value; internal int FiddleheadCost => fiddleheadCost.Value; internal int ThistleRespawnTime => thistleRespawnTime.Value; internal int DandelionRespawnTime => dandelionRespawnTime.Value; internal int FiddleheadRespawnTime => fiddleheadRespawnTime.Value; internal int ThistleReturn => thistleReturn.Value; internal int DandelionReturn => dandelionReturn.Value; internal int FiddleheadReturn => fiddleheadReturn.Value; internal bool OverrideModdedSaplings => overrideModdedSaplings.Value; internal float ModdedSaplingMinScale => moddedSaplingMinScale.Value; internal float ModdedSaplingMaxScale => moddedSaplingMaxScale.Value; internal float ModdedSaplingGrowthTime => moddedSaplingGrowthTime.Value; internal float ModdedSaplingGrowRadius => moddedSaplingGrowRadius.Value; internal float BirchMinScale => birchMinScale.Value; internal float BirchMaxScale => birchMaxScale.Value; internal float OakMinScale => oakMinScale.Value; internal float OakMaxScale => oakMaxScale.Value; internal float AncientMinScale => ancientMinScale.Value; internal float AncientMaxScale => ancientMaxScale.Value; internal float BirchGrowthTime => Mathf.Max(birchGrowthTime.Value, 10f); internal float OakGrowthTime => Mathf.Max(oakGrowthTime.Value, 10f); internal float AncientGrowthTime => Mathf.Max(ancientGrowthTime.Value, 10f); internal float BirchGrowRadius => birchGrowRadius.Value; internal float OakGrowRadius => oakGrowRadius.Value; internal float AncientGrowRadius => ancientGrowRadius.Value; internal float BeechGrowthTime => Mathf.Max(beechGrowthTime.Value, 10f); internal float PineGrowthTime => Mathf.Max(pineGrowthTime.Value, 10f); internal float FirGrowthTime => Mathf.Max(firGrowthTime.Value, 10f); internal float BeechMinScale => beechMinScale.Value; internal float BeechMaxScale => beechMaxScale.Value; internal float PineMinScale => pineMinScale.Value; internal float PineMaxScale => pineMaxScale.Value; internal float FirMinScale => firMinScale.Value; internal float FirMaxScale => firMaxScale.Value; internal float BeechGrowRadius => beechGrowRadius.Value; internal float PineGrowRadius => pineGrowRadius.Value; internal float FirGrowRadius => firGrowRadius.Value; internal float YggaMinScale => yggaMinScale.Value; internal float YggaMaxScale => yggaMaxScale.Value; internal float YggaGrowthTime => yggaGrowthTime.Value; internal float YggaGrowRadius => yggaGrowRadius.Value; internal float AutumnBirchMinScale => autumnBirchMinScale.Value; internal float AutumnBirchMaxScale => autumnBirchMaxScale.Value; internal float AutumnBirchGrowthTime => autumnBirchGrowthTime.Value; internal float AutumnBirchGrowRadius => autumnBirchGrowRadius.Value; internal float AshwoodMinScale => ashwoodMinScale.Value; internal float AshwoodMaxScale => ashwoodMaxScale.Value; internal float AshwoodGrowthTime => ashwoodGrowthTime.Value; internal float AshwoodGrowRadius => ashwoodGrowRadius.Value; internal bool EnableSeedOverrides => enableSeedOverrides.Value; internal int SeedDropMin => seedDropMin.Value; internal int SeedDropMax => seedDropMax.Value; internal int TreeDropMin => treeDropMin.Value; internal int TreeDropMax => treeDropMax.Value; internal float DropChance => dropChance.Value; internal bool OneOfEach => oneOfEach.Value; internal bool EnablePickableTimers => enablePickableTimers.Value; internal bool EnablePlantTimers => enablePlantTimers.Value; internal bool GrowthAsPercentage => growthAsPercentage.Value; internal bool EnableVineOverrides => enableVineOverrides.Value; internal bool EnableCustomVinePiece => enableCustomVinePiece.Value; internal float VinesAttachDistance => vineAttachDistance.Value; internal float VineGrowRadius => vineGrowRadius.Value; internal float VinesGrowthTime => vineGrowthTime.Value; internal int VineBerryRespawnTime => vineBerryRespawnTime.Value; internal int VineBerryReturn => vineBerryReturn.Value; internal Color VinesColor => ashVineCustomColor.Value; internal List<ConfigEntry<Color>> BerryColors { get { List<ConfigEntry<Color>> list = _BerryColors; if (list == null) { List<ConfigEntry<Color>> obj = new List<ConfigEntry<Color>>(3) { rightBerryColor, centerBerryColor, leftBerryColor }; List<ConfigEntry<Color>> list2 = obj; _BerryColors = obj; list = list2; } return list; } } internal AshVineStyle AshVineStyle => ashVineStyle.Value; internal VineBerryStyle VineBerryStyle => vineBerryStyle.Value; internal CustomSyncedValue<List<string>> SyncedExtraResources => extraResources; internal bool IsSourceOfTruth => ConfigSync.IsSourceOfTruth; private ConfigEntry<T> Config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true) { ConfigEntry<T> val = ConfigFile.Bind<T>(group, name, value, description); ConfigSync.AddConfigEntry<T>(val).SynchronizedConfig = synchronizedSetting; return val; } private ConfigEntry<T> Config<T>(string group, string name, T value, string description, bool synchronizedSetting = true) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown return Config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()), synchronizedSetting); } internal ModConfig(ConfigFile configFile, ConfigSync configSync) { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Expected O, but got Unknown //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Expected O, but got Unknown //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Expected O, but got Unknown //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Expected O, but got Unknown //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Expected O, but got Unknown //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Expected O, but got Unknown //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Expected O, but got Unknown //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Expected O, but got Unknown //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Expected O, but got Unknown //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Expected O, but got Unknown //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Expected O, but got Unknown //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Expected O, but got Unknown //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Expected O, but got Unknown //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Expected O, but got Unknown //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_075e: Expected O, but got Unknown //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0796: Expected O, but got Unknown //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Expected O, but got Unknown //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Expected O, but got Unknown //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Expected O, but got Unknown //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Expected O, but got Unknown //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Expected O, but got Unknown //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Expected O, but got Unknown //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_091e: Expected O, but got Unknown //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Expected O, but got Unknown //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098e: Expected O, but got Unknown //IL_09bb: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Expected O, but got Unknown //IL_09f3: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Expected O, but got Unknown //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Expected O, but got Unknown //IL_0a63: Unknown result type (might be due to invalid IL or missing references) //IL_0a6e: Expected O, but got Unknown //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa6: Expected O, but got Unknown //IL_0ad3: Unknown result type (might be due to invalid IL or missing references) //IL_0ade: Expected O, but got Unknown //IL_0e9c: Unknown result type (might be due to invalid IL or missing references) //IL_0ea7: Expected O, but got Unknown //IL_0ede: Unknown result type (might be due to invalid IL or missing references) //IL_0ee9: Expected O, but got Unknown //IL_0f20: Unknown result type (might be due to invalid IL or missing references) //IL_0f2b: Expected O, but got Unknown //IL_0f62: Unknown result type (might be due to invalid IL or missing references) //IL_0f6d: Expected O, but got Unknown //IL_0fa4: Unknown result type (might be due to invalid IL or missing references) //IL_0faf: Expected O, but got Unknown //IL_1486: Unknown result type (might be due to invalid IL or missing references) //IL_1491: Expected O, but got Unknown //IL_14b8: Unknown result type (might be due to invalid IL or missing references) //IL_14c3: Expected O, but got Unknown //IL_14ea: Unknown result type (might be due to invalid IL or missing references) //IL_14f5: Expected O, but got Unknown //IL_151c: Unknown result type (might be due to invalid IL or missing references) //IL_1527: Expected O, but got Unknown //IL_154e: Unknown result type (might be due to invalid IL or missing references) //IL_1559: Expected O, but got Unknown //IL_1584: Unknown result type (might be due to invalid IL or missing references) //IL_158f: Expected O, but got Unknown //IL_15b6: Unknown result type (might be due to invalid IL or missing references) //IL_15c1: Expected O, but got Unknown //IL_164b: Unknown result type (might be due to invalid IL or missing references) //IL_1656: Expected O, but got Unknown //IL_1689: Unknown result type (might be due to invalid IL or missing references) //IL_1694: Expected O, but got Unknown //IL_16c6: Unknown result type (might be due to invalid IL or missing references) //IL_16d1: Expected O, but got Unknown //IL_1703: Unknown result type (might be due to invalid IL or missing references) //IL_170e: Expected O, but got Unknown //IL_17d4: Unknown result type (might be due to invalid IL or missing references) //IL_17f9: Unknown result type (might be due to invalid IL or missing references) //IL_1804: Expected O, but got Unknown //IL_1829: Unknown result type (might be due to invalid IL or missing references) //IL_184e: Unknown result type (might be due to invalid IL or missing references) //IL_1859: Expected O, but got Unknown //IL_187e: Unknown result type (might be due to invalid IL or missing references) //IL_18a3: Unknown result type (might be due to invalid IL or missing references) //IL_18ae: Expected O, but got Unknown //IL_18d3: Unknown result type (might be due to invalid IL or missing references) //IL_18f8: Unknown result type (might be due to invalid IL or missing references) //IL_1903: Expected O, but got Unknown ConfigFile = configFile; ConfigSync = configSync; configFile.SaveOnConfigSet = false; serverConfigLocked = Config("General", "LockConfiguration", value: true, "If on, the configuration is locked and can be changed by server admins only."); nexusID = Config("General", "NexusID", 1042, new ConfigDescription("Nexus mod ID for updates.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Category = "Internal", ReadOnly = true } }), synchronizedSetting: false); enableDebugMessages = Config("General", "EnableDebugMessages", value: false, "Enable mod debug messages in console.", synchronizedSetting: false); showPickableSpawners = Config("General", "ShowPickableSpawners", value: true, "Continue to show mushroom, thistle, and dandelion spawners after being picked. (Requires world reload on client to take effect.)", synchronizedSetting: false); enableMiscFlora = Config("General", "EnableMiscFlora", value: true, "Enables small trees, bushes, shrubs, vines, and large mushrooms."); enableDebris = Config("General", "EnableDebris", value: true, "Allows for the placement of debris such as branches, flint, and stone."); enableExtraResources = Config("General", "EnableExtraResources", value: false, "When set to true, the mod will attempt to make user-defined prefabs buildable with the cultivator. Prefabs are defined in PlantEverything_ExtraResources.cfg. If file is not present, an example one will be generated for you."); snappableVines = Config("General", "SnappableVines", value: true, "Enables snap points when placing vines adjacently.", synchronizedSetting: false); enableLocalization = Config("General", "EnableLocalization", value: false, "Enable this to attempt to load localized text data for the language set in the following setting.", synchronizedSetting: false); language = Config("General", "Language", "english", "Language to be used. If EnableLocalization is enabled, game will attempt to load localized text from a file named {language}_PlantEverything.json.", synchronizedSetting: false); disabledResourceNames = Config("General", "DisabledResourceNames", "", new ConfigDescription("To disable specific resources added by this mod (and not add them to the cultivator), list their prefab names here separated by a comma. Names are case-sensitive.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = -1 } })); requireCultivation = Config("Difficulty", "RequireCultivation", value: false, "Pickable resources can only be planted on cultivated ground."); placeAnywhere = Config("Difficulty", "PlaceAnywhere", value: false, "Allow resources to be placed anywhere (not just on the ground). Does not apply to mushrooms or flowers."); enforceBiomes = Config("Difficulty", "EnforceBiomes", value: false, "Restrict modded plantables (pickables and saplings) to being placed in their respective biome."); enforceBiomesVanilla = Config("Difficulty", "EnforceBiomesVanilla", value: true, "Restrict vanilla plantables (crops and saplings) to being placed in their respective biome."); plantsRequireShielding = Config("Difficulty", "PlantsRequireShielding", value: true, "Controls whether plants need shielding to survive in hostile environments."); canRemoveFlora = Config("Difficulty", "CanRemoveFlora", value: false, "Allows the cultivator to deconstruct decorative flora placed by a player. Useful for creative game types."); recoverResources = Config("Difficulty", "RecoverResources", value: false, "Recover resources when pickables are removed with the cultivator. Applies to berries, mushrooms, and flowers."); resourcesSpawnEmpty = Config("Difficulty", "ResourcesSpawnEmpty", value: false, "Specifies whether resources should spawn empty or full. Applies to berry bushes, mushrooms, flowers, and debris."); enemiesTargetPieces = Config("Difficulty", "EnemiesTargetPieces", value: true, "When enabled, enemies may target and attack player placed resources added by the mod. If this setting is changed, pre-existing placed pieces will not be affected until the world/server is reloaded."); raspberryCost = Config("Berries", "RaspberryCost", 5, "Number of raspberries required to place a raspberry bush. Set to 0 to disable the ability to plant this resource."); blueberryCost = Config("Berries", "BlueberryCost", 5, "Number of blueberries required to place a blueberry bush. Set to 0 to disable the ability to plant this resource."); cloudberryCost = Config("Berries", "CloudberryCost", 5, "Number of cloudberries required to place a cloudberry bush. Set to 0 to disable the ability to plant this resource."); raspberryRespawnTime = Config("Berries", "RaspberryRespawnTime", 300, "Number of minutes it takes for a raspberry bush to respawn berries."); blueberryRespawnTime = Config("Berries", "BlueberryRespawnTime", 300, "Number of minutes it takes for a blueberry bush to respawn berries."); cloudberryRespawnTime = Config("Berries", "CloudberryRespawnTime", 300, "Number of minutes it takes for a cloudberry bush to respawn berries."); raspberryReturn = Config("Berries", "RaspberryReturn", 1, "Number of berries a raspberry bush will spawn."); blueberryReturn = Config("Berries", "BlueberryReturn", 1, "Number of berries a blueberry bush will spawn."); cloudberryReturn = Config("Berries", "CloudberryReturn", 1, "Number of berries a cloudberry bush will spawn."); enableCropOverrides = Config("Crops", "EnableCropOverrides", value: false, new ConfigDescription("Enables the [Crops] section of this config.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 28 } })); overrideModdedCrops = Config("Crops", "OverrideModdedCrops", value: true, new ConfigDescription("Applies all [Crops] settings to 3rd party modded crops.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[1] })); cropMinScale = Config("Crops", "CropMinScale", 0.9f, new ConfigDescription("The minimum scaling factor used to scale crops upon growth.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); cropMaxScale = Config("Crops", "CropMaxScale", 1.1f, new ConfigDescription("The maximum scaling factor used to scale crops upon growth.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); cropGrowTimeMin = Config("Crops", "CropGrowTimeMin", 4000f, new ConfigDescription("Minimum number of seconds it takes for crops to grow (will take at least 10 seconds after planting to grow).", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); cropGrowTimeMax = Config("Crops", "CropGrowTimeMax", 5000f, new ConfigDescription("Maximum number of seconds it takes for crops to grow (will take at least 10 seconds after planting to grow).", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); cropGrowRadius = Config("Crops", "CropGrowRadius", 0.5f, new ConfigDescription("Radius of free space required for crops to grow.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); cropRequireCultivation = Config("Crops", "CropsRequireCultivation", value: true, new ConfigDescription("Crops can only be planted on cultivated ground.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[1] })); cropRequireSunlight = Config("Crops", "CropsRequireSunlight", value: true, new ConfigDescription("Crops can only grow under an open sky.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[1] })); cropRequireGrowthSpace = Config("Crops", "CropsRequireGrowthSpace", value: true, new ConfigDescription("Crops require space to grow. This setting overrides the CropGrowRadius setting but without altering it, allowing grid spacing mods to continue functioning.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[1] })); enemiesTargetCrops = Config("Crops", "EnemiesTargetCrops", value: true, new ConfigDescription("Determines whether enemies will target and attack crops. If this setting is changed, pre-existing placed crops will not be affected until the world/server is reloaded.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[1] })); barleyCost = Config("Crops", "BarleyCost", 1, new ConfigDescription("Resource cost of planting barley.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); barleyReturn = Config("Crops", "BarleyReturn", 2, new ConfigDescription("Resources gained upon harvesting barley (does not apply to wild barley).", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); carrotCost = Config("Crops", "CarrotCost", 1, new ConfigDescription("Resource cost of planting carrots.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); carrotReturn = Config("Crops", "CarrotReturn", 1, new ConfigDescription("Resources gained upon harvesting carrots.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); flaxCost = Config("Crops", "FlaxCost", 1, new ConfigDescription("Resource cost of planting flax.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); flaxReturn = Config("Crops", "FlaxReturn", 2, new ConfigDescription("Resources gained upon harvesting flax (does not apply to wild flax).", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); onionCost = Config("Crops", "OnionCost", 1, new ConfigDescription("Resource cost of planting onions.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); onionReturn = Config("Crops", "OnionReturn", 1, new ConfigDescription("Resources gained upon harvesting onions.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedCarrotCost = Config("Crops", "SeedCarrotCost", 1, new ConfigDescription("Resource cost of planting seed carrots.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedCarrotReturn = Config("Crops", "SeedCarrotReturn", 3, new ConfigDescription("Resources gained upon harvesting seed carrots.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedOnionCost = Config("Crops", "SeedOnionCost", 1, new ConfigDescription("Resource cost of planting seed onions.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedOnionReturn = Config("Crops", "SeedOnionReturn", 3, new ConfigDescription("Resources gained upon harvesting seed onions.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedTurnipCost = Config("Crops", "SeedTurnipCost", 1, new ConfigDescription("Resource cost of planting seed turnips.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); seedTurnipReturn = Config("Crops", "SeedTurnipReturn", 3, new ConfigDescription("Resources gained upon harvesting seed turnips.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); turnipCost = Config("Crops", "TurnipCost", 1, new ConfigDescription("Resource cost of planting turnips.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); turnipReturn = Config("Crops", "TurnipReturn", 1, new ConfigDescription("Resources gained upon harvesting turnips.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); magecapCost = Config("Crops", "MagecapCost", 1, new ConfigDescription("Resource cost of planting magecap.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); magecapReturn = Config("Crops", "MagecapReturn", 3, new ConfigDescription("Resources gained upon harvesting magecap.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); jotunPuffsCost = Config("Crops", "JotunPuffsCost", 1, new ConfigDescription("Resource cost of planting Jotun puffs.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); jotunPuffsReturn = Config("Crops", "JotunPuffsReturn", 3, new ConfigDescription("Resources gained upon harvesting Jotun puffs.", (AcceptableValueBase)null, new object[1] { cropSettingAttributes[0] })); pickableBranchCost = Config("Debris", "PickableBranchCost", 5, "Amount of wood required to place branch debris. Set to 0 to disable the ability to plant this resource."); pickableBranchReturn = Config("Debris", "PickableBranchReturn", 1, "Amount of wood that branch debris drops when picked."); pickableBranchRespawnTime = Config("Debris", "PickableBranchRespawnTime", 240, "Number of minutes it takes for a pickable branch to respawn."); pickableStoneCost = Config("Debris", "PickableStoneCost", 1, "Amount of stone required to place stone debris. Set to 0 to disable the ability to plant this resource."); pickableStoneReturn = Config("Debris", "PickableStoneReturn", 1, "Amount of stones that stone debris drops when picked."); pickableStoneRespawnTime = Config("Debris", "PickableStoneRespawnTime", 0, "Number of minutes it takes for a pickable Stone to respawn."); pickableFlintCost = Config("Debris", "PickableFlintCost", 5, "Amount of flint required to place flint debris. Set to 0 to disable the ability to plant this resource."); pickableFlintReturn = Config("Debris", "PickableFlintReturn", 1, "Amount of flint that flint debris drops when picked."); pickableFlintRespawnTime = Config("Debris", "PickableFlintRespawnTime", 240, "Number of minutes it takes for pickable flint to respawn."); mushroomCost = Config("Mushrooms", "MushroomCost", 5, "Number of mushrooms required to place a pickable mushroom spawner. Set to 0 to disable the ability to plant this resource."); yellowMushroomCost = Config("Mushrooms", "YellowMushroomCost", 5, "Number of yellow mushrooms required to place a pickable yellow mushroom spawner. Set to 0 to disable the ability to plant this resource."); blueMushroomCost = Config("Mushrooms", "BlueMushroomCost", 5, "Number of blue mushrooms required to place a pickable blue mushroom spawner. Set to 0 to disable the ability to plant this resource."); smokePuffCost = Config("Mushrooms", "SmokepuffCost", 5, "Number of smoke puffs required to place a pickable smoke puff spawner. Set to 0 to disable the ability to plant this resource."); mushroomRespawnTime = Config("Mushrooms", "MushroomRespawnTime", 240, "Number of minutes it takes for mushrooms to respawn."); yellowMushroomRespawnTime = Config("Mushrooms", "YellowMushroomRespawnTime", 240, "Number of minutes it takes for yellow mushrooms to respawn."); blueMushroomRespawnTime = Config("Mushrooms", "BlueMushroomRespawnTime", 240, "Number of minutes it takes for blue mushrooms to respawn."); smokePuffRespawnTime = Config("Mushrooms", "SmokepuffRespawnTime", 240, "Number of minutes it takes for smoke puffs to respawn."); mushroomReturn = Config("Mushrooms", "MushroomReturn", 1, "Number of mushrooms a pickable mushroom spawner will spawn."); yellowMushroomReturn = Config("Mushrooms", "YellowMushroomReturn", 1, "Number of yellow mushrooms a pickable yellow mushroom spawner will spawn."); blueMushroomReturn = Config("Mushrooms", "BlueMushroomReturn", 1, "Number of blue mushrooms a pickable blue mushroom spawner will spawn."); smokePuffReturn = Config("Mushrooms", "SmokepuffReturn", 1, "Number of smoke puffs a pickable smoke puff spawner will spawn."); thistleCost = Config("Flowers", "ThistleCost", 5, "Number of thistle required to place a pickable thistle spawner. Set to 0 to disable the ability to plant this resource."); dandelionCost = Config("Flowers", "DandelionCost", 5, "Number of dandelion required to place a pickable dandelion spawner. Set to 0 to disable the ability to plant this resource."); fiddleheadCost = Config("Flowers", "FiddleheadCost", 15, "Number of fiddlehead required to place a pickable fiddlehead spawner. Set to 0 to disable the ability to plant this resource."); thistleRespawnTime = Config("Flowers", "ThistleRespawnTime", 240, "Number of minutes it takes for thistle to respawn."); dandelionRespawnTime = Config("Flowers", "DandelionRespawnTime", 240, "Number of minutes it takes for dandelion to respawn."); fiddleheadRespawnTime = Config("Flowers", "FiddleheadRespawnTime", 300, "Number of minutes it takes for fiddlehead to respawn."); thistleReturn = Config("Flowers", "ThistleReturn", 1, "Number of thistle a pickable thistle spawner will spawn."); dandelionReturn = Config("Flowers", "DandelionReturn", 1, "Number of dandelion a pickable dandelion spawner will spawn."); fiddleheadReturn = Config("Flowers", "FiddleheadReturn", 3, "Number of fiddlehead a pickable fiddlehead spawner will spawn."); overrideModdedSaplings = Config("Saplings", "OverrideModdedSaplings", value: false, new ConfigDescription("Applies all [Saplings]Modded* settings to 3rd party modded saplings.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 41 } })); moddedSaplingMinScale = Config("Saplings", "ModdedSaplingMinScale", 0.5f, new ConfigDescription("The minimum scaling factor used to scale a 3rd party modded tree upon growth.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 37 } })); moddedSaplingMaxScale = Config("Saplings", "ModdedSaplingMaxScale", 2f, new ConfigDescription("The maximum scaling factor used to scale a 3rd party modded tree upon growth.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 38 } })); moddedSaplingGrowthTime = Config("Saplings", "ModdedSaplingGrowthTime", 3000f, new ConfigDescription("Number of seconds it takes for a 3rd party modded tree to grow from its modded sapling (will take at least 10 seconds after planting to grow).", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 39 } })); moddedSaplingGrowRadius = Config("Saplings", "ModdedSaplingGrowRadius", 2f, new ConfigDescription("Radius of free space required for a 3rd party modded sapling to grow.", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 40 } })); birchMinScale = Config("Saplings", "BirchMinScale", 0.5f, "The minimum scaling factor used to scale a birch tree upon growth."); birchMaxScale = Config("Saplings", "BirchMaxScale", 1f, "The maximum scaling factor used to scale a birch tree upon growth."); oakMinScale = Config("Saplings", "OakMinScale", 0.7f, "The minimum scaling factor used to scale an oak tree upon growth."); oakMaxScale = Config("Saplings", "OakMaxScale", 0.9f, "The maximum scaling factor used to scale an oak tree upon growth."); ancientMinScale = Config("Saplings", "AncientMinScale", 0.5f, "The minimum scaling factor used to scale an ancient tree upon growth."); ancientMaxScale = Config("Saplings", "AncientMaxScale", 2f, "The maximum scaling factor used to scale an ancient tree upon growth."); birchGrowthTime = Config("Saplings", "BirchGrowthTime", 3000f, "Number of seconds it takes for a birch tree to grow from a birch sapling (will take at least 10 seconds after planting to grow)."); oakGrowthTime = Config("Saplings", "OakGrowthTime", 3000f, "Number of seconds it takes for an oak tree to grow from an oak sapling (will take at least 10 seconds after planting to grow)."); ancientGrowthTime = Config("Saplings", "AncientGrowthTime", 3000f, "Number of seconds it takes for an ancient tree to grow from an ancient sapling (will take at least 10 seconds after planting to grow)."); birchGrowRadius = Config("Saplings", "BirchGrowRadius", 2f, "Radius of free space required for a birch sapling to grow."); oakGrowRadius = Config("Saplings", "OakGrowRadius", 3f, "Radius of free space required for an oak sapling to grow."); ancientGrowRadius = Config("Saplings", "AncientGrowRadius", 2f, "Radius of free space required for an ancient sapling to grow."); beechGrowthTime = Con