--The name of this mod. (You can see it by clicking on 'mods' button in menu or at configurating of your world)
name = "Many More Ores"

--A description of this mod.
description = "Adds: [77_Downvest] [Armor Balancer] [Better Clothes] [Blood bag] [Damage Changing] [Eelight DST] [Expanded Shadow Armory] [Felix's Bomb Pack] [God Spear] [Lovely Chest] [Lunar Tools] [Mace] [Madman's Fighting Pack] [Marble Combat] [More Armor] [More durability [WeaponsTools] [More Gold Tools (DST)] [Moving Box] [Spiked Mace] [Used for lighting] [Monster Hambat] [Battle Horn] [DiningTable]"

--Man, who wrote this mod.
author = "Darh09"

--A version of mod
version = "1.4.1.1"
priority=1
--This lets other players know if your mod is out of date. This typically needs to be updated every time there's a new game update.
api_version = 10

dont_starve_compatible = true
reign_of_giants_compatible = true
dst_compatible = true
sw_compatible = false

--This lets clients know if they need to get the mod from the Steam Workshop to join the game
all_clients_require_mod = true
clients_only_mod = false
server_only_mod = true

--Link to Steam Workshop
forumthread = "http://steamcommunity.com/sharedfiles/filedetails/?id=737366433"

--Icon of this mod
icon_atlas = "MoarMetals.xml"
icon = "MoarMetals.tex"
--Battle Horn Function
local gn = {
	power = function(num)
		local percent = num * 100
		return { description = percent.."%", data = num, hover = "+"..percent..(ru and "% к множителю урона." or "% to damage multiplier.") }
	end,

	time = function(num)
		local min = num / 60
		return { description = min..(ru and " мин." or " min"), data = num, hover = num..(ru and " секунд до окончания баффа." or " seconds until buff ends.") }
	end,
}
--
local WARNING = "\n(WARNING: Enabling this could cause unexpected behavior)"

local sections = 0
local function divide(label, tip)
	sections = sections + 1
	return
	{
		name = "menu_divider" .. sections,
		label = label,
		options =
		{
			{ description = "", data = false },
		},
		default = false,
	}
end

local OPTION_LIST =
{
  divide("Moar Metals Options", "World configuration options."),
  {
		name = "rock_rarity",
		label = "Boulder Rarity",
		options =
		{
			{description = "Are they spawned?", data = 0.01},
			{description = "Ultra rare", data = 0.05},
			{description = "Rare", data = 0.1},
			{description = "Few", data = 0.5},
			{description = "Normal", data = 1.0},
			{description = "Few more", data = 1.5},
			{description = "Many", data = 2.0},
			{description = "Lots!", data = 3.0},
			{description = "It's a BoulderLand?", data = 5.0}
		},
		default = 1.0
	},
	{
		name = "lang",
		label = "Language",
		options =
		{
			{description = "English", data = 0},
			{description = "Русский", data = 1}
		},
		default = 0
	},
	divide("Tunning Configurable", "Configurable Tunning"),
	divide("Tools Uses", ""),
	{
		name = "AXE_USES",
		label = "Axe uses",
		hover = "Default is 100",
		options =
		{
				{description = "50", data = 50, hover = "(50%)"},
				{description = "100", data = 100, hover = "(default)"},
				{description = "150", data = 150, hover = "(150%)"},
				{description = "200", data = 200, hover = "(200%)"},
		},
		default = 100,
	},
	{
		name = "PICKAXE_USES",
		label = "Pickaxe uses",
		hover = "Default is 33",
		options =
		{
				{description = "17", data = 17, hover = "(~50%)"},
				{description = "33", data = 33, hover = "(default)"},
				{description = "50", data = 50, hover = "(~150%)"},
				{description = "66", data = 66, hover = "(200%)"},
		},
		default = 33,
	},
	{
		name = "SHOVEL_USES",
		label = "Shovel uses",
		hover = "Default is 25",
		options =
		{
				{description = "13", data = 13, hover = "(~50%)"},
				{description = "25", data = 25, hover = "(default)"},
				{description = "38", data = 38, hover = "(~150%)"},
				{description = "50", data = 50, hover = "(200%)"},
		},
		default = 25,
	},
	{
		name = "HAMMER_USES",
		label = "Hammer uses",
		hover = "Default is 75",
		options =
		{
				{description = "38", data = 38, hover = "(~50%)"},
				{description = "75", data = 75, hover = "(default)"},
				{description = "113", data = 113, hover = "(~150%)"},
				{description = "150", data = 150, hover = "(200%)"},
		},
		default = 75,
	},
	{
		name = "PITCHFORK_USES",
		label = "Pitchfork uses",
		hover = "Default is 200",
		options =
		{
				{description = "100", data = 100, hover = "(50%)"},
				{description = "200", data = 200, hover = "(default)"},
		},
		default = 200,
	},
	{
		name = "SADDLEHORN_USES",
		label = "Saddlehorn uses",
		hover = "Default is 10",
		options =
		{
				{description = "5", data = 5, hover = ""},
				{description = "10", data = 10, hover = "(default)"},
				{description = "15", data = 15, hover = ""},
				{description = "20", data = 20, hover = ""},
		},
		default = 10,
	},
	{
		name = "SADDLE_BASIC_USES",
		label = "Saddle uses",
		hover = "Default is 5",
		options =
		{
				{description = "1", data = 1, hover = ""},
				{description = "2", data = 2, hover = ""},
				{description = "3", data = 3, hover = ""},
				{description = "4", data = 4, hover = ""},
				{description = "5", data = 5, hover = "(default)"},
				{description = "6", data = 6, hover = ""},
				{description = "7", data = 7, hover = ""},
				{description = "8", data = 8, hover = ""},
				{description = "9", data = 9, hover = ""},
				{description = "10", data = 10, hover = ""},
		},
		default = 5,
	},
	{
		name = "SADDLE_WAR_USES",
		label = "War Saddle uses",
		hover = "Default is 8",
		options =
		{
				{description = "1", data = 1, hover = ""},
				{description = "2", data = 2, hover = ""},
				{description = "3", data = 3, hover = ""},
				{description = "4", data = 4, hover = ""},
				{description = "5", data = 5, hover = ""},
				{description = "6", data = 6, hover = ""},
				{description = "7", data = 7, hover = ""},
				{description = "8", data = 8, hover = "(default)"},
				{description = "9", data = 9, hover = ""},
				{description = "10", data = 10, hover = ""},
				{description = "11", data = 11, hover = ""},
				{description = "12", data = 12, hover = ""},
		},
		default = 8,
	},
	{
		name = "SADDLE_RACE_USES",
		label = "Glossamer Saddle uses",
		hover = "Default is 8",
		options =
		{
				{description = "1", data = 1, hover = ""},
				{description = "2", data = 2, hover = ""},
				{description = "3", data = 3, hover = ""},
				{description = "4", data = 4, hover = ""},
				{description = "5", data = 5, hover = ""},
				{description = "6", data = 6, hover = ""},
				{description = "7", data = 7, hover = ""},
				{description = "8", data = 8, hover = "(default)"},
				{description = "9", data = 9, hover = ""},
				{description = "10", data = 10, hover = ""},
				{description = "11", data = 11, hover = ""},
				{description = "12", data = 12, hover = ""},
			},
			default = 8,
	},
	{
		name = "BRUSH_USES",
		label = "Brush uses",
		hover = "Default is 75",
		options =
		{
				{description = "38", data = 38, hover = "(~50%)"},
				{description = "75", data = 75, hover = "(default)"},
				{description = "113", data = 113, hover = "(~150%)"},
		},
		default = 75,
	},
	{
		name = "TOUCH_STONE_USES",
		label = "Touch Stone uses",
		hover = "Default is once",
		options =
		{
			{description = "once", data = true, hover = ""},
			{description = "unlimited", data = false, hover = ""},
		},
			default = true,
	},
	divide("Battle Horn Options", "Configuration options."),
	{
		name = "power",
		label = ru and "Сила баффа" or "Buff Power",
		options =
		{
			gn.power(0.10),
			gn.power(0.15),
			gn.power(0.20),
			gn.power(0.25),
			gn.power(0.30),
			gn.power(0.35),
			gn.power(0.40),
		},
		default = 0.25,
	},
	{
		name = "time",
		label = ru and "Время баффа" or "Buff Time",
		options =
		{
			gn.time(120),
			gn.time(180),
			gn.time(240),
			gn.time(300),
			gn.time(360),
		},
		default = 240,
	},
  divide("Pack Options", "Pack configuration options."),
	{--Pack
		name = "modsupport",
		label = "Mod Support",
		hover = "Support for third-party structures."..WARNING,
		options =
		{
			{description = "Enabled", data = true, hover = "Third-party structures can be packaged."..WARNING},
			{description = "Disabled", data = false, hover = "Third-party structures can NOT be packaged."..WARNING}
		},
		default = false
	}
}

local PACKABLE_LIST =
{
	{"beebox", "Bee Box"},
	{"birdcage", "Birdcage"},
	{"cartographydesk", "Cartographer's Desk"},
	{"cookpot", "Crock Pot"},
  {"deluxpot", "Delux Cooking Pot"},
	{"dragonflychest", "Scaled Chest"},
	{"dragonflyfurnace", "Scaled Furnace"},
	{"endtable", "End Table"},
	{"firesuppressor", "Ice Flingomatic"},
	{"icebox", "Ice Box"},
	{"lightning_rod", "Lightning Rod"},
  {"lovelychest", "Lovely Chest"},
	{"meatrack", "Drying Rack"},
	{"moondial", "Moon Dial"},
	{"mushroom_farm", "Mushroom Planter"},
	{"mushroom_light", "Mushroom Light"},
	{"nightlight", "Night Light"},
	{"perdshrine", "Gobbler Shrine"},
	{"pottedfern", "Potted Fern"},
	{"rainometer", "Rainometer"},
	{"researchlab", "Science Machine"},
	{"researchlab2", "Alchemy Engine"},
	{"researchlab3", "Shadow Manipulator"},
	{"researchlab4", "Prestihatitator"},
	{"resurrectionstatue", "Meat Effigy"},
	{"saltlick", "Salt Lick"},
	{"scarecrow", "Friendly Scarecrow"},
	{"sculptingtable", "Potter's Wheel"},
	{"succulent_potted", "Potted Succulent"},
	{"townportal", "The Lazy Deserter"},
	{"treasurechest", "Chest"},
	{"wardrobe", "Wardrobe"},
	{"winterometer", "Thermal Measurer"},
}

for i=1, #PACKABLE_LIST do
	local option =
	{
		name = PACKABLE_LIST[i][1],
		label = PACKABLE_LIST[i][2],
		options =
		{
			{description = "Enabled", data = true, hover = "This can be packaged."},
			{description = "Disabled", data = false, hover = "This can NOT be packaged."},
		},
		default = true
	}
	OPTION_LIST[#OPTION_LIST+1] = option
end
configuration_options = OPTION_LIST
