Decompiled source of More Vanilla Build Prefabs v1.4.2
MoreVanillaBuildPrefabs.dll
Decompiled 5 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Configs; using HarmonyLib; using Jotunn.Configs; using Jotunn.Extensions; using Jotunn.Managers; using Jotunn.Utils; using Logging; using MVBP.Extensions; using MVBP.PieceManagement; using MVBP.PrefabManagement; using MVBP.Properties; using MVBP.SnapPoints; using MVBP.Utils; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("MoreVanillaBuildPrefabs")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("MoreVanillaBuildPrefabs")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("08a6f7d7-cf93-4931-aecd-abf2ce6ed34c")] [assembly: AssemblyFileVersion("1.4.2")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Logging { internal static class Log { internal enum InfoLevel { Low, Medium, High } private static ManualLogSource logSource; internal static ConfigEntry<InfoLevel> Verbosity { get; set; } internal static InfoLevel VerbosityLevel => Verbosity.Value; internal static bool IsVerbosityLow => Verbosity.Value >= InfoLevel.Low; internal static bool IsVerbosityMedium => Verbosity.Value >= InfoLevel.Medium; internal static bool IsVerbosityHigh => Verbosity.Value >= InfoLevel.High; internal static void Init(ManualLogSource logSource) { Log.logSource = logSource; } internal static void LogDebug(object data) { logSource.LogDebug(data); } internal static void LogError(object data) { logSource.LogError(data); } internal static void LogFatal(object data) { logSource.LogFatal(data); } internal static void LogMessage(object data) { logSource.LogMessage(data); } internal static void LogWarning(object data) { logSource.LogWarning(data); } internal static void LogInfo(object data, InfoLevel level = InfoLevel.Low) { if (Verbosity == null || VerbosityLevel >= level) { logSource.LogInfo(data); } } internal static void LogGameObject(GameObject prefab, bool includeChildren = false) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown LogInfo("***** " + ((Object)prefab).name + " *****"); Component[] components = prefab.GetComponents<Component>(); for (int i = 0; i < components.Length; i++) { LogComponent(components[i]); } if (!includeChildren) { return; } LogInfo("***** " + ((Object)prefab).name + " (children) *****"); foreach (Transform item in prefab.transform) { Transform val = item; if (Object.op_Implicit((Object)(object)val)) { LogInfo(" - " + ((Object)val).name); components = ((Component)val).GetComponents<Component>(); for (int i = 0; i < components.Length; i++) { LogComponent(components[i]); } } } } internal static void LogComponent(Component compo) { if (!Object.op_Implicit((Object)(object)compo)) { return; } try { LogInfo("--- " + ((object)compo).GetType().Name + ": " + ((Object)compo).name + " ---"); } catch (Exception ex) { LogError(ex.ToString()); LogWarning("Could not get type name for component!"); return; } try { foreach (PropertyInfo declaredProperty in AccessTools.GetDeclaredProperties(((object)compo).GetType())) { try { LogInfo($" - {declaredProperty.Name} = {declaredProperty.GetValue(compo)}"); } catch (Exception ex2) { LogError(ex2.ToString()); LogWarning("Could not get property: " + declaredProperty.Name + " for component!"); } } } catch (Exception ex3) { LogError(ex3.ToString()); LogWarning("Could not get properties for component!"); } try { foreach (FieldInfo declaredField in AccessTools.GetDeclaredFields(((object)compo).GetType())) { try { LogInfo($" - {declaredField.Name} = {declaredField.GetValue(compo)}"); } catch (Exception ex4) { LogError(ex4.ToString()); LogWarning("Could not get field: " + declaredField.Name + " for component!"); } } } catch (Exception ex5) { LogError(ex5.ToString()); LogWarning("Could not get fields for component!"); } } } } namespace MVBP { internal static class ModCompat { public const string ExtraSnapsGUID = "Searica.Valheim.ExtraSnapPointsMadeEasy"; public const string PlanBuildGUID = "marcopogo.PlanBuild"; public const string WackysDBGUID = "WackyMole.WackysDatabase"; public const string PlantEverythingGUID = "advize.PlantEverything"; private static bool? _ExtraSnapsInstalled; private static bool? _PlanBuildInstalled; private static bool? _WackysDBInstalled; private static bool? _PlantEverythingInstalled; private static MethodInfo ReInitExtraSnapPoints; private static MethodInfo PlanBuildScanTables; internal static bool IsPlantEverythingInstalled() { bool valueOrDefault = _PlantEverythingInstalled.GetValueOrDefault(); if (!_PlantEverythingInstalled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("advize.PlantEverything"); _PlantEverythingInstalled = valueOrDefault; } return _PlantEverythingInstalled.Value; } internal static bool IsWackysDBInstalled() { bool valueOrDefault = _WackysDBInstalled.GetValueOrDefault(); if (!_WackysDBInstalled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("WackyMole.WackysDatabase"); _WackysDBInstalled = valueOrDefault; } return _WackysDBInstalled.Value; } internal static bool IsPlanBuildInstalled() { bool valueOrDefault = _PlanBuildInstalled.GetValueOrDefault(); if (!_PlanBuildInstalled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("marcopogo.PlanBuild"); _PlanBuildInstalled = valueOrDefault; } return _PlanBuildInstalled.Value; } internal static bool IsExtraSnapsInstalled() { bool valueOrDefault = _ExtraSnapsInstalled.GetValueOrDefault(); if (!_ExtraSnapsInstalled.HasValue) { valueOrDefault = Chainloader.PluginInfos.ContainsKey("Searica.Valheim.ExtraSnapPointsMadeEasy"); _ExtraSnapsInstalled = valueOrDefault; } return _ExtraSnapsInstalled.Value; } internal static bool UpdateExtraSnaps() { if (!IsExtraSnapsInstalled()) { return false; } BaseUnityPlugin instance = Chainloader.PluginInfos["Searica.Valheim.ExtraSnapPointsMadeEasy"].Instance; if ((Object)(object)instance == (Object)null) { return false; } if (ReInitExtraSnapPoints == null) { try { ReInitExtraSnapPoints = AccessTools.Method(((object)instance).GetType(), "ReInitExtraSnapPoints", (Type[])null, (Type[])null); } catch (Exception data) { Log.LogWarning(data); } } try { ReInitExtraSnapPoints?.Invoke(instance, Array.Empty<object>()); } catch { Log.LogWarning("Could not re-init ExtraSnapPointsMadeEasy"); return false; } return true; } internal static bool UpdatePlanBuild() { if (!IsPlanBuildInstalled()) { return false; } BaseUnityPlugin instance = Chainloader.PluginInfos["marcopogo.PlanBuild"].Instance; if ((Object)(object)instance == (Object)null) { return false; } Log.LogInfo("PlanBuild is installed", Log.InfoLevel.Medium); try { MethodInfo planBuildUpdateScanPieces = GetPlanBuildUpdateScanPieces(); Log.LogInfo("Triggering PlanBuild.UpdateScanPieces", Log.InfoLevel.Medium); planBuildUpdateScanPieces?.Invoke(instance, Array.Empty<object>()); return true; } catch (Exception arg) { Log.LogWarning($"Failed to update PlanBuild:\n {arg}"); } return false; } private static MethodInfo GetPlanBuildUpdateScanPieces() { if (PlanBuildScanTables == null) { PlanBuildScanTables = AccessTools.Method("PlanBuild.PlanBuildPlugin:UpdateScanPieces", Type.EmptyTypes, (Type[])null); } return PlanBuildScanTables; } internal static bool IsWackyDBClone(string name) { if (!IsWackysDBInstalled()) { return false; } _ = (Object)(object)Chainloader.PluginInfos["WackyMole.WackysDatabase"].Instance == (Object)null; return false; } } [BepInPlugin("Searica.Valheim.MoreVanillaBuildPrefabs", "MoreVanillaBuildPrefabs", "1.4.2")] [BepInDependency("com.jotunn.jotunn", "2.23.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [SynchronizationMode(/*Could not decode attribute arguments.*/)] public class MorePrefabs : BaseUnityPlugin { public const string PluginName = "MoreVanillaBuildPrefabs"; internal const string Author = "Searica"; public const string PluginGUID = "Searica.Valheim.MoreVanillaBuildPrefabs"; public const string PluginVersion = "1.4.2"; private ConfigFileWatcher configFileWatcher; private const string MainSection = "Global"; private const string AdminSection = "Admin"; private const string CustomizationSection = "Customization"; private const string TextureSection = "Textures"; private static ConfigEntry<bool> PortalTexture; private static ConfigEntry<bool> DvergrWoodTexture; private const string UnsafeSection = "Unsafe Patches"; public static MorePrefabs Instance { get; private set; } private static ConfigEntry<bool> CreativeMode { get; set; } private static ConfigEntry<bool> ForceAllPrefabs { get; set; } internal static bool IsCreativeMode => CreativeMode.Value; internal static bool IsForceAllPrefabs => ForceAllPrefabs.Value; private static ConfigEntry<bool> CreatorShopAdminOnly { get; set; } private static ConfigEntry<bool> AdminDeconstructOtherPlayers { get; set; } internal static bool IsCreatorShopAdminOnly => CreatorShopAdminOnly.Value; internal static bool IsAdminDeconstructOtherPlayers => AdminDeconstructOtherPlayers.Value; private static ConfigEntry<bool> EnableHammerCrops { get; set; } private static ConfigEntry<bool> EnableComfortPatches { get; set; } private static ConfigEntry<bool> EnableSeasonalPieces { get; set; } private static ConfigEntry<bool> EnablePlayerBasePatches { get; set; } internal static bool IsEnableHammerCrops => EnableHammerCrops.Value; internal static bool IsEnableComfortPatches => EnableComfortPatches.Value; internal static bool IsEnableSeasonalPieces => EnableSeasonalPieces.Value; internal static bool IsEnablePlayerBasePatches => EnablePlayerBasePatches.Value; internal static bool PatchPortalTexture => PortalTexture.Value; internal static bool PatchDvergrWoodTexture => DvergrWoodTexture.Value; private static ConfigEntry<bool> EnableBedPatches { get; set; } private static ConfigEntry<bool> EnableFermenterPatches { get; set; } internal static bool IsEnableBedPatches => EnableBedPatches.Value; internal static bool IsEnableFermenterPatches => EnableFermenterPatches.Value; public void Awake() { Instance = this; Log.Init(((BaseUnityPlugin)this).Logger); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; SetUpConfigEntries(); ((BaseUnityPlugin)this).Config.Save(); Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "Searica.Valheim.MoreVanillaBuildPrefabs"); Game.isModded = true; configFileWatcher = new ConfigFileWatcher(((BaseUnityPlugin)this).Config); configFileWatcher.OnConfigFileReloaded += delegate { UpdateMananger.UpdatePlugin("Configuration file changed, re-initializing", saveConfig: false); }; SynchronizationManager.OnConfigurationWindowClosed += delegate { UpdateMananger.UpdatePlugin("Configuration changed in-game, re-initializing"); }; SynchronizationManager.OnConfigurationSynchronized += delegate { UpdateMananger.UpdatePlugin("Configuration synced, re-initializing"); }; } public void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } private void SetUpConfigEntries() { CreativeMode = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Global", "CreativeMode", false, "Set to true/enabled to enable pieces from the CreatorShop or Nature piece categories. By default, pieces set to those categories are not standard build pieces.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); ForceAllPrefabs = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Global", "ForceAllPrefabs", false, "If true/enabled, adds all prefabs to the hammer for building. Unless CreativeMode is also enabled it will not add pieces set to the CreatorShop or Nature category though.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); Log.Verbosity = ConfigFileExtensions.BindConfigInOrder<Log.InfoLevel>(((BaseUnityPlugin)this).Config, "Global", "Verbosity", Log.InfoLevel.Low, "Low will log basic information about the mod. Medium will log information that is useful for troubleshooting. High will log a lot of information, do not set it to this without good reason as it will slow down your game.", false, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); CreatorShopAdminOnly = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Admin", "CreatorShopAdminOnly", false, "Set to true/enabled to restrict placement and deconstruction of CreatorShop pieces to players with Admin status.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); AdminDeconstructOtherPlayers = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Admin", "AdminDeconstructOtherPlayers", true, "Set to true/enabled to allow admin players to deconstruct any pieces built by other players, even if doing so would normally be prevented (such as for CreatorShop or Nature pieces). Intended to prevent griefing via placement of indestructible objects.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnableHammerCrops = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Customization", "HammerCrops", false, "Set to true/enabled to enable placing vanilla crops with the hammer. Unless this setting is true Vanilla crops will not be available for placing with the hammer.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnableComfortPatches = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Customization", "ComfortPatches (Requires Restart)", true, "Set to true/enabled to patch new pieces to have comfort values like their vanilla counterparts.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnablePlayerBasePatches = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Customization", "PlayerBasePatches (Requires Restart)", true, "Set to true/enabled to patch player-built instances of new torches, fires, and beds so they suppress monster spawning just like their vanilla counterparts.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnableSeasonalPieces = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Customization", "SeasonalPieces", true, "Set to true/enabled to add all currently disabled seasonal pieces to the hammer build table.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); PortalTexture = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Textures", "PortalTexturePatch (Requires Restart)", false, "Set to true/enabled to change the texture of the new portal to appear as if it was created by those who dwell in the Mistlands. \nNote: change in appearance will not work for users without this mod.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); DvergrWoodTexture = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Textures", "DvergrWoodPatch (Requires Restart)", false, "Set to true/enabled to change the texture of the player built instances of of Dvergr wood floors and stairs to appear as if they were brand new. \nNote: change in appearance will not work for users without this mod.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnableBedPatches = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Unsafe Patches", "BedPatches (Requires Restart, Unsafe)", false, "Set to true/enabled to patch player-built instances of new beds so you can sleep in them.\nWARNING: enabling this setting can result in you losing your spawn point if had set your spawn using a patched bed and log in without this mod.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); EnableFermenterPatches = ConfigFileExtensions.BindConfigInOrder<bool>(((BaseUnityPlugin)this).Config, "Unsafe Patches", "FermenterPatches (Requires Restart, Unsafe)", false, "Set to true/enabled to patch player-built instances of fermenting barrels to function as a fermenter that are 30% faster than the vanilla fermenter.\nWARNING: enabling this setting can result in you losing the mead base that is fermenting if you load the area without this mod.", true, true, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); CreativeMode.SettingChanged += UpdateMananger.PieceSettingChanged; ForceAllPrefabs.SettingChanged += UpdateMananger.PieceSettingChanged; CreatorShopAdminOnly.SettingChanged += UpdateMananger.PieceSettingChanged; EnableHammerCrops.SettingChanged += UpdateMananger.PieceSettingChanged; AdminDeconstructOtherPlayers.SettingChanged += UpdateMananger.ModSettingChanged; Log.Verbosity.SettingChanged += UpdateMananger.ModSettingChanged; EnableSeasonalPieces.SettingChanged += UpdateMananger.SeasonalSettingChanged; } } [HarmonyPatch] internal static class UpdateMananger { private static bool HasInit; private static bool PieceSettingsChanged { get; set; } private static bool PlacementSettingsChanged { get; set; } private static bool ModSettingsChanged { get; set; } private static bool SeasonalSettingsChanged { get; set; } public static void PieceSettingChanged(object obj, EventArgs args) { if (!PieceSettingsChanged) { PieceSettingsChanged = true; } } public static void PlacementSettingChanged(object obj, EventArgs args) { if (!PlacementSettingsChanged) { PlacementSettingsChanged = true; } } public static void ModSettingChanged(object obj, EventArgs args) { if (!ModSettingsChanged) { ModSettingsChanged = true; } } public static void SeasonalSettingChanged(object obj, EventArgs args) { if (!SeasonalSettingsChanged) { SeasonalSettingsChanged = true; } } [HarmonyPrefix] [HarmonyPriority(600)] [HarmonyPatch(typeof(ZoneSystem), "Start")] private static void InitializeZNetPrefabManager() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (!(((Scene)(ref activeScene)).name != "main")) { Log.LogInfo("Performing mod initialization"); Stopwatch stopwatch = new Stopwatch(); if (Log.IsVerbosityMedium) { stopwatch.Start(); } Initialize(); if (Log.IsVerbosityMedium) { stopwatch.Stop(); Log.LogInfo($"Time to initialize: {stopwatch.ElapsedMilliseconds} ms"); } } } [HarmonyPostfix] [HarmonyPatch(typeof(ZNet), "Start")] private static void ApplyResourceRateToPieceResources() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo("Checking world modifiers", Log.InfoLevel.Medium); Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "main" && Game.m_resourceRate != 1f) { Log.LogInfo("World modifiers for resource rate are active, re-initializing"); Stopwatch stopwatch = new Stopwatch(); if (Log.IsVerbosityMedium) { stopwatch.Start(); } UpdatePieces(); if (Log.IsVerbosityMedium) { stopwatch.Stop(); Log.LogInfo($"Time to re-initialize: {stopwatch.ElapsedMilliseconds} ms"); } } } private static void Initialize() { if (!HasInit) { HasInit = true; Log.LogInfo("Initializing managers."); PieceCategoryManager.AddCustomPieceCategories(); SeasonalPieceMananger.Initialize(); SfxManager.Initialize(); ZNetPrefabManager.Initialize(); UpdatePieces(); ((BaseUnityPlugin)MorePrefabs.Instance).Config.Save(); } } internal static void UpdatePlugin(string msg, bool saveConfig = true) { if (HasInit && (PieceSettingsChanged || PlacementSettingsChanged || SeasonalSettingsChanged || ModSettingsChanged)) { Log.LogInfo(msg); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); if (PieceSettingsChanged) { UpdatePieces(); } if (SeasonalSettingsChanged) { SeasonalPieceMananger.UpdateSeasonalPieces(); } if (PlacementSettingsChanged) { ForceUnequipHammer(); } stopwatch.Stop(); Log.LogInfo($"Time to re-initialize: {stopwatch.ElapsedMilliseconds} ms"); if (PieceSettingsChanged || SeasonalSettingsChanged) { ModCompat.UpdateExtraSnaps(); ModCompat.UpdatePlanBuild(); } ModSettingsChanged = false; PieceSettingsChanged = false; PlacementSettingsChanged = false; SeasonalSettingsChanged = false; if (saveConfig) { ((BaseUnityPlugin)MorePrefabs.Instance).Config.Save(); } } } private static void UpdatePieces() { if (HasInit) { ZNetPrefabManager.ApplyPrefabConfigSettings(); UpdateHammerTable(); } } private static void UpdateHammerTable() { ForceUnequipHammer(); PieceTableManager.UpdatePieceTable(PieceManager.Instance.GetPieceTable(PieceTables.Hammer), PrefabConfigManager.GetPrefabConfigs()); } private static void ForceUnequipHammer() { if (Object.op_Implicit((Object)(object)Player.m_localPlayer) && ((Humanoid)Player.m_localPlayer).GetRightItem()?.m_shared.m_name == "$item_hammer") { Log.LogWarning("Hammer updated through config change, unequipping hammer"); ((Humanoid)Player.m_localPlayer).HideHandItems(false, true); } } } } namespace MVBP.Utils { internal static class ColliderManager { internal static void AddBoxCollider(GameObject prefab, Vector3 center, Vector3 size, bool local = true) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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) BoxCollider val = prefab.AddComponent<BoxCollider>(); if (local) { val.center = center; val.size = size; } else { val.center = prefab.transform.InverseTransformPoint(center); val.size = prefab.transform.InverseTransformPoint(size); } } internal static void PatchCollider(GameObject prefab) { //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_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) Bounds meshBounds = GetMeshBounds(prefab); AddBoxCollider(prefab, ((Bounds)(ref meshBounds)).center, ((Bounds)(ref meshBounds)).size); } internal static Bounds GetRendererBounds(GameObject prefab) { //IL_0002: 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) //IL_002e: Unknown result type (might be due to invalid IL or missing references) Bounds result = default(Bounds); Renderer[] componentsInChildren = prefab.GetComponentsInChildren<Renderer>(); foreach (Renderer val in componentsInChildren) { ((Bounds)(ref result)).Encapsulate(val.bounds); } return result; } internal static Bounds GetMeshBounds(GameObject prefab) { //IL_0002: 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) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) Bounds result = default(Bounds); MeshRenderer[] componentsInChildren = prefab.GetComponentsInChildren<MeshRenderer>(); foreach (MeshRenderer val in componentsInChildren) { ((Bounds)(ref result)).Encapsulate(((Renderer)val).bounds); } SkinnedMeshRenderer[] componentsInChildren2 = prefab.GetComponentsInChildren<SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer obj in componentsInChildren2) { Bounds bounds = obj.sharedMesh.bounds; Transform transform = ((Component)obj).transform; Vector3 val2 = transform.TransformPoint(((Bounds)(ref bounds)).max); Vector3 val3 = transform.TransformPoint(((Bounds)(ref bounds)).min); ((Bounds)(ref result)).Encapsulate(val2); ((Bounds)(ref result)).Encapsulate(val3); } return result; } internal static Bounds GetColliderBounds(GameObject prefab) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) Bounds result = default(Bounds); foreach (Collider allCollider in GetAllColliders(prefab)) { ((Bounds)(ref result)).Encapsulate(allCollider.bounds); } return result; } internal static void RemoveColliders(GameObject prefab) { Collider[] componentsInChildren = prefab.GetComponentsInChildren<Collider>(); for (int i = 0; i < componentsInChildren.Length; i++) { Object.DestroyImmediate((Object)(object)componentsInChildren[i]); } } internal static Vector3 GetCenter(GameObject prefab) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) List<Collider> allColliders = GetAllColliders(prefab); Vector3 val = Vector3.zero; foreach (Collider item in allColliders) { if (Object.op_Implicit((Object)(object)item)) { Vector3 val2 = val; Bounds bounds = item.bounds; val = val2 + ((Bounds)(ref bounds)).center; } } return val / (float)allColliders.Count; } internal static List<Collider> GetAllColliders(GameObject prefab) { Collider[] componentsInChildren = prefab.GetComponentsInChildren<Collider>(); List<Collider> list = new List<Collider> { Capacity = componentsInChildren.Length }; Collider[] array = componentsInChildren; foreach (Collider val in array) { if (val.enabled && ((Component)val).gameObject.activeInHierarchy && !val.isTrigger) { list.Add(val); } } return list; } } internal static class ReflectionUtils { public const BindingFlags AllBindings = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.SetField | BindingFlags.GetProperty | BindingFlags.SetProperty; internal static MethodInfo GetMethod(Type type, string name, Type[] types) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.SetField | BindingFlags.GetProperty | BindingFlags.SetProperty); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name == name && HasMatchingParameterTypes(0, types, methodInfo.GetParameters())) { return methodInfo; } } return null; } internal static MethodInfo GetGenericMethod(Type type, string name, int genericParameterCount, Type[] types) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.SetField | BindingFlags.GetProperty | BindingFlags.SetProperty); foreach (MethodInfo methodInfo in methods) { if (methodInfo.IsGenericMethod && methodInfo.ContainsGenericParameters && methodInfo.Name == name && HasMatchingParameterTypes(genericParameterCount, types, methodInfo.GetParameters())) { return methodInfo; } } return null; } private static bool HasMatchingParameterTypes(int genericParameterCount, Type[] types, ParameterInfo[] parameters) { if (parameters.Length < genericParameterCount || parameters.Length != types.Length) { return false; } int num = 0; for (int i = 0; i < parameters.Length; i++) { if (parameters[i].ParameterType.IsGenericParameter) { num++; } else if (types[i] != parameters[i].ParameterType) { return false; } } if (num != genericParameterCount) { return false; } return true; } } } namespace MVBP.SnapPoints { internal sealed class NamedSnapPoint { public Vector3 LocalPosition { get; } public string Name { get; } public NamedSnapPoint(Vector3 localPosition, string name) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) LocalPosition = localPosition; Name = name; } public NamedSnapPoint(float x, float y, float z, string name) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) LocalPosition = new Vector3(x, y, z); Name = name; } public override string ToString() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return $"{LocalPosition} [{Name}]"; } } internal static class SnapPointManager { private static readonly List<Vector3> corners = new List<Vector3>(8) { new Vector3(-1f, -1f, -1f), new Vector3(-1f, -1f, 1f), new Vector3(1f, -1f, 1f), new Vector3(1f, -1f, -1f), new Vector3(-1f, 1f, -1f), new Vector3(-1f, 1f, 1f), new Vector3(1f, 1f, 1f), new Vector3(1f, 1f, -1f) }; internal static void AddSnapPoints(GameObject gameObject, IEnumerable<Vector3> points) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) int num = 1; foreach (Vector3 point in points) { CreateSnapPoint(point, gameObject, string.Format("{0} {1}", "Snappoint", num++)); } } internal static void AddSnapPoints(GameObject gameObject, NamedSnapPoint[] namedSnapPoints) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) foreach (NamedSnapPoint namedSnapPoint in namedSnapPoints) { CreateSnapPoint(namedSnapPoint.LocalPosition, gameObject, namedSnapPoint.Name); } } private static void CreateSnapPoint(Vector3 pos, GameObject prefab, string snapPointName) { //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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(snapPointName); val.transform.parent = prefab.transform; val.transform.localPosition = pos; val.tag = "snappoint"; val.SetActive(false); } internal static void FixPieceLayers(GameObject gameObject) { Collider[] componentsInChildren = gameObject.GetComponentsInChildren<Collider>(); for (int i = 0; i < componentsInChildren.Length; i++) { ((Component)componentsInChildren[i]).gameObject.layer = LayerMask.NameToLayer("piece"); } } internal static void AddSnapPointToOrigin(GameObject gameObject) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) CreateSnapPoint(Vector3.zero, gameObject, "Origin"); } internal static void AddSnapPointsToBoxColliderCorners(GameObject gameObject, BoxCollider boxCollider) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)gameObject) || (Object)(object)boxCollider == (Object)null) { return; } List<Vector3> list = new List<Vector3>(); Vector3 val = boxCollider.size / 2f; foreach (Vector3 corner in corners) { list.Add(boxCollider.center + Vector3.Scale(corner, val)); } AddSnapPoints(gameObject, list); } internal static void AddSnapPointsToMeshCorners(GameObject gameObject, string meshName) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (!gameObject.TryGetMesh(meshName, out var mesh)) { return; } List<Vector3> list = new List<Vector3>(); Bounds bounds = mesh.bounds; foreach (Vector3 corner in corners) { list.Add(((Bounds)(ref bounds)).center + Vector3.Scale(corner, ((Bounds)(ref bounds)).extents)); } AddSnapPoints(gameObject, list); } } internal static class SnapPointNames { public const string TOP = "$hud_snappoint_top"; public const string BOTTOM = "$hud_snappoint_bottom"; public const string CENTER = "$hud_snappoint_center"; public const string CORNER = "$hud_snappoint_corner"; public const string EDGE = "$hud_snappoint_edge"; public const string MID = "$hud_snappoint_mid"; public const string INNER = "$hud_snappoint_inner"; public const string OUTER = "Outer"; public const string SNAPPOINT = "Snappoint"; public const string ORIGIN = "Origin"; public const string EXTRA = "Extra"; public const string TAG = "snappoint"; public const string DEFAULT_NAME = "_snappoint"; } } namespace MVBP.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] internal class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] internal static ResourceManager ResourceManager { get { if (resourceMan == null) { resourceMan = new ResourceManager("MVBP.Properties.Resources", typeof(Resources).Assembly); } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] internal static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static Bitmap texture_portal_MainTex => (Bitmap)ResourceManager.GetObject("texture_portal_MainTex", resourceCulture); internal static Bitmap texture_portal_n_BumpMap => (Bitmap)ResourceManager.GetObject("texture_portal_n_BumpMap", resourceCulture); internal Resources() { } } } namespace MVBP.PrefabManagement { internal class IconManager : MonoBehaviour { private static GameObject _gameObject; private static IconManager _instance; internal static IconManager Instance => CreateInstance(); private static IconManager CreateInstance() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown if ((Object)(object)_gameObject == (Object)null) { _gameObject = new GameObject(); Object.DontDestroyOnLoad((Object)(object)_gameObject); } if ((Object)(object)_instance == (Object)null) { _instance = _gameObject.AddComponent<IconManager>(); } return _instance; } private IconManager() { } public void GeneratePrefabIcons(IEnumerable<GameObject> prefabs) { ((MonoBehaviour)this).StartCoroutine(RenderCoroutine(prefabs)); } private IEnumerator RenderCoroutine(IEnumerable<GameObject> gameObjects) { Piece piece = default(Piece); foreach (GameObject gameObject in gameObjects) { if (!Object.op_Implicit((Object)(object)gameObject)) { Log.LogWarning("Null prefab, cannot render icon"); continue; } if (!gameObject.TryGetComponent<Piece>(ref piece)) { Log.LogWarning("Null piece, cannot render icon"); continue; } Sprite result = GenerateObjectIcon(gameObject); yield return (object)new WaitForEndOfFrame(); if ((Object)(object)result == (Object)null) { RandomItem[] array = ((Component)piece).GetComponent<PickableItem>()?.m_randomItemPrefabs; if (array != null && array.Length != 0) { ItemDrop itemPrefab = array[0].m_itemPrefab; GameObject val = ((itemPrefab != null) ? ((Component)itemPrefab).gameObject : null); if ((Object)(object)val != (Object)null) { result = GenerateObjectIcon(val); yield return (object)new WaitForEndOfFrame(); } } } piece.m_icon = result; piece = null; } ModCompat.UpdatePlanBuild(); } private static Sprite GenerateObjectIcon(GameObject obj) { //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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown RenderRequest val = new RenderRequest(obj) { Rotation = RenderManager.IsometricRotation, UseCache = PrefabConfigManager.ShouldCacheIcon(((Object)obj).name) }; return RenderManager.Instance.Render(val); } } [HarmonyPatch] internal static class PlayerPiecePatcher { private static readonly int PieceLayer = LayerMask.NameToLayer("piece"); private static readonly int CharacterTriggerLayer = LayerMask.NameToLayer("character_trigger"); private const float timeout = 1E+30f; private static readonly HashSet<string> DvergrWoodPieces = new HashSet<string> { "dvergrprops_wood_floor", "dvergrprops_wood_stair" }; [HarmonyPostfix] [HarmonyPriority(700)] [HarmonyPatch(typeof(Piece), "Awake")] private static void PieceAwakePostfix(Piece __instance) { ApplyPlayerBuiltPiecePatches(__instance); } [HarmonyPostfix] [HarmonyPriority(700)] [HarmonyPatch(typeof(Piece), "SetCreator")] private static void PieceSetCreatorPostfix(Piece __instance) { ApplyPlayerBuiltPiecePatches(__instance); } private static void ApplyPlayerBuiltPiecePatches(Piece piece) { if (!Object.op_Implicit((Object)(object)piece) || !Object.op_Implicit((Object)(object)((Component)piece).gameObject) || !piece.IsPlacedByPlayer()) { return; } string prefabName = ((Component)piece).gameObject.GetPrefabName(); if (ZNetPrefabManager.IsPatchedByMVBP(prefabName)) { ApplyDvergrPortalPatches(prefabName, piece); ApplyDoorPatches(prefabName, piece); ApplyTimedDestructionPatch(piece); ApplyContainerPatches(prefabName, piece); EditDestructibleSpawn(prefabName, piece); if (MorePrefabs.IsEnablePlayerBasePatches) { ApplyPlayerBasePatches(prefabName, ((Component)piece).gameObject); } if (MorePrefabs.IsEnableBedPatches) { ApplyBedPatches(prefabName, ((Component)piece).gameObject); } if (MorePrefabs.IsEnableFermenterPatches) { ApplyFermenterPatches(prefabName, ((Component)piece).gameObject); } if (MorePrefabs.PatchDvergrWoodTexture) { ApplyNewDvergrTexture(prefabName, ((Component)piece).gameObject); } } } private static bool TryGetZDO(Piece piece, out ZDO zdo) { if (!Object.op_Implicit((Object)(object)piece.m_nview) || !piece.m_nview.IsValid()) { zdo = null; return false; } zdo = piece.m_nview.GetZDO(); return zdo != null; } private static void ApplyDvergrPortalPatches(string prefabName, Piece piece) { if (!(prefabName != "portal") && TryGetZDO(piece, out var zdo)) { zdo.Set("HasFields", true); zdo.Set("HasTeleportWorld", true); zdo.Set("TeleportWorld.m_allowAlItems", true); zdo.Set("HasPiece", true); zdo.Set("Piece.m_description", "$piece_portal_stone_description"); } } private static void ApplyContainerPatches(string prefabName, Piece piece) { Container componentInChildren = ((Component)piece).gameObject.GetComponentInChildren<Container>(); if (!Object.op_Implicit((Object)(object)componentInChildren) || !TryGetZDO(piece, out var zdo)) { return; } zdo.Set("HasFields", true); zdo.Set("HasFieldsContainer", true); zdo.Set("Container.m_checkGuardStone", true); if (PrefabConfigManager.TryGetPrefabConfig(prefabName, out var prefabConfig, checkIfBound: true) && prefabConfig.InvWidth.HasValue && prefabConfig.InvHeight.HasValue) { Inventory inventory = componentInChildren.GetInventory(); if (inventory != null) { int value = (int)prefabConfig.InvWidth.Value; int value2 = (int)prefabConfig.InvHeight.Value; zdo.Set("HasFields", true); zdo.Set("HasFieldsContainer", true); zdo.Set("Container.m_width", value); zdo.Set("Container.m_height", value2); zdo.Set("HasFieldsInventory", true); zdo.Set("Inventory.m_width", value); zdo.Set("Inventory.m_height", value2); componentInChildren.m_width = value; componentInChildren.m_height = value2; inventory.m_width = value; inventory.m_height = value2; } } } private static void ApplyTimedDestructionPatch(Piece piece) { TimedDestruction val = default(TimedDestruction); if (((Component)piece).gameObject.TryGetComponent<TimedDestruction>(ref val) && TryGetZDO(piece, out var zdo)) { zdo.Set("HasFields", true); zdo.Set("HasFieldsTimedDestruction", true); zdo.Set("TimedDestruction.m_timeout", 1E+30f); val.m_timeout = 1E+30f; } } private static void EditDestructibleSpawn(string name, Piece piece) { Destructible val = default(Destructible); if (((Component)piece).TryGetComponent<Destructible>(ref val) && Object.op_Implicit((Object)(object)val) && TryGetZDO(piece, out var zdo) && PrefabConfigManager.TryGetPrefabConfig(name, out var prefabConfig, checkIfBound: true) && !string.IsNullOrEmpty(prefabConfig.SpawnOnDestroyed)) { GameObject prefab = ZNetScene.instance.GetPrefab(prefabConfig.SpawnOnDestroyed); if (Object.op_Implicit((Object)(object)prefab)) { zdo.Set("HasFields", true); zdo.Set("HasFieldsDestructible", true); zdo.Set("Destructible.m_spawnWhenDestroyed", prefabConfig.SpawnOnDestroyed); val.m_spawnWhenDestroyed = prefab; } } } private static void ApplyNewDvergrTexture(string name, GameObject gameObject) { if (DvergrWoodPieces.Contains(name)) { Renderer[] componentsInChildren = ((Component)gameObject.transform.Find("New")).GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].material.mainTexture = TextureHelper.GetNewDvergrTexture(); } } } private static void ApplyPlayerBasePatches(string name, GameObject gameObject) { if (PrefabConfigManager.TryGetPrefabConfig(name, out var prefabConfig, checkIfBound: true) && prefabConfig.PlayerBasePatch) { AddPlayerBase(gameObject); } } private static void AddPlayerBase(GameObject gameObject) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("PlayerBase"); val.transform.parent = gameObject.transform; val.transform.localScale = Vector3.one; val.transform.localPosition = Vector3.zero; val.layer = CharacterTriggerLayer; SphereCollider obj = val.AddComponent<SphereCollider>(); obj.center = Vector3.zero; obj.radius = 20f; ((Collider)obj).enabled = true; ((Collider)obj).isTrigger = true; EffectArea obj2 = val.AddComponent<EffectArea>(); ((Behaviour)obj2).enabled = true; obj2.m_type = (Type)4; } private static void ApplyDoorPatches(string name, Piece piece) { Door val = default(Door); if ((name == "dvergrtown_slidingdoor" || name == "dvergrtown_secretdoor") && ((Component)piece).TryGetComponent<Door>(ref val) && TryGetZDO(piece, out var zdo)) { val.m_canNotBeClosed = false; val.m_checkGuardStone = true; zdo.Set("HasFields", true); zdo.Set("HasFieldsDoor", true); zdo.Set("Door.m_canNotBeClosed", false); zdo.Set("Door.m_checkGuardStone", true); } } private static void ApplyBedPatches(string name, GameObject gameObject) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!(name == "goblin_bed")) { if (name == "dvergrprops_bed") { AddBed(gameObject, new Vector3(0f, 0.45f, 0f)); } } else { AddBed(gameObject, new Vector3(0f, 0.45f, 0f)); } } private static void AddBed(GameObject gameObject, Vector3 spawnPosition) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("spawnpoint"); val.transform.parent = gameObject.transform; val.transform.localPosition = spawnPosition; val.layer = PieceLayer; gameObject.AddComponent<Bed>().m_spawnPoint = val.transform; } private static void ApplyFermenterPatches(string name, GameObject gameObject) { //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown if (name == "dvergrprops_barrel") { ZNetScene instance = ZNetScene.instance; GameObject obj = ((instance != null) ? instance.GetPrefab("fermenter") : null); GameObject val = ((Component)obj.transform.Find("add_button")).gameObject.DeepCopy(); GameObject val2 = ((Component)obj.transform.Find("tap_button")).gameObject.DeepCopy(); GameObject val3 = ((Component)obj.transform.Find("roofcheckpoint")).gameObject.DeepCopy(); GameObject val4 = ((Component)obj.transform.Find("output")).gameObject.DeepCopy(); GameObject val5 = ((Component)obj.transform.Find("_ready")).gameObject.DeepCopy(); GameObject val6 = ((Component)obj.transform.Find("_fermenting")).gameObject.DeepCopy(); Fermenter component = obj.GetComponent<Fermenter>(); val.transform.parent = gameObject.transform; val2.transform.parent = gameObject.transform; val3.transform.parent = gameObject.transform; val4.transform.parent = gameObject.transform; val5.transform.parent = gameObject.transform; val6.transform.parent = gameObject.transform; val.transform.localScale = Vector3.one; val.transform.localPosition = new Vector3(0f, 0.75f, 0f); val2.transform.localPosition = new Vector3(0f, 0.5f, 0.9f); val4.transform.localPosition = new Vector3(0f, 0.5f, 1.2f); val3.transform.localPosition = new Vector3(0f, 1.5f, 0f); val5.transform.localPosition = new Vector3(0f, 0.75f, 0f); val6.transform.localPosition = new Vector3(0f, 0.75f, 0f); GameObject val7 = new GameObject("_top"); val7.transform.parent = gameObject.transform; bool activeSelf = gameObject.activeSelf; gameObject.SetActive(false); Fermenter obj2 = gameObject.AddComponent<Fermenter>(); obj2.m_addSwitch = val.GetComponent<Switch>(); obj2.m_tapSwitch = val2.GetComponent<Switch>(); obj2.m_roofCheckPoint = val3.transform; obj2.m_topObject = val7; obj2.m_readyObject = val5; obj2.m_fermentingObject = val6; obj2.m_outputPoint = val4.transform; obj2.m_tapDelay = component.m_tapDelay; obj2.m_updateCoverTimer = component.m_updateCoverTimer; obj2.m_fermentationDuration = component.m_fermentationDuration * 0.7f; obj2.m_name = component.m_name; obj2.m_addedEffects = component.m_addedEffects; obj2.m_tapEffects = component.m_tapEffects; obj2.m_spawnEffects = component.m_spawnEffects; obj2.m_conversion = component.m_conversion; gameObject.SetActive(activeSelf); AddPlayerBase(gameObject); } } } internal class PrefabConfig { private const char amountSeperator = ','; private const char reqSeperator = ';'; private readonly ReqConfigDrawer.RequirementsParser reqParser = new ReqConfigDrawer.RequirementsParser(',', ';'); public string Name; private readonly bool _enabled; private readonly bool _allowedInDungeons; private readonly string _category; private readonly string _craftingStation; private readonly string _requirements; private readonly bool _clipEverything; private readonly bool _clipGround; private readonly bool _placementPatch; public Vector3? PlacementOffset; public string PieceName; public string PieceDesc; public PieceClassification PieceGroup; public bool PlayerBasePatch; public string SpawnOnDestroyed; public uint? InvWidth; public uint? InvHeight; public bool IsBound { get; private set; } public GameObject Prefab { get; private set; } public Piece Piece { get; private set; } public ConfigEntry<bool> Enabled { get; private set; } public ConfigEntry<bool> AllowedInDungeons { get; private set; } public ConfigEntry<string> Category { get; private set; } public ConfigEntry<string> CraftingStation { get; private set; } public ConfigEntry<string> Requirements { get; private set; } public ConfigEntry<bool> PlacementPatch { get; private set; } public ConfigEntry<bool> ClipEverything { get; private set; } public ConfigEntry<bool> ClipGround { get; private set; } public PrefabConfig(string name, bool enabled = false, bool allowedInDungeons = false, string category = "CreatorShop", string craftingStation = "None", string requirements = "", bool clipEverything = false, bool clipGround = false, bool placementPatch = false, Vector3? placementOffset = null, string pieceName = null, string pieceDesc = null, PieceClassification pieceGroup = PieceClassification.None, bool playerBasePatch = false, string spawnOnDestroyed = null, uint? invWidth = null, uint? invHeight = null) { Name = name; PlacementOffset = placementOffset; PieceName = pieceName; PieceDesc = pieceDesc; PieceGroup = pieceGroup; PlayerBasePatch = playerBasePatch; SpawnOnDestroyed = spawnOnDestroyed; InvWidth = invWidth; InvHeight = invHeight; _enabled = enabled; _allowedInDungeons = allowedInDungeons; _category = category; _craftingStation = craftingStation; _requirements = (string.IsNullOrWhiteSpace(requirements) ? reqParser.GetPlaceholderReqString() : requirements); _clipEverything = clipEverything; _clipGround = clipGround; _placementPatch = placementPatch; } public void BindToConfig(ConfigFile configFile, GameObject prefab, Piece piece) { //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown Prefab = prefab; Piece = piece; string name = Name; Enabled = ConfigFileExtensions.BindConfigInOrder<bool>(configFile, name, "Enabled", _enabled, "If true then allow this prefab to be built and deconstructed. Note: this setting is ignored if ForceAllPrefabs is true. It is also ignored if the piece category is CreatorShop or Nature and CreativeMode is false.", true, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); AllowedInDungeons = ConfigFileExtensions.BindConfigInOrder<bool>(configFile, name, "AllowedInDungeons", _allowedInDungeons, "If true then this prefab can be built inside dungeon zones.", true, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); Category = ConfigFileExtensions.BindConfigInOrder<string>(configFile, name, "Category", _category, "A string defining the tab the prefab shows up on in the hammer build table.", true, false, true, (AcceptableValueBase)(object)HammerCategories.GetAcceptableValueList(), (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); CraftingStation = ConfigFileExtensions.BindConfigInOrder<string>(configFile, name, "CraftingStation", _craftingStation, "A string defining the crafting station required to built the prefab.", true, false, true, (AcceptableValueBase)(object)CraftingStations.GetAcceptableValueList(), (Action<ConfigEntryBase>)null, (ConfigurationManagerAttributes)null); Requirements = ConfigFileExtensions.BindConfigInOrder<string>(configFile, name, "Requirements", _requirements, "Resources required to build the prefab. Formatted as: itemID,amount;itemID,amount where itemID is the in-game identifier for the resource and amount is an integer.", true, false, true, (AcceptableValueBase)(object)new ReqConfigDrawer.AcceptableValueReqConfigNote(), ReqConfigDrawer.ReqConfigCustomDrawer(), (ConfigurationManagerAttributes)null); PlacementPatch = ConfigFileExtensions.BindConfigInOrder<bool>(configFile, name, "PlacementPatch", _placementPatch, "Set to true to enable collision patching during placement of the piece. Recommended to try this if the piece is not appearing when you go to place it.\n(If this setting fixes the issue please let me know via Github or Discord so I can change the default settings.)", true, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { ReadOnly = _placementPatch }); ClipEverything = ConfigFileExtensions.BindConfigInOrder<bool>(configFile, name, "ClipEverything", _clipEverything, "Set to true to allow piece to clip through everything during placement. Recommended to try this if the piece is not appearing when you go to place it.\n(If this setting fixes the issue please let me know via Github or Discord so I can change the default settings.)", true, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { ReadOnly = _clipEverything }); ClipGround = ConfigFileExtensions.BindConfigInOrder<bool>(configFile, name, "ClipGround", _clipGround, "Set to true to allow piece to clip through ground during placement.Recommended to try this if the piece is not floating when you try to place it.\n(If this setting fixes the issue please let me know via Github or Discord so I can change the default settings.)", true, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { ReadOnly = _clipGround }); IsBound = true; } public List<RequirementConfig> ReadRequirements() { return reqParser.Deserialize(Requirements.Value); } } internal static class PrefabConfigManager { private static readonly HashSet<string> DoNotCacheIcon = new HashSet<string> { "portal", "dvergrprops_wood_floor", "dvergrprops_wood_stair" }; private static readonly Dictionary<string, PrefabConfig> PrefabConfigMap; internal static bool ShouldCacheIcon(string name) { return !DoNotCacheIcon.Contains(name); } public static List<PrefabConfig> GetPrefabConfigs(bool checkIfBound = true) { if (!checkIfBound) { return PrefabConfigMap.Values.ToList(); } return PrefabConfigMap.Values.Where((PrefabConfig x) => x.IsBound).ToList(); } internal static bool NeedsCollisionPatchForGhost(string prefabName) { if (TryGetPrefabConfig(prefabName, out var prefabConfig, checkIfBound: true)) { return prefabConfig.PlacementPatch.Value; } return false; } internal static bool IsPrefabEnabled(GameObject gameObject) { if (TryGetPrefabConfig(gameObject.GetPrefabName(), out var prefabConfig, checkIfBound: true)) { if (!prefabConfig.Enabled.Value) { return MorePrefabs.IsForceAllPrefabs; } return true; } return false; } public static bool TryGetPrefabConfig(GameObject prefab, out PrefabConfig prefabConfig, bool checkIfBound = false) { return TryGetPrefabConfig(prefab.GetPrefabName(), out prefabConfig, checkIfBound); } public static bool TryGetPrefabConfig(string prefabName, out PrefabConfig prefabConfig, bool checkIfBound = false) { if (PrefabConfigMap.TryGetValue(prefabName, out prefabConfig)) { if (checkIfBound) { return prefabConfig.IsBound; } return true; } return false; } public static PrefabConfig BindPrefabConfig(GameObject prefab, Piece piece) { string prefabName = prefab.GetPrefabName(); if (!PrefabConfigMap.TryGetValue(prefabName, out var value)) { value = new PrefabConfig(prefabName); PrefabConfigMap[prefabName] = value; } if (!value.IsBound) { Internal_BindPrefabConfig(value, prefab, piece); } return value; } public static PrefabConfig BindPrefabConfig(string prefabName) { if (!PrefabConfigMap.TryGetValue(prefabName, out var value)) { value = new PrefabConfig(prefabName); PrefabConfigMap[prefabName] = value; } if (!value.IsBound) { if (!ZNetPrefabManager.TryGetEligiblePrefab(prefabName, out var prefab)) { string text = prefabName + " is not an eligible prefab for MVBP! Cannot bind config."; Log.LogWarning(text); throw new ArgumentException(text); } Piece piece = default(Piece); if (!prefab.TryGetComponent<Piece>(ref piece)) { string text2 = prefabName + " is missing a piece component! Cannot bind config."; Log.LogWarning(text2); throw new ArgumentException(text2); } Internal_BindPrefabConfig(value, prefab, piece); } return value; } private static void Internal_BindPrefabConfig(PrefabConfig prefabConfig, GameObject prefab, Piece piece) { prefabConfig.BindToConfig(((BaseUnityPlugin)MorePrefabs.Instance).Config, prefab, piece); prefabConfig.Enabled.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.AllowedInDungeons.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.Category.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.CraftingStation.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.Requirements.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.ClipEverything.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.ClipGround.SettingChanged += UpdateMananger.PieceSettingChanged; prefabConfig.PlacementPatch.SettingChanged += UpdateMananger.PlacementSettingChanged; } static PrefabConfigManager() { //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0c0b: Unknown result type (might be due to invalid IL or missing references) //IL_2025: Unknown result type (might be due to invalid IL or missing references) //IL_711b: Unknown result type (might be due to invalid IL or missing references) //IL_98f8: Unknown result type (might be due to invalid IL or missing references) Dictionary<string, PrefabConfig> obj = new Dictionary<string, PrefabConfig> { { "ArmorStand_Female", new PrefabConfig("ArmorStand_Female", enabled: true, allowedInDungeons: false, "Furniture", "Workbench", "FineWood,8;BronzeNails,2;Tar,4", clipEverything: false, clipGround: false, placementPatch: false, null, null, "", PieceClassification.ArmorStand) }, { "ArmorStand_Male", new PrefabConfig("ArmorStand_Male", enabled: true, allowedInDungeons: false, "Furniture", "Workbench", "FineWood,8;BronzeNails,2;Tar,4", clipEverything: false, clipGround: false, placementPatch: false, null, null, "", PieceClassification.ArmorStand) }, { "Ashland_Stair", new PrefabConfig("Ashland_Stair", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,32") }, { "Ashland_Steepstair", new PrefabConfig("Ashland_Steepstair", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "AshlandsBranch1", new PrefabConfig("AshlandsBranch1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "AshlandsBranch2", new PrefabConfig("AshlandsBranch2") }, { "AshlandsBranch3", new PrefabConfig("AshlandsBranch3", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "AshlandsBush1", new PrefabConfig("AshlandsBush1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "AshlandsBush2", new PrefabConfig("AshlandsBush2", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "AshlandsTree1", new PrefabConfig("AshlandsTree1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: false, (Vector3?)new Vector3(0f, 1f, 0f), (string)null, (string)null, PieceClassification.None, playerBasePatch: false, (string)null, (uint?)null, (uint?)null) }, { "AshlandsTree3", new PrefabConfig("AshlandsTree3", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: false, (Vector3?)new Vector3(0f, 1f, 0f), (string)null, (string)null, PieceClassification.None, playerBasePatch: false, (string)null, (uint?)null, (uint?)null) }, { "AshlandsTree4", new PrefabConfig("AshlandsTree4", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true) }, { "AshlandsTree5", new PrefabConfig("AshlandsTree5", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: false, (Vector3?)new Vector3(0f, 0.5f, 0f), (string)null, (string)null, PieceClassification.None, playerBasePatch: false, (string)null, (uint?)null, (uint?)null) }, { "AshlandsTree6", new PrefabConfig("AshlandsTree6", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true) }, { "AshlandsTree6_big", new PrefabConfig("AshlandsTree6_big", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeLog1", new PrefabConfig("AshlandsTreeLog1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeLog2", new PrefabConfig("AshlandsTreeLog2", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeLogHalf1", new PrefabConfig("AshlandsTreeLogHalf1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeLogHalf2", new PrefabConfig("AshlandsTreeLogHalf2", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeStump1", new PrefabConfig("AshlandsTreeStump1", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeStump2", new PrefabConfig("AshlandsTreeStump2", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "AshlandsTreeStump3", new PrefabConfig("AshlandsTreeStump3", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Ashlands_Altar", new PrefabConfig("Ashlands_Altar") }, { "Ashlands_Arch1", new PrefabConfig("Ashlands_Arch1", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Arch2", new PrefabConfig("Ashlands_Arch2", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Arch2_Broken1", new PrefabConfig("Ashlands_Arch2_Broken1") }, { "Ashlands_Arch2_Broken2", new PrefabConfig("Ashlands_Arch2_Broken2") }, { "Ashlands_ArchRoof", new PrefabConfig("Ashlands_ArchRoof", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "Ashlands_ArchRoofDamaged", new PrefabConfig("Ashlands_ArchRoofDamaged") }, { "Ashlands_ArchRoofDamaged_half1", new PrefabConfig("Ashlands_ArchRoofDamaged_half1") }, { "Ashlands_ArchRoofDamaged_half2", new PrefabConfig("Ashlands_ArchRoofDamaged_half2") }, { "Ashlands_ArchRoofLong_Damaged", new PrefabConfig("Ashlands_ArchRoofLong_Damaged") }, { "Ashlands_Boss_Pillar", new PrefabConfig("Ashlands_Boss_Pillar", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "Ashlands_Boss_Pillar_Twist_broken1", new PrefabConfig("Ashlands_Boss_Pillar_Twist_broken1") }, { "Ashlands_Boss_Pillar_Twist_broken2", new PrefabConfig("Ashlands_Boss_Pillar_Twist_broken2") }, { "Ashlands_Boss_Pillar_Twist_broken3", new PrefabConfig("Ashlands_Boss_Pillar_Twist_broken3") }, { "Ashlands_Floor", new PrefabConfig("Ashlands_Floor", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,4") }, { "Ashlands_Fortress_Floor", new PrefabConfig("Ashlands_Fortress_Floor", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_Fortress_Gate", new PrefabConfig("Ashlands_Fortress_Gate", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,32") }, { "Ashlands_Fortress_Gate_Door", new PrefabConfig("Ashlands_Fortress_Gate_Door", enabled: false, allowedInDungeons: false, "CreatorShop", "BlackForge", "Copper,35") }, { "Ashlands_Fortress_Wall_PillarTopStone_frac", new PrefabConfig("Ashlands_Fortress_Wall_PillarTopStone_frac", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, (Vector3?)new Vector3(0f, -0.1f, 0f), (string)null, (string)null, PieceClassification.None, playerBasePatch: false, (string)null, (uint?)null, (uint?)null) }, { "Ashlands_Fortress_Wall_PillarTop_frac", new PrefabConfig("Ashlands_Fortress_Wall_PillarTop_frac", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter") }, { "Ashlands_Fortress_Wall_Pillar_frac", new PrefabConfig("Ashlands_Fortress_Wall_Pillar_frac", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter") }, { "Ashlands_Fortress_Wall_Spikes", new PrefabConfig("Ashlands_Fortress_Wall_Spikes", enabled: false, allowedInDungeons: false, "CreatorShop", "BlackForge", "Copper,6") }, { "Ashlands_Pillar4", new PrefabConfig("Ashlands_Pillar4", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Pillar4_tip", new PrefabConfig("Ashlands_Pillar4_tip", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Pillar4_tip2", new PrefabConfig("Ashlands_Pillar4_tip2", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Pillar4_tip2_broken1", new PrefabConfig("Ashlands_Pillar4_tip2_broken1") }, { "Ashlands_Pillar4_tip2_broken2", new PrefabConfig("Ashlands_Pillar4_tip2_broken2") }, { "Ashlands_Pillar4_tip3", new PrefabConfig("Ashlands_Pillar4_tip3") }, { "Ashlands_Pillar4_tip3_broken1", new PrefabConfig("Ashlands_Pillar4_tip3_broken1") }, { "Ashlands_Pillar4_tip3_broken2", new PrefabConfig("Ashlands_Pillar4_tip3_broken2") }, { "Ashlands_Pillar4_tip3_broken3", new PrefabConfig("Ashlands_Pillar4_tip3_broken3") }, { "Ashlands_Pillar4_tip_broken1", new PrefabConfig("Ashlands_Pillar4_tip_broken1") }, { "Ashlands_Pillar4_tip_broken2", new PrefabConfig("Ashlands_Pillar4_tip_broken2") }, { "Ashlands_PillarBase3_double", new PrefabConfig("Ashlands_PillarBase3_double", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,3") }, { "Ashlands_Ramp", new PrefabConfig("Ashlands_Ramp", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Ruins_Floor_1point5x1point5", new PrefabConfig("Ashlands_Ruins_Floor_1point5x1point5") }, { "Ashlands_Ruins_Floor_1point5x1point5_broken", new PrefabConfig("Ashlands_Ruins_Floor_1point5x1point5_broken") }, { "Ashlands_Ruins_Floor_3x3", new PrefabConfig("Ashlands_Ruins_Floor_3x3") }, { "Ashlands_Ruins_Floor_3x3_broken1", new PrefabConfig("Ashlands_Ruins_Floor_3x3_broken1") }, { "Ashlands_Ruins_Floor_3x3_broken2", new PrefabConfig("Ashlands_Ruins_Floor_3x3_broken2") }, { "Ashlands_Ruins_Floor_3x3_broken3", new PrefabConfig("Ashlands_Ruins_Floor_3x3_broken3") }, { "Ashlands_Ruins_Floor_6x6", new PrefabConfig("Ashlands_Ruins_Floor_6x6") }, { "Ashlands_Ruins_Floor_6x6_broken1", new PrefabConfig("Ashlands_Ruins_Floor_6x6_broken1") }, { "Ashlands_Ruins_Floor_6x6_broken2", new PrefabConfig("Ashlands_Ruins_Floor_6x6_broken2", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "Ashlands_Ruins_Ramp", new PrefabConfig("Ashlands_Ruins_Ramp", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Ruins_Ramp_Upsidedown", new PrefabConfig("Ashlands_Ruins_Ramp_Upsidedown", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,10") }, { "Ashlands_Ruins_TopStone", new PrefabConfig("Ashlands_Ruins_TopStone") }, { "Ashlands_Ruins_Wall_4x6", new PrefabConfig("Ashlands_Ruins_Wall_4x6") }, { "Ashlands_Ruins_Wall_Broken3_4x6", new PrefabConfig("Ashlands_Ruins_Wall_Broken3_4x6") }, { "Ashlands_Ruins_Wall_Broken4_4x6", new PrefabConfig("Ashlands_Ruins_Wall_Broken4_4x6") }, { "Ashlands_Ruins_Wall_Broken5_4x6", new PrefabConfig("Ashlands_Ruins_Wall_Broken5_4x6") }, { "Ashlands_Ruins_Wall_Top_wHole", new PrefabConfig("Ashlands_Ruins_Wall_Top_wHole", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,16") }, { "Ashlands_Ruins_Wall_Window_4x6_broken2", new PrefabConfig("Ashlands_Ruins_Wall_Window_4x6_broken2") }, { "Ashlands_Ruins_Wall_Window_4x6_broken3", new PrefabConfig("Ashlands_Ruins_Wall_Window_4x6_broken3") }, { "Ashlands_Ruins_Wall_Window_4x6_broken4", new PrefabConfig("Ashlands_Ruins_Wall_Window_4x6_broken4") }, { "Ashlands_Ruins_Wall_Window_4x6_broken5", new PrefabConfig("Ashlands_Ruins_Wall_Window_4x6_broken5") }, { "Ashlands_Ruins_Wall_Window_4x6_broken6", new PrefabConfig("Ashlands_Ruins_Wall_Window_4x6_broken6") }, { "Ashlands_Ruins_Wall_Windows_Broken_4x6", new PrefabConfig("Ashlands_Ruins_Wall_Windows_Broken_4x6", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "Ashlands_Ruins_twist_ArchBig", new PrefabConfig("Ashlands_Ruins_twist_ArchBig", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Ruins_twist_PillarBase", new PrefabConfig("Ashlands_Ruins_twist_PillarBase", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Ruins_twist_PillarBaseSmall", new PrefabConfig("Ashlands_Ruins_twist_PillarBaseSmall", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,3") }, { "Ashlands_StairsBroad", new PrefabConfig("Ashlands_StairsBroad", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,24") }, { "Ashlands_WallBlock", new PrefabConfig("Ashlands_WallBlock") }, { "Ashlands_WallBlock_1x2x2", new PrefabConfig("Ashlands_WallBlock_1x2x2", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,2") }, { "Ashlands_WallBlock_base", new PrefabConfig("Ashlands_WallBlock_base", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,3") }, { "Ashlands_Wall_2x2", new PrefabConfig("Ashlands_Wall_2x2", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_Wall_2x2_cornerL", new PrefabConfig("Ashlands_Wall_2x2_cornerL", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Wall_2x2_cornerL_top", new PrefabConfig("Ashlands_Wall_2x2_cornerL_top", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Wall_2x2_cornerR", new PrefabConfig("Ashlands_Wall_2x2_cornerR", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Wall_2x2_cornerR_top", new PrefabConfig("Ashlands_Wall_2x2_cornerR_top", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,8") }, { "Ashlands_Wall_2x2_edge", new PrefabConfig("Ashlands_Wall_2x2_edge", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_Wall_2x2_edge2", new PrefabConfig("Ashlands_Wall_2x2_edge2", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_Wall_2x2_edge2_top", new PrefabConfig("Ashlands_Wall_2x2_edge2_top") }, { "Ashlands_Wall_2x2_edge_top", new PrefabConfig("Ashlands_Wall_2x2_edge_top", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_Wall_2x2_top", new PrefabConfig("Ashlands_Wall_2x2_top", enabled: false, allowedInDungeons: false, "CreatorShop", "Stonecutter", "Grausten,6") }, { "Ashlands_floor_large_fractured", new PrefabConfig("Ashlands_floor_large_fractured") }, { "Beech1", new PrefabConfig("Beech1", enabled: false, allowedInDungeons: false, "Nature", "None", "Wood,16", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Beech_Stub", new PrefabConfig("Beech_Stub", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Beech_small1", new PrefabConfig("Beech_small1", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Beech_small2", new PrefabConfig("Beech_small2", enabled: false, allowedInDungeons: false, "Nature", "None", "Wood,1", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Birch1", new PrefabConfig("Birch1", enabled: false, allowedInDungeons: false, "Nature", "None", "BirchSeeds,1;FineWood,2", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Birch1_aut", new PrefabConfig("Birch1_aut", enabled: false, allowedInDungeons: false, "Nature", "None", "BirchSeeds,1;FineWood,2", clipEverything: true, clipGround: false, placementPatch: false, null, "Birch1 (autumn)", null, PieceClassification.Flora) }, { "Birch2", new PrefabConfig("Birch2", enabled: false, allowedInDungeons: false, "Nature", "None", "BirchSeeds,1;FineWood,2", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Birch2_aut", new PrefabConfig("Birch2_aut", enabled: false, allowedInDungeons: false, "Nature", "None", "BirchSeeds,1;FineWood,2", clipEverything: true, clipGround: false, placementPatch: false, null, "Birch (autumn)", null, PieceClassification.Flora) }, { "BirchStub", new PrefabConfig("BirchStub", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Birch_log", new PrefabConfig("Birch_log", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Birch_log_half", new PrefabConfig("Birch_log_half", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "BlueberryBush", new PrefabConfig("BlueberryBush", enabled: false, allowedInDungeons: false, "Nature", "None", "Blueberries,5", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Plant) }, { "BogWitch_Fire_Pit", new PrefabConfig("BogWitch_Fire_Pit", enabled: true, allowedInDungeons: false, "Misc", "None", "PowderedDragonEgg,2;Stone,5", clipEverything: false, clipGround: false, placementPatch: false, (Vector3?)new Vector3(0f, -1f, 0f), (string)null, (string)null, PieceClassification.None, playerBasePatch: false, (string)null, (uint?)null, (uint?)null) }, { "BossStone_Bonemass", new PrefabConfig("BossStone_Bonemass", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "BossStone_DragonQueen", new PrefabConfig("BossStone_DragonQueen", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "BossStone_Eikthyr", new PrefabConfig("BossStone_Eikthyr", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "BossStone_Fader", new PrefabConfig("BossStone_Fader", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "BossStone_TheElder", new PrefabConfig("BossStone_TheElder", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "BossStone_TheQueen", new PrefabConfig("BossStone_TheQueen", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "BossStone_Yagluth", new PrefabConfig("BossStone_Yagluth", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true, null, null, null, PieceClassification.Misc) }, { "Bush01", new PrefabConfig("Bush01", enabled: true, allowedInDungeons: false, "Nature", "None", "Wood,2", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Bush01_heath", new PrefabConfig("Bush01_heath", enabled: true, allowedInDungeons: false, "Nature", "None", "Wood,2", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Bush02_en", new PrefabConfig("Bush02_en", enabled: true, allowedInDungeons: false, "Nature", "None", "Wood,2", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Candle_resin_bogwitch", new PrefabConfig("Candle_resin_bogwitch", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "CastleKit_braided_box01", new PrefabConfig("CastleKit_braided_box01", enabled: true, allowedInDungeons: false, "Misc", "Workbench", "Wood,2", clipEverything: false, clipGround: false, placementPatch: false, null, "Wood box", null, PieceClassification.Misc) }, { "CastleKit_groundtorch", new PrefabConfig("CastleKit_groundtorch", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Iron,2;Resin,2;SurtlingCore,1", clipEverything: false, clipGround: false, placementPatch: false, null, "Standing Iron Torch (Eternal)", "Burns eternally without fuel.", PieceClassification.Torch, playerBasePatch: true) }, { "CastleKit_groundtorch_blue", new PrefabConfig("CastleKit_groundtorch_blue", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Iron,2;GreydwarfEye,2;SurtlingCore,1", clipEverything: false, clipGround: false, placementPatch: false, null, "Standing Blue-Burning Iron Torch (Eternal)", "Burns eternally without fuel.", PieceClassification.Torch, playerBasePatch: true) }, { "CastleKit_groundtorch_green", new PrefabConfig("CastleKit_groundtorch_green", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Iron,2;Guck,2;SurtlingCore,1", clipEverything: false, clipGround: false, placementPatch: false, null, "Standing Green-Burning Iron Torch (Eternal)", "Burns eternally without fuel.", PieceClassification.Torch, playerBasePatch: true) }, { "CharredBanner1", new PrefabConfig("CharredBanner1") }, { "CharredBanner2", new PrefabConfig("CharredBanner2") }, { "CharredBanner3", new PrefabConfig("CharredBanner3") }, { "Charred_altar_bellfragment", new PrefabConfig("Charred_altar_bellfragment") }, { "Charredfortress_LOD", new PrefabConfig("Charredfortress_LOD", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: true) }, { "Chest", new PrefabConfig("Chest", enabled: false, allowedInDungeons: false, "Furniture", "None", "Wood,10;Iron,1", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Chest) }, { "Cinder", new PrefabConfig("Cinder", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "CinderSky", new PrefabConfig("CinderSky") }, { "CinderStorm", new PrefabConfig("CinderStorm") }, { "Cinder_campfire", new PrefabConfig("Cinder_campfire") }, { "CloudberryBush", new PrefabConfig("CloudberryBush", enabled: false, allowedInDungeons: false, "Nature", "None", "Cloudberry,5", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Plant) }, { "CreepProp_egg_hanging01", new PrefabConfig("CreepProp_egg_hanging01", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2") }, { "CreepProp_egg_hanging02", new PrefabConfig("CreepProp_egg_hanging02", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2") }, { "CreepProp_entrance1", new PrefabConfig("CreepProp_entrance1", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2", clipEverything: true) }, { "CreepProp_entrance2", new PrefabConfig("CreepProp_entrance2", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2", clipEverything: true) }, { "CreepProp_hanging01", new PrefabConfig("CreepProp_hanging01", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2") }, { "CreepProp_wall01", new PrefabConfig("CreepProp_wall01", enabled: false, allowedInDungeons: false, "Nature", "None", "YggdrasilWood,2") }, { "FernAshlands", new PrefabConfig("FernAshlands") }, { "FernFiddleHeadAshlands", new PrefabConfig("FernFiddleHeadAshlands", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: false, clipGround: false, placementPatch: true) }, { "FirTree", new PrefabConfig("FirTree", enabled: false, allowedInDungeons: false, "Nature", "None", "Wood,16", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_Stub", new PrefabConfig("FirTree_Stub", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_log", new PrefabConfig("FirTree_log", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_log_half", new PrefabConfig("FirTree_log_half", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_oldLog", new PrefabConfig("FirTree_oldLog", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_small", new PrefabConfig("FirTree_small", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "FirTree_small_dead", new PrefabConfig("FirTree_small_dead", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: false, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "Fire", new PrefabConfig("Fire") }, { "FireFlies", new PrefabConfig("FireFlies") }, { "FlametalRockstand_frac", new PrefabConfig("FlametalRockstand_frac") }, { "GlowingMushroom", new PrefabConfig("GlowingMushroom", enabled: false, allowedInDungeons: false, "Nature", "None", "Ooze,1", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "GraveStone_Broken_CharredTwitcherNest", new PrefabConfig("GraveStone_Broken_CharredTwitcherNest") }, { "GraveStone_Broken_World", new PrefabConfig("GraveStone_Broken_World") }, { "GraveStone_CharredFaderLocation", new PrefabConfig("GraveStone_CharredFaderLocation") }, { "GraveStone_CharredTwitcherNest", new PrefabConfig("GraveStone_CharredTwitcherNest") }, { "GraveStone_Elite_Broken_CharredTwitcherNest", new PrefabConfig("GraveStone_Elite_Broken_CharredTwitcherNest") }, { "GraveStone_Elite_CharredTwitcherNest", new PrefabConfig("GraveStone_Elite_CharredTwitcherNest") }, { "Greydwarf_Root", new PrefabConfig("Greydwarf_Root", enabled: false, allowedInDungeons: false, "Nature", "None", "Wood,2") }, { "GuckSack", new PrefabConfig("GuckSack", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Guck,12", clipEverything: true) }, { "GuckSack_small", new PrefabConfig("GuckSack_small", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Guck,6", clipEverything: true) }, { "HouseFire", new PrefabConfig("HouseFire") }, { "HugeRoot1", new PrefabConfig("HugeRoot1", enabled: false, allowedInDungeons: false, "Nature", "None", "ElderBark,32", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "IceBlocker", new PrefabConfig("IceBlocker") }, { "Ice_floor", new PrefabConfig("Ice_floor", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Crystal,16", clipEverything: false, clipGround: true) }, { "LavaRock", new PrefabConfig("LavaRock", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true, clipGround: false, placementPatch: true) }, { "Leviathan", new PrefabConfig("Leviathan", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Chitin,50", clipEverything: true) }, { "LeviathanLava", new PrefabConfig("LeviathanLava", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "", clipEverything: true) }, { "LuredWisp", new PrefabConfig("LuredWisp", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Wisp,1") }, { "MineRock_Copper", new PrefabConfig("MineRock_Copper", enabled: false, allowedInDungeons: false, "Nature", "None", "Stone,10;CopperOre,10", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MineRock_Iron", new PrefabConfig("MineRock_Iron", enabled: false, allowedInDungeons: false, "Nature", "None", "Stone,10;IronScrap,10", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MineRock_Meteorite", new PrefabConfig("MineRock_Meteorite", enabled: false, allowedInDungeons: false, "Nature", "None", "", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MineRock_Obsidian", new PrefabConfig("MineRock_Obsidian", enabled: false, allowedInDungeons: false, "Nature", "None", "Obsidian,7", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MineRock_Stone", new PrefabConfig("MineRock_Stone", enabled: false, allowedInDungeons: false, "Nature", "None", "Stone,10", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MineRock_Tin", new PrefabConfig("MineRock_Tin", enabled: false, allowedInDungeons: false, "Nature", "None", "TinOre,4", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Ore) }, { "MountainGraveStone01", new PrefabConfig("MountainGraveStone01", enabled: false, allowedInDungeons: false, "CreatorShop", "None", "Stone,5", clipEverything: true) }, { "MountainKit_brazier", new PrefabConfig("MountainKit_brazier", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Bronze,5;Coal,2;BlackCore,1;WolfClaw,3", clipEverything: false, clipGround: false, placementPatch: false, null, "Standing Brazier (Eternal)", "Burns eternally without fuel.", PieceClassification.Brazier, playerBasePatch: true) }, { "MountainKit_brazier_blue", new PrefabConfig("MountainKit_brazier_blue", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Bronze,5;GreydwarfEye,2;BlackCore,1;WolfClaw,3", clipEverything: false, clipGround: false, placementPatch: false, null, "Blue Standing Brazier (Eternal)", "Burns eternally without fuel.", PieceClassification.Brazier, playerBasePatch: true) }, { "MountainKit_brazier_purple", new PrefabConfig("MountainKit_brazier_purple", enabled: true, allowedInDungeons: false, "Furniture", "Forge", "Bronze,5;CharcoalResin,2;BlackCore,1;WolfClaw,3", clipEverything: false, clipGround: false, placementPatch: false, null, "Purple Standing Brazier (Eternal)", "Burns eternally without fuel.") }, { "MountainKit_wood_gate", new PrefabConfig("MountainKit_wood_gate", enabled: false, allowedInDungeons: false, "BuildingWorkbench", "Forge", "Wood,20;Iron,4") }, { "Oak1", new PrefabConfig("Oak1", enabled: false, allowedInDungeons: false, "Nature", "None", "Wood,20;FineWood,20", clipEverything: true, clipGround: false, placementPatch: false, null, null, null, PieceClassification.Flora) }, { "OakStub", new PrefabConfig("OakStub", enabled: false, allowedInDungeons: false, "Nature", "None", "Woo