Decompiled source of RomeTweeks v1.0.1

RomeTweaksMod.dll

Decompiled a month ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("RomeTweeksMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RomeTweeksMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d66f7c4f-d5fd-4cfa-bd73-ec8c6b2b1428")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RomeTweeksMod;

[HarmonyPatch]
[BepInPlugin("aromeral.RomeTweeksMod", "Rome Tweek's Mod", "1.0.0")]
[BepInProcess("valheim.exe")]
public class RomeTweeksMod : BaseUnityPlugin
{
	[HarmonyPatch(typeof(DropOnDestroyed), "OnDestroyed")]
	private static class DropOnDestroyed_OnDestroyed_Patch
	{
		private static void Prefix(ref DropOnDestroyed __instance)
		{
			dropTableObject = ((Object)((Component)__instance).gameObject).name;
			Debug.Log((object)dropTableObject);
		}

		private static void Postfix(ref DropOnDestroyed __instance)
		{
			dropTableObject = "";
		}
	}

	[HarmonyPatch(typeof(DropTable), "GetDropList", new Type[] { })]
	private static class DropTable_GetDropList_Patch
	{
		private static void Postfix(ref List<GameObject> __result)
		{
			if (!enableDropsPatch.Value || (!Environment.StackTrace.Contains("MineRock") && (!Environment.StackTrace.Contains("DropOnDestroyed") || !dropTableObject.Contains("Rock"))))
			{
				return;
			}
			Dictionary<string, List<GameObject>> dictionary = new Dictionary<string, List<GameObject>>();
			foreach (GameObject item in __result)
			{
				if (!((Object)(object)item == (Object)null))
				{
					if (!dictionary.ContainsKey(((Object)item).name))
					{
						dictionary.Add(((Object)item).name, new List<GameObject>());
					}
					dictionary[((Object)item).name].Add(item);
				}
			}
			foreach (KeyValuePair<string, List<GameObject>> item2 in dictionary)
			{
				int num = item2.Value.Count;
				if (item2.Key == "Stone")
				{
					num = Mathf.RoundToInt((float)num * stoneDropMult.Value);
				}
				else if (item2.Key.EndsWith("Ore"))
				{
					num = Mathf.RoundToInt(oreDropMult.Value);
				}
				if (item2.Value.Count < num)
				{
					for (int i = item2.Value.Count; i < num; i++)
					{
						__result.Add(item2.Value[0]);
					}
				}
				else if (num < item2.Value.Count)
				{
					for (int j = num; j < item2.Value.Count; j++)
					{
						__result.Remove(item2.Value[j]);
					}
				}
			}
		}
	}

	[HarmonyPatch(typeof(Player), "GetTotalFoodValue")]
	private class Player_Patch
	{
		private static void Prefix(Player __instance)
		{
			foreach (Food food in __instance.GetFoods())
			{
				food.m_health = food.m_item.m_shared.m_food;
				food.m_stamina = food.m_item.m_shared.m_foodStamina;
				food.m_eitr = food.m_item.m_shared.m_foodEitr;
			}
		}
	}

	private readonly Harmony harmony = new Harmony("aromeral.RomeTweeksMod");

	public static ConfigEntry<bool> enableDropsPatch;

	public static ConfigEntry<float> oreDropMult;

	public static ConfigEntry<float> stoneDropMult;

	private static string dropTableObject = "";

	public static ConfigEntry<bool> enableFastProductionPatch;

	public static ConfigEntry<int> ProductionCharcoalKilnMaxFuel;

	public static ConfigEntry<int> ProductionCharcoalKilnMaxOre;

	public static ConfigEntry<int> ProductionCharcoalKilnFuelPerProduct;

	public static ConfigEntry<int> ProductionCharcoalKilnSecPerProduct;

	public static ConfigEntry<int> ProductionSmelterMaxFuel;

	public static ConfigEntry<int> ProductionSmelterMaxOre;

	public static ConfigEntry<int> ProductionSmelterFuelPerProduct;

	public static ConfigEntry<int> ProductionSmelterSecPerProduct;

	public static ConfigEntry<int> ProductionWindmillMaxFuel;

	public static ConfigEntry<int> ProductionWindmillMaxOre;

	public static ConfigEntry<int> ProductionWindmillFuelPerProduct;

	public static ConfigEntry<int> ProductionWindmillSecPerProduct;

	public static ConfigEntry<int> ProductionBlastFurnaceMaxFuel;

	public static ConfigEntry<int> ProductionBlastFurnaceMaxOre;

	public static ConfigEntry<int> ProductionBlastFurnaceFuelPerProduct;

	public static ConfigEntry<int> ProductionBlastFurnaceSecPerProduct;

	public static ConfigEntry<int> ProductionDefaultMaxFuel;

	public static ConfigEntry<int> ProductionDefaultMaxOre;

	public static ConfigEntry<int> ProductionDefaultFuelPerProduct;

	public static ConfigEntry<int> ProductionDefaultSecPerProduct;

	public static ConfigEntry<bool> enableStoneCostPatch;

	public static ConfigEntry<int> stoneWall4x2Cost;

	public static ConfigEntry<int> stoneWall2x1Cost;

	public static ConfigEntry<int> stoneWall1x1Cost;

	public static ConfigEntry<int> stoneFloor2x2Cost;

	public static ConfigEntry<int> stoneArchCost;

	public static ConfigEntry<int> stonePillarCost;

	public static ConfigEntry<int> stoneStairCost;

	public static ConfigEntry<bool> enableIronCostPatch;

	public static ConfigEntry<int> cageFloor1x1Cost;

	public static ConfigEntry<int> cageFloor2x2Cost;

	public static ConfigEntry<int> cageWall1x1Cost;

	public static ConfigEntry<int> cageWall2x2Cost;

	public static ConfigEntry<int> ironGateCost;

	public static ConfigEntry<bool> enableBlackMarbleCostPatch;

	public static ConfigEntry<int> blackMarble1x1Cost;

	public static ConfigEntry<int> blackMarble2x1x1Cost;

	public static ConfigEntry<int> blackMarble2x2x2Cost;

	public static ConfigEntry<int> blackMarbleFloorCost;

	public static ConfigEntry<int> blackMarbleFloorTriangleCost;

	public static ConfigEntry<int> blackMarbleStairCost;

	public static ConfigEntry<int> blackMarbleTipCost;

	public static ConfigEntry<int> blackMarbleBase1;

	public static ConfigEntry<int> blackMarbleBasecorner;

	public static ConfigEntry<int> blackMarbleOut1;

	public static ConfigEntry<int> blackMarbleOutCorner;

	public static ConfigEntry<int> blackMarbleArchCost;

	public static ConfigEntry<int> blackMarbleColumn1Cost;

	public static ConfigEntry<int> blackMarbleColumn2Cost;

	public static ConfigEntry<bool> enableGraustenCostPatch;

	public static ConfigEntry<int> graustenCost;

	public static ConfigEntry<int> pieceGraustenStoneLadderCost;

	public static ConfigEntry<int> pieceGraustenStoneStairCost;

	public static ConfigEntry<int> pieceGraustenFloor1x1Cost;

	public static ConfigEntry<int> pieceGraustenFloor2x2Cost;

	public static ConfigEntry<int> pieceGraustenFloor4x4Cost;

	public static ConfigEntry<int> pieceGraustenPillarBaseSmallCost;

	public static ConfigEntry<int> pieceGraustenPillarBaseMediumCost;

	public static ConfigEntry<int> pieceGraustenPillarBaseTaperedCost;

	public static ConfigEntry<int> pieceGraustenPillarBaseTaperedInvertedCost;

	public static ConfigEntry<int> pieceGraustenPillarBeamSmallCost;

	public static ConfigEntry<int> pieceGraustenPillarBeamMediumCost;

	public static ConfigEntry<int> pieceGraustenPillarArchSmallCost;

	public static ConfigEntry<int> pieceGraustenPillarArchCost;

	public static ConfigEntry<int> pieceGraustenWallArchCost;

	public static ConfigEntry<int> pieceGraustenWallArchInvertedCost;

	public static ConfigEntry<int> pieceGraustenWall1x2Cost;

	public static ConfigEntry<int> pieceGraustenWall2x2Cost;

	public static ConfigEntry<int> pieceGraustenWall4x2Cost;

	public static ConfigEntry<int> pieceGraustenWindow2x2Cost;

	public static ConfigEntry<int> pieceGraustenWindow4x2Cost;

	public static ConfigEntry<int> pieceGraustenRoof45Cost;

	public static ConfigEntry<int> pieceGraustenRoof45CornerCost;

	public static ConfigEntry<int> pieceGraustenRoof45Corner2Cost;

	public static ConfigEntry<int> pieceGraustenRoof45ArchCost;

	public static ConfigEntry<int> pieceGraustenRoof45ArchCorner2Cost;

	public static ConfigEntry<int> pieceGraustenRoof45ArchCornerCost;

	[HarmonyPatch(typeof(Smelter), "Awake")]
	[HarmonyPostfix]
	private static void Smelter_Awake(ref string ___m_name, ref int ___m_maxFuel, ref int ___m_maxOre, ref int ___m_fuelPerProduct, ref float ___m_secPerProduct)
	{
		if (enableFastProductionPatch.Value)
		{
			switch (___m_name)
			{
			case "$piece_charcoalkiln":
				___m_maxFuel = ProductionCharcoalKilnMaxFuel.Value;
				___m_maxOre = ProductionCharcoalKilnMaxOre.Value;
				___m_fuelPerProduct = ProductionCharcoalKilnFuelPerProduct.Value;
				___m_secPerProduct = ProductionCharcoalKilnSecPerProduct.Value;
				break;
			case "$piece_smelter":
				___m_maxFuel = ProductionSmelterMaxFuel.Value;
				___m_maxOre = ProductionSmelterMaxOre.Value;
				___m_fuelPerProduct = ProductionSmelterFuelPerProduct.Value;
				___m_secPerProduct = ProductionSmelterSecPerProduct.Value;
				break;
			case "$piece_windmill":
				___m_maxFuel = ProductionWindmillMaxFuel.Value;
				___m_maxOre = ProductionWindmillMaxOre.Value;
				___m_fuelPerProduct = ProductionWindmillFuelPerProduct.Value;
				___m_secPerProduct = ProductionWindmillSecPerProduct.Value;
				break;
			case "$piece_blastfurnace":
				___m_maxFuel = ProductionBlastFurnaceMaxFuel.Value;
				___m_maxOre = ProductionBlastFurnaceMaxOre.Value;
				___m_fuelPerProduct = ProductionBlastFurnaceFuelPerProduct.Value;
				___m_secPerProduct = ProductionBlastFurnaceSecPerProduct.Value;
				break;
			default:
				___m_maxFuel = ProductionDefaultMaxFuel.Value;
				___m_maxOre = ProductionDefaultMaxOre.Value;
				___m_fuelPerProduct = ProductionDefaultFuelPerProduct.Value;
				___m_secPerProduct = ProductionDefaultSecPerProduct.Value;
				break;
			}
		}
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(ObjectDB), "Awake")]
	public static void ObjectDB_Awake_Patch(ref ObjectDB __instance)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Expected O, but got Unknown
		Object[] array = Resources.FindObjectsOfTypeAll(typeof(GameObject));
		for (int i = 0; i < array.Length; i++)
		{
			GameObject val = (GameObject)array[i];
			switch (((Object)val).name)
			{
			case "stone_wall_4x2":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneWall4x2Cost.Value;
				}
				break;
			case "stone_wall_2x1":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneWall2x1Cost.Value;
				}
				break;
			case "stone_wall_1x1":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneWall1x1Cost.Value;
				}
				break;
			case "stone_floor_2x2":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneFloor2x2Cost.Value;
				}
				break;
			case "stone_arch":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneArchCost.Value;
				}
				break;
			case "stone_pillar":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stonePillarCost.Value;
				}
				break;
			case "stone_stair":
				if (enableStoneCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = stoneStairCost.Value;
				}
				break;
			case "iron_floor_1x1_v2":
				if (enableIronCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = cageFloor1x1Cost.Value;
				}
				break;
			case "iron_floor_2x2":
				if (enableIronCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = cageFloor2x2Cost.Value;
				}
				break;
			case "iron_wall_1x1":
				if (enableIronCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = cageWall1x1Cost.Value;
				}
				break;
			case "iron_wall_2x2":
				if (enableIronCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = cageWall2x2Cost.Value;
				}
				break;
			case "iron_grate":
				if (enableIronCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = ironGateCost.Value;
				}
				break;
			case "blackmarble_1x1":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarble1x1Cost.Value;
				}
				break;
			case "blackmarble_2x1x1":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarble2x1x1Cost.Value;
				}
				break;
			case "blackmarble_2x2x2":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarble2x2x2Cost.Value;
				}
				break;
			case "blackmarble_floor":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleFloorCost.Value;
				}
				break;
			case "blackmarble_floor_triangle":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleFloorTriangleCost.Value;
				}
				break;
			case "blackmarble_stair":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleStairCost.Value;
				}
				break;
			case "blackmarble_tip":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleTipCost.Value;
				}
				break;
			case "blackmarble_base_1":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleBase1.Value;
				}
				break;
			case "blackmarble_basecorner":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleBasecorner.Value;
				}
				break;
			case "blackmarble_out_1":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleOut1.Value;
				}
				break;
			case "blackmarble_outcorner":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleOutCorner.Value;
				}
				break;
			case "blackmarble_arch":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleArchCost.Value;
				}
				break;
			case "blackmarble_column_1":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleColumn1Cost.Value;
				}
				break;
			case "blackmarble_column_2":
				if (enableBlackMarbleCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = blackMarbleColumn2Cost.Value;
				}
				break;
			case "Piece_grausten_stone_ladder":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_stonestair":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_floor_1x1":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_floor_2x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_floor_4x4":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbase_small":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbase_medium":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbase_tapered":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbase_tapered_inverted":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbeam_small":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillarbeam_medium":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillar_arch_small":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_pillar_arch":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_wall_arch":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_wall_arch_inverted":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_wall_1x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_wall_2x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_wall_4x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_window_2x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "Piece_grausten_window_4x2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45_corner":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45_corner2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45_arch":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45_arch_corner2":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			case "piece_grausten_roof_45_arch_corner":
				if (enableGraustenCostPatch.Value)
				{
					val.GetComponent<Piece>().m_resources[0].m_amount = graustenCost.Value;
				}
				break;
			}
		}
	}

	[HarmonyPatch(typeof(Skills), "LowerAllSkills")]
	[HarmonyPostfix]
	private static bool Prefix()
	{
		return false;
	}

	private void Awake()
	{
		enableDropsPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableDropsPatch", true, "Enable the drops patch");
		enableFastProductionPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableFastProductionPatch", true, "Enable the Fast production patch");
		enableStoneCostPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableStoneCostPatch", true, "Enable the Stone building pieces patch");
		enableIronCostPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableIronCostPatch", true, "Enable the Iron building pieces patch");
		enableBlackMarbleCostPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableBlackMarbleCostPatch", true, "Enable the Black marble building pieces patch");
		enableGraustenCostPatch = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "enableGraustenCostPatch", true, "Enable the Black marble building pieces patch");
		stoneDropMult = ((BaseUnityPlugin)this).Config.Bind<float>("Drops", "stoneDropMult", 1f, "Multiply the amount of stone dropped by this amount");
		oreDropMult = ((BaseUnityPlugin)this).Config.Bind<float>("Drops", "oreDropMult", 2f, "Multiply the amount of ore dropped by this amount");
		ProductionCharcoalKilnMaxFuel = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionCharcoalKilnMaxFuel", 0, "Max fuel that can be added");
		ProductionCharcoalKilnMaxOre = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionCharcoalKilnMaxOre", 50, "Max ore that can be added");
		ProductionCharcoalKilnFuelPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionCharcoalKilnFuelPerProduct", 1, "How many fuel is consumed per product");
		ProductionCharcoalKilnSecPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionCharcoalKilnSecPerProduct", 2, "Cost of stone for this building piece");
		ProductionSmelterMaxFuel = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionSmelterMaxFuel", 50, "Max fuel that can be added");
		ProductionSmelterMaxOre = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionSmelterMaxOre", 20, "Max ore that can be added");
		ProductionSmelterFuelPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionSmelterFuelPerProduct", 1, "How many fuel is consumed per product");
		ProductionSmelterSecPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionSmelterSecPerProduct", 2, "How long take to produce one product");
		ProductionWindmillMaxFuel = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionWindmillMaxFuel", 0, "Max fuel that can be added");
		ProductionWindmillMaxOre = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionWindmillMaxOre", 50, "Max ore that can be added");
		ProductionWindmillFuelPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionWindmillFuelPerProduct", 0, "How many fuel is consumed per product");
		ProductionWindmillSecPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionWindmillSecPerProduct", 2, "How long take to produce one product");
		ProductionBlastFurnaceMaxFuel = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionBlastFurnaceMaxFuel", 50, "Max fuel that can be added");
		ProductionBlastFurnaceMaxOre = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionBlastFurnaceMaxOre", 20, "Max ore that can be added");
		ProductionBlastFurnaceFuelPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionBlastFurnaceFuelPerProduct", 1, "How many fuel is consumed per product");
		ProductionBlastFurnaceSecPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionBlastFurnaceSecPerProduct", 2, "How long take to produce one product");
		ProductionDefaultMaxFuel = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionDefaultMaxFuel", 50, "Max fuel that can be added");
		ProductionDefaultMaxOre = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionDefaultMaxOre", 20, "Max ore that can be added");
		ProductionDefaultFuelPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionDefaultFuelPerProduct", 1, "How many fuel is consumed per product");
		ProductionDefaultSecPerProduct = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "ProductionDefaultSecPerProduct", 2, "How long take to produce one product");
		stoneWall4x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneWall4x2Cost", 1, "Cost of stone for this building piece");
		stoneWall2x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneWall2x1Cost", 1, "Cost of stone for this building piece");
		stoneWall1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneWall1x1Cost", 1, "Cost of stone for this building piece");
		stoneFloor2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneFloor2x2Cost", 1, "Cost of stone for this building piece");
		stoneArchCost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneArchCost", 1, "Cost of stone for this building piece");
		stonePillarCost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stonePillarCost", 1, "Cost of stone for this building piece");
		stoneStairCost = ((BaseUnityPlugin)this).Config.Bind<int>("Stone Cost", "stoneStairCost", 1, "Cost of stone for this building piece");
		cageFloor1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Iron Cost", "cageFloor1x1Cost", 1, "Cost of iron for this building piece");
		cageFloor2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Iron Cost", "cageFloor2x2Cost", 1, "Cost of iron for this building piece");
		cageWall1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Iron Cost", "cageWall1x1Cost", 1, "Cost of iron for this building piece");
		cageWall2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Iron Cost", "cageWall2x2Cost", 1, "Cost of iron for this building piece");
		ironGateCost = ((BaseUnityPlugin)this).Config.Bind<int>("Iron Cost", "ironGateCost", 1, "Cost of iron for this building piece");
		blackMarble1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarble1x1Cost", 1, "Cost of black marble for this building piece");
		blackMarble2x1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarble2x1x1Cost", 1, "Cost of black marble for this building piece");
		blackMarble2x2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarble2x2x2Cost", 1, "Cost of black marble for this building piece");
		blackMarbleFloorCost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleFloorCost", 1, "Cost of black marble for this building piece");
		blackMarbleFloorTriangleCost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleFloorTriangleCost", 1, "Cost of black marble for this building piece");
		blackMarbleStairCost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleStairCost", 1, "Cost of black marble for this building piece");
		blackMarbleTipCost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleTipCost", 1, "Cost of black marble for this building piece");
		blackMarbleBase1 = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleBase1", 1, "Cost of black marble for this building piece");
		blackMarbleBasecorner = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleBasecorner", 1, "Cost of black marble for this building piece");
		blackMarbleOut1 = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleOut1", 1, "Cost of black marble for this building piece");
		blackMarbleOutCorner = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleOutCorner", 1, "Cost of black marble for this building piece");
		blackMarbleArchCost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleArchCost", 1, "Cost of black marble for this building piece");
		blackMarbleColumn1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleColumn1Cost", 1, "Cost of black marble for this building piece");
		blackMarbleColumn2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Black marble Cost", "blackMarbleColumn2Cost", 1, "Cost of black marble for this building piece");
		graustenCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "graustenCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenStoneLadderCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenStoneLadderCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenStoneStairCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenStoneStairCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenFloor1x1Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenFloor1x1Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenFloor2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenFloor2x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenFloor4x4Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenFloor4x4Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBaseSmallCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBaseSmallCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBaseMediumCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBaseMediumCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBaseTaperedCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBaseTaperedCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBaseTaperedInvertedCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBaseTaperedInvertedCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBeamSmallCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBeamSmallCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarBeamMediumCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarBeamMediumCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarArchSmallCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarArchSmallCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenPillarArchCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenPillarArchCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWallArchCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWallArchCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWallArchInvertedCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWallArchInvertedCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWall1x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWall1x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWall2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWall2x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWall4x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWall4x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWindow2x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWindow2x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenWindow4x2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenWindow4x2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45CornerCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45CornerCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45Corner2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45Corner2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45ArchCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45ArchCost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45ArchCorner2Cost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45ArchCorner2Cost", 1, "Cost of Grausten for this building piece");
		pieceGraustenRoof45ArchCornerCost = ((BaseUnityPlugin)this).Config.Bind<int>("Grausten Cost", "pieceGraustenRoof45ArchCornerCost", 1, "Cost of Grausten for this building piece");
		harmony.PatchAll();
	}
}