all_clients_require_mod = true
--[[TUNING]]
	TUNING.ARMOR_HARDNESS = 2000
	TUNING.ARMOR_ABSORPTION = 0.8
	TUNING.HELMET_HARDNESS = 750
	TUNING.HELMET_ABSORPTION = 0.6
	TUNING.TOOL_ATTACK_PENALTY = 1.5
	TUNING.TOOL_USES = 280
	TUNING.TOOL_DAMAGE = 20
	TUNING.WEAPON_DAMAGE = 35
	TUNING.SWORD_BONUS = 1.1
	TUNING.IRON_BONUS = 1.2
	TUNING.COBALT_BONUS = 1.5
	TUNING.COBALT_COOLER = -10
--TUNGSTEN
	TUNING.TUNGSTEN_SPEAR_USES = 220
	TUNING.TUNGSTEN_SPEAR_DAMAGE = 50
	TUNING.TUNGSTEN_AXE_DAMAGE = 49
	TUNING.TUNGSTEN_AXE_USES= 420
	TUNING.FIREBLADE_DAMAGE = 55
	TUNING.FIREBLADE_USES=250
	--TUNING.ARMORTUNGSTEN=1600
	TUNING.ARMORTUNGSTEN_ABSORPTION=1.5
	TUNING.TUNGSTEN_PICKAXE_DAMAGE = 49
	TUNING.TUNGSTEN_PICKAXE_USES=420 --Blaze it
	TUNING.TUNGSTENHARDHAT_TIMEMULTIPLIER=0.15
	TUNING.SHIRUKEN_DAMAGE=151
	TUNING.TESLATRAP_DAMAGE=55
	TUNING.TRAP_TESLA_RADIUS = TUNING.TRAP_TEETH_RADIUS*2
	--base
	TUNING.ARMORGRASS = 335
	TUNING.ARMORWOOD = 750
	TUNING.ARMORMARBLE = 3000
	TUNING.ARMORSNURTLESHELL = 3050
	TUNING.ARMORRUINS = 7000
	TUNING.ARMOR_FOOTBALLHAT = 450
	TUNING.ARMOR_FOOTBALLHAT_ABSORPTION = 0.8
	TUNING.ARMORDRAGONFLY = 3200
	TUNING.ARMOR_WATHGRITHRHAT = 800
	TUNING.ARMOR_RUINSHAT = 2000
	TUNING.ARMOR_RUINSHAT_ABSORPTION = 120
	TUNING.ARMOR_SLURTLEHAT = 900
	TUNING.ARMOR_BEEHAT = 1500
	TUNING.ARMOR_SANITY = 2500
	TUNING.ARMOR_HIVEHAT = 5000
	TUNING.ARMOR_HIVEHAT_ABSORPTION = 2
	TUNING.ARMOR_SKELETONHAT = 1500
	TUNING.ARMOR_SKELETONHAT_ABSORPTION = 1
	--TUNING.HAMMER_LOOT_PERCENT = 0.75
	--TUNING.GOLDENTOOLFACTOR = 5
	TUNING.AXE_USES = GetModConfigData("AXE_USES")
	TUNING.PICKAXE_USES = GetModConfigData("PICKAXE_USES")
	TUNING.GOLDENAXE_USES = 400
	TUNING.HAMMER_USES = GetModConfigData("HAMMER_USES")
	TUNING.SHOVEL_USES = GetModConfigData("SHOVEL_USES")
	TUNING.PITCHFORK_USES = GetModConfigData("PITCHFORK_USES")
	TUNING.SADDLEHORN_USES = GetModConfigData("SADDLEHORN_USES")
	TUNING.BRUSH_USES = GetModConfigData("BRUSH_USES")
	TUNING.TOUCH_STONE_USES = GetModConfigData("TOUCH_STONE_USES")
	TUNING.BUGNET_USES = 20
	TUNING.FISHINGROD_USES = 18
	TUNING.MULTITOOL_AXE_PICKAXE_USES = 400

	TUNING.SPEAR_USES = 150
	TUNING.SPIKE_USES = 200
	TUNING.BOOMERANG_USES = 20
	TUNING.NIGHTSWORD_USES = 200
	TUNING.HAMBAT_USES = 100
	TUNING.BATBAT_USES = 150
	TUNING.RUINS_BAT_USES = 300
	TUNING.WHIP_USES = 350
	TUNING.WATHGRITHR_SPEAR_USES = 200

	TUNING.AXE_DAMAGE = 27.2
	TUNING.GOLDENAXE_DAMAGE = 27.2
	TUNING.PICK_DAMAGE = 27.2
	TUNING.SHOVEL_DAMAGE = 17
	TUNING.GOLDENPICK_DAMAGE = 27.2
	TUNING.GOLDENSHOVEL_DAMAGE = 17
	TUNING.HAMMER_DAMAGE = 17
	TUNING.PITCHFORK_DAMAGE = 17
	TUNING.SADDLEHORN_DAMAGE = 17
	TUNING.BRUSH_DAMAGE = 27.2

		--Освещение
	TUNING.TORCH_DAMAGE = 17
	TUNING.LANTERN_DAMAGE = 10

		--Выживание
	TUNING.BUGNET_DAMAGE = 4.25
	TUNING.FISHINGROD_DAMAGE = 4.25
	TUNING.GRASS_UMBRELLA_DAMAGE = 10
	TUNING.UMBRELLA_DAMAGE = 17
	TUNING.COMPASS_DAMAGE = 10
	TUNING.MINIFAN_DAMAGE = 17

		--Наука
	TUNING.GUNPOWDER_DAMAGE = 200

		--Бой
	TUNING.SPEAR_DAMAGE = 34
	TUNING.HAMBAT_DAMAGE = 59.5
	TUNING.HAMBAT_MIN_DAMAGE_MODIFIER = 0.5
	TUNING.NIGHTSTICK_DAMAGE = 28.9
	TUNING.WHIP_DAMAGE = 54
	TUNING.PIPE_DART_DAMAGE = 100
	TUNING.YELLOW_DART_DAMAGE = 60
	TUNING.BOOMERANG_DAMAGE = 27.2
	TUNING.TRAP_TEETH_DAMAGE = 60

		--Магия
	TUNING.NIGHTSWORD_DAMAGE = 68
	TUNING.BATBAT_DAMAGE = 42.5

		--Одежда
	TUNING.CANE_DAMAGE = 17

		--Артефакты
	TUNING.MULTITOOL_DAMAGE = 30.6
	TUNING.RUINS_BAT_DAMAGE = 59.5

		--Прочее
	TUNING.SPIKE_DAMAGE = 51

		--Уиллоу
	TUNING.LIGHTER_DAMAGE = 17

		--Вуди
	TUNING.LUCY_DAMAGE = 13.6

		--Вигфрид
	TUNING.WATHGRITHR_SPEAR_DAMAGE = 42.5

	TUNING.SADDLE_BASIC_BONUS_DAMAGE = 0
	TUNING.SADDLE_BASIC_USES = GetModConfigData("SADDLE_BASIC_USES")
	TUNING.SADDLE_BASIC_SPEEDMULT = 1.4

	TUNING.SADDLE_WAR_BONUS_DAMAGE = 16
	TUNING.SADDLE_WAR_USES = GetModConfigData("SADDLE_WAR_USES")
	TUNING.SADDLE_WAR_SPEEDMULT = 1.25

	TUNING.SADDLE_RACE_BONUS_DAMAGE = 0
	TUNING.SADDLE_RACE_USES = GetModConfigData("SADDLE_RACE_USES")
	TUNING.SADDLE_RACE_SPEEDMULT = 1.55

	TUNING.SKELETON_SADDLE_BONUS_DAMAGE = 16
	TUNING.SKELETON_SADDLE_USES = 12
	TUNING.SKELETON_SADDLE_SPEEDMULT = 1.55

	TUNING.LUNAR_SADDLE_BONUS_DAMAGE = 25
	TUNING.LUNAR_SADDLE_USES = 12
	TUNING.LUNAR_SADDLE_SPEEDMULT = 1.25

	TUNING.SUN_SADDLE_BONUS_DAMAGE = 25
	TUNING.SUN_SADDLE_USES = 12
	TUNING.SUN_SADDLE_SPEEDMULT = 1.25

	TUNING.WINGED_SADDLE_BONUS_DAMAGE = 0
	TUNING.WINGED_SADDLE_USES = 10
	TUNING.WINGED_SADDLE_SPEEDMULT = 1.85

	TUNING.HORN_BUFF_POWER = GetModConfigData("power")
	TUNING.HORN_BUFF_TIME = GetModConfigData("time")

	TUNING.DINING_BUFF = 1.2

	AddPrefabPostInit("pitchfork", function(inst)
		if TUNING.PITCHFORK_USES < 200 then
			inst.components.finiteuses:SetConsumption(ACTIONS.TERRAFORM, 1)
		end
	end)

	AddPrefabPostInit("goldenaxe", function(inst)
		if inst.components.weapon then
			inst.components.weapon:SetDamage(TUNING.GOLDENAXE_DAMAGE)
		end
	end)

	AddPrefabPostInit("goldenpickaxe", function(inst)
		if inst.components.weapon then
			inst.components.weapon:SetDamage(TUNING.GOLDENPICK_DAMAGE)
		end
	end)

	AddPrefabPostInit("goldenshovel", function(inst)
		if inst.components.weapon then
			inst.components.weapon:SetDamage(TUNING.GOLDENSHOVEL_DAMAGE)
		end
	end)

	AddPrefabPostInit("lantern", function(inst)
		if TUNING.LANTERN_DAMAGE > 0 then
			inst:AddComponent("weapon")
			inst.components.weapon:SetDamage(TUNING.LANTERN_DAMAGE)
		end
	end)

	AddPrefabPostInit("umbrella", function(inst)
		if TUNING.UMBRELLA_DAMAGE > 0 then
			inst:AddComponent("weapon")
			inst.components.weapon:SetDamage(TUNING.UMBRELLA_DAMAGE)
		end
	end)

	AddPrefabPostInit("grass_umbrella", function(inst)
		if TUNING.GRASS_UMBRELLA_DAMAGE > 0 then
			inst:AddComponent("weapon")
			inst.components.weapon:SetDamage(TUNING.GRASS_UMBRELLA_DAMAGE)
		end
	end)

	AddPrefabPostInit("compass", function(inst)
		if inst.components.weapon then
			inst.components.weapon:SetDamage(TUNING.COMPASS_DAMAGE)
		end
	end)

	AddPrefabPostInit("lucy", function(inst)
		if inst.components.weapon then
			inst.components.weapon:SetDamage(TUNING.LUCY_DAMAGE)
		end
	end)

	--[[ Fueled Hats Functions E.g: Straw Hat, Beefalo Hat ]]--
	AddPrefabPostInit("pigman", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.fueled ~= nil then
	                item.components.fueled:StopConsuming()
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	AddPrefabPostInit("bunnyman", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.fueled ~= nil then
	                item.components.fueled:StopConsuming()
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	AddPrefabPostInit("pigguard", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.fueled ~= nil then
	                item.components.fueled:StopConsuming()
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	--[[ Mushroom Hats Functions E.g: Red Funcap, Blue Funcap ]]--
	AddPrefabPostInit("bunnyman", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.perishable ~= nil then
	                item.components.perishable:SetPerishTime(999999999)
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	AddPrefabPostInit("pigman", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.perishable ~= nil then
	                item.components.perishable:SetPerishTime(999999999)
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	AddPrefabPostInit("pigguard", function(inst)
	    if not GLOBAL.TheWorld.ismastersim then
	        return inst
	    end
	    if inst.components.trader ~= nil then
	        local onaccept = inst.components.trader.onaccept
	        local function new_onaccept(inst, giver, item)
	            onaccept(inst, giver, item)
	            if item.components.perishable ~= nil then
	                item.components.perishable:SetPerishTime(999999999)
	            end
	        end
	        inst.components.trader.onaccept = new_onaccept
	    end
	end)

	TUNING.SPMACE_USES = 200
	TUNING.SPMACE_DAMAGE = 42.5
	TUNING.MACE_USES = 170
	TUNING.MACE_DAMAGE = 30

	TUNING.GOLDENSPEAR_USES = 10
	TUNING.GOLDENSPEAR_DAMAGE = 20000

	if not GLOBAL.rawget(GLOBAL,"ALL_TRAPS") then
		GLOBAL.rawset(GLOBAL,"ALL_TRAPS",{})
	end
	GLOBAL.ALL_TRAPS["trap_lunar"] =
	{
		animal_damage = 100, --this is an example
		pvp_damage = 60,
		uses = 30,
	}
	GLOBAL.ALL_TRAPS["trap_marble"] =
	{
		animal_damage = 100, --this is an example
		pvp_damage = 60,
		uses = 30,
	}
PrefabFiles =
{
	"additional_walls",
	"axes",
	"ores",
	"boulders",
	"chestplates",
	"pickaxes",
	"helmets",
--[["amulets",
	"backpacks",]]
	"spears",
	"hammers",
--[["swords",
	"traps",
	"mwalls", ]] --It will be added at next updates
	"shovels",
	"plates",
	--TUNGSTEN
	"energy_fire",
	"tungstenore",
	"tungsten_spear",
	"rock_tough",
	"tungsten_firepit",
	"tungsten_axe",
	"armor_tungsten",
	"fireblade",
	"tungsten_pickaxe",
	"tungsten_spear_projectile",
	"tungsten_hardhat",
	"thermal_tetrahedron",
	"shiruken",
	"trap_tesla",
	--other mods
	"armor_stone",
	"armor_bone",
	"armor_my",--pez
	"fishbrella",
	--
	"lunaraxe",
	"lunarham",
	"lunarpick",
	"lunarstaff",
	"staffmeteor",
	"lunarspear",
	"lunarammy",
	"lunarshovel",
	"lunarshower",
	"lunararmor",
	"lunarang",
	"amuletmeteor",
	"trap_lunar",
	"lunartrapfx",
	"fireward",
	"fire_charge",
	"minirang",
	--
	"goldenhammer",
	"goldenpitchfork",
	"goldenrazor",
	"mace",
	"spmace",
	--
	"downvest_gray77",
	"downvest_blue77",
	"downvest_pink77",
	"downvest_yellow77",
	--
	"houndsbite",
	"goldsword",
	"iceblade",
	"marblblade",
	"goldarmor",
	"goldhelm",
	"strongsword",
	--
	"goldenspear",
	--
	"whitegem",
	"whitestaff",
	"whiteamulet",
	"diamondshot",
	"marblejavelin",
	"trap_marble",
	"marblemace",
	--
	"eel_torch",
	"greent",
	"bloodbag",
	--
	"smallbomb",
	"smallbombactive",
	"largebomb",
	"largebombactive",
	"spikebomb",
	"spikebombactive",
	"shadowbomb",
	"shadowbombactive",
	"shadowbombsmoke",
	"icebomb",
	"icebombactive",
	"voltbomb",
	"voltbombactive",
	"stickybomb",
	"stickybombactive",
	--
	"shadowtorch",
	"shadowtorchfire",
	"shadowhelm",
	"shadowspear",
	"shadow_spear_projectile",
	"shadowtrident",
	"shadowcirclet",
	"shadowstaff",
	"shadowstaffprojectile",

	--"shadowbatenemy",--
	--"shadowbatcave",--
	--"batdamageability",--
	--"shadowbatminion",--

	"lovelychest",
	"moving_box",
	"fyjiedeng",
	--"monsterskin",
	--
	"skeleton_saddle",
	"winged_saddle",
	"lunar_saddle",
	"sun_saddle",
	"book_notebook",
	"piratepack",
	"bedroll_bearger_fur",
	"bedroll_slurper_pelt",
	"monstermeatbat",
	"hornbuff",
	"diningtable",

	"bamboo",
	"bambootree",
	"dug_bambooTree",
	"hacking_bamboo_fx",
	"fabric",
}
GLOBAL.setmetatable(env,{__index=function(t,k) return GLOBAL.rawget(GLOBAL,k) end})

Assets =
{
	Asset("ATLAS", "inventoryimages/ore_iron.xml"),
	Asset("ATLAS", "inventoryimages/axe_iron.xml"),
	Asset("ATLAS", "inventoryimages/armor_iron.xml"),
	Asset("ATLAS", "inventoryimages/pickaxe_iron.xml"),
	Asset("ATLAS", "inventoryimages/helmet_iron.xml"),
	Asset("ATLAS", "inventoryimages/shovel_iron.xml"),
	Asset("ATLAS", "inventoryimages/hammer_iron.xml"),
	Asset("ATLAS", "inventoryimages/spear_iron.xml"),
	Asset("ATLAS", "inventoryimages/plate_iron.xml"),
	Asset("ATLAS", "inventoryimages/ore_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/axe_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/armor_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/pickaxe_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/helmet_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/shovel_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/hammer_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/spear_cobalt.xml"),
	Asset("ATLAS", "inventoryimages/plate_cobalt.xml"),

	Asset("ATLAS", "tungstenimages/inventoryimages.xml"),
	Asset("ATLAS", "tungstenimages/minimapicons.xml"),

	Asset("ATLAS", "inventoryimages/armor_stone.xml"),
	Asset("ATLAS", "inventoryimages/armor_bone.xml"),
	Asset("ATLAS", "inventoryimages/armor_my.xml"),
	Asset("ATLAS", "inventoryimages/fishbrella.xml"),

	Asset("ATLAS", "inventoryimages/goldenhammer.xml"),
	Asset("IMAGE", "inventoryimages/goldenhammer.tex"),
	Asset("ATLAS", "inventoryimages/goldenpitchfork.xml"),
	Asset("IMAGE", "inventoryimages/goldenpitchfork.tex"),
	Asset("ATLAS", "inventoryimages/goldenrazor.xml"),
	Asset("IMAGE", "inventoryimages/goldenrazor.tex"),

	Asset("IMAGE", "inventoryimages/spmace.tex"),
	Asset("ATLAS", "inventoryimages/spmace.xml"),
	Asset("IMAGE", "inventoryimages/mace.tex"),
	Asset("ATLAS", "inventoryimages/mace.xml"),

	Asset("ATLAS", "inventoryimages/eel_torch.xml"),
	Asset("ATLAS", "inventoryimages/greent.xml"),
	Asset("IMAGE", "inventoryimages/greent.tex"),
	Asset("ATLAS", "inventoryimages/bloodbag.xml"),
	Asset("IMAGE", "inventoryimages/bloodbag.tex"),
	Asset("IMAGE", "inventoryimages/shadowblueprint.tex"),
	Asset("ATLAS", "inventoryimages/shadowblueprint.xml"),

	Asset( "IMAGE", "inventoryimages/lovelychest.tex" ),
	Asset("ATLAS", "inventoryimages/lovelychest.xml"),

	Asset( "IMAGE", "inventoryimages/fyjiedeng.tex" ),
	Asset( "ATLAS", "inventoryimages/fyjiedeng.xml" ),
	Asset("ATLAS", "minimap/fyjiedeng.xml"),
  Asset("IMAGE", "minimap/fyjiedeng.tex"),

	Asset( "ATLAS", "inventoryimages/skeleton_saddle.xml" ),
	Asset( "ATLAS", "inventoryimages/winged_saddle.xml" ),
	Asset( "ATLAS", "inventoryimages/lunar_saddle.xml" ),
	Asset( "ATLAS", "inventoryimages/sun_saddle.xml" ),
	Asset( "ATLAS", "inventoryimages/monsterskin.xml"),
	Asset("ATLAS", "inventoryimages/bedroll_bearger_fur.xml"),
	Asset("ATLAS", "inventoryimages/bedroll_slurper_pelt.xml"),
	Asset("ATLAS", "inventoryimages/horn_charged.xml"),
	Asset( "IMAGE", "inventoryimages/diningtable.tex" ),
	Asset( "ATLAS", "inventoryimages/diningtable.xml" ),
	Asset( "IMAGE", "minimap/bambootree.tex" ),
	Asset( "ATLAS", "minimap/bambootree.xml" ),

}

--[[DESCRIPTION OF ITEMS]]
local _G = GLOBAL
local string = _G.STRINGS
local name = string.NAMES
local charDesc = string.CHARACTERS
local recipeDesc = string.RECIPE_DESC
local lang = (GetModConfigData("lang"))

local Ingredient = _G.Ingredient
local RECIPETABS = _G.RECIPETABS
local TECH = _G.TECH
local recipe = _G.Recipe

--[[NAMES]]
name.ORE_IRON = "Iron Ore"
name.ROCK_IRON = "Rusty Boulder"
name.AXE_IRON = "Iron Axe"
name.ARMOR_IRON = "Iron Chestplate"
name.PICKAXE_IRON = "Iron Pickaxe"
name.HELMET_IRON = "Iron Helmet"
name.SHOVEL_IRON = "Iron Shovel"
name.HAMMER_IRON = "Iron Hammer"
name.SPEAR_IRON = "Iron Spear"
name.PLATE_IRON = "Iron Plate"
name.ORE_COBALT = "Cobalt Ore"
name.ROCK_COBALT = "Blue Boulder"
name.AXE_COBALT = "Cobalt Axe"
name.ARMOR_COBALT = "Cobalt Chestplate"
name.PICKAXE_COBALT = "Cobalt Pickaxe"
name.HELMET_COBALT = "Cobalt Helmet"
name.SHOVEL_COBALT = "Cobalt Shovel"
name.HAMMER_COBALT = "Cobalt Hammer"
name.SPEAR_COBALT = "Cobalt Spear"
name.PLATE_COBALT = "Cobalt Plate"

--[[RECIPE DESCRIPTIONS]]

recipeDesc.AXE_IRON = "With this axe any tree can be chopped down!"
recipeDesc.ARMOR_IRON = "Cold and strong!"
recipeDesc.PICKAXE_IRON = "It can destruct any boulder on your way!"
recipeDesc.HELMET_IRON = "Harder than your head. Don't try to check it, ok?"
recipeDesc.SHOVEL_IRON = "It's an iron shovel."
recipeDesc.HAMMER_IRON = "Now you can crush and smash everything(not)!"
recipeDesc.SPEAR_IRON = "Don't touch the spearhead! It's very sharp."
recipeDesc.PLATE_IRON = "Flatter than Earth."
recipeDesc.GEARS = "La base de todos los artefactos"

recipeDesc.AXE_COBALT = "With this axe any tree can be chopped down!"
recipeDesc.ARMOR_COBALT = "Cold and strong!"
recipeDesc.PICKAXE_COBALT = "It can destruct any boulder on your way!"
recipeDesc.HELMET_COBALT = "Harder than your head. Don't try to check it, ok?"
recipeDesc.SHOVEL_COBALT = "It's an iron shovel."
recipeDesc.HAMMER_COBALT = "Now you can crush and smash everything(not)!"
recipeDesc.SPEAR_COBALT = "Don't touch the spearhead! It's very sharp."
recipeDesc.PLATE_COBALT = "Flatter than Earth."

--[[CHARACTER DESCRIPTIONS]]

--{{ORES}}
charDesc.GENERIC.DESCRIBE.ORE_IRON = "That's not a gold..."
charDesc.WX78.DESCRIBE.ORE_IRON="I made from that?"
charDesc.WICKERBOTTOM.DESCRIBE.ORE_IRON = "That's stronger than gold, but cheaper..."
charDesc.WENDY.DESCRIBE.ORE_IRON = "It's harder than all the other rocks!"
charDesc.WOLFGANG.DESCRIBE.ORE_IRON = "Hard materials for a hard mans!"
charDesc.WILLOW.DESCRIBE.ORE_IRON = "Time to create something dangerous with it"

charDesc.GENERIC.DESCRIBE.ORE_COBALT = "It's so c-c-cold-d..."

--{{BOULDERS}}
charDesc.GENERIC.DESCRIBE.ROCK_IRON = "Is it better than gold?"
charDesc.WX78.DESCRIBE.ROCK_IRON="HARD ROCK CONTAINS METAL...IRON"
charDesc.WICKERBOTTOM.DESCRIBE.ROCK_IRON = "Where have I seen this kind of boulders before..?"
charDesc.WENDY.DESCRIBE.ROCK_IRON = "Let's smash it into pieces!"
charDesc.WOLFGANG.DESCRIBE.ROCK_IRON = "I stronger, than it!"
charDesc.WILLOW.DESCRIBE.ROCK_IRON = "These look kind of funny"

charDesc.GENERIC.DESCRIBE.ROCK_COBALT = "This boulder are colder, than other."

--{{AXES}}
charDesc.GENERIC.DESCRIBE.AXE_IRON ="Woodie would have liked it"
charDesc.WX78.DESCRIBE.AXE_IRON="Initializing FORESTCUTTER.BAT..."
charDesc.WICKERBOTTOM.DESCRIBE.AXE_IRON = "Not Environmentally Friendly"
charDesc.WENDY.DESCRIBE.AXE_IRON = "Everything dies eventually. Even Trees."
charDesc.WOLFGANG.DESCRIBE.AXE_IRON = "Wood is WEAK, I am MIGHTY!"
charDesc.WILLOW.DESCRIBE.AXE_IRON = "Where do Trees go when they die? ON THE FIRE!"
charDesc.WOODIE.DESCRIBE.AXE_IRON = "Pfff... I have Lucy! She are the best!"

--{{ARMORS}}
charDesc.GENERIC.DESCRIBE.ARMOR_IRON ="Wow, that's so tough!"
charDesc.WX78.DESCRIBE.ARMOR_IRON="I made from iron and not needing this!"
charDesc.WICKERBOTTOM.DESCRIBE.ARMOR_IRON = "A hard chestplate in medieval style."
charDesc.WENDY.DESCRIBE.ARMOR_IRON = "Cold deep inside, like Abigail."
charDesc.WOLFGANG.DESCRIBE.ARMOR_IRON = "Stay Safe, Stay Cool, Stay MIGHTY!"
charDesc.WILLOW.DESCRIBE.ARMOR_IRON = "Safe AND Cold, That's no fun!"

charDesc.GENERIC.DESCRIBE.ARMOR_COBALT = "Please, give me something warm."

--{{PICKAXES}}
charDesc.GENERIC.DESCRIBE.PICKAXE_IRON ="I WILL DESTRUCT ANY STONES ON MY WAY!!!"

charDesc.GENERIC.DESCRIBE.PICKAXE_COBALT = "Pickaxe."
--{{HELMETS}}
charDesc.GENERIC.DESCRIBE.HELMET_IRON ="Good hat"

charDesc.GENERIC.DESCRIBE.HELMET_COBALT ="Very cold hat"
--{{SHOVELS}}
charDesc.GENERIC.DESCRIBE.SHOVEL_IRON = "Iron shovel. It's all."

charDesc.GENERIC.DESCRIBE.SHOVEL_COBALT = "Shovel"
--{{SPEARS}}
charDesc.GENERIC.DESCRIBE.SPEAR_IRON = "So sharp!"

charDesc.GENERIC.DESCRIBE.SPEAR_COBALT = "Spear"
--{{PLATES}}
charDesc.GENERIC.DESCRIBE.PLATE_IRON = "Flat as autor's jokes."

charDesc.GENERIC.DESCRIBE.PLATE_COBALT = "Flat and cold."

charDesc.GENERIC.DESCRIBE.TUNGSTEN_SPEAR = "It looks so sharp"
charDesc.WX78.DESCRIBE.TUNGSTEN_SPEAR="C HOW # IT IS?"
charDesc.WICKERBOTTOM.DESCRIBE.TUNGSTEN_SPEAR = "This is better than some flint weapon!"
charDesc.WENDY.DESCRIBE.TUNGSTEN_SPEAR = "I feel like impaling something..."
charDesc.WOLFGANG.DESCRIBE.TUNGSTEN_SPEAR = "It's not like I'd need this thing"
charDesc.WILLOW.DESCRIBE.TUNGSTEN_SPEAR = "Would be better if it burned, though"

charDesc.GENERIC.DESCRIBE.TUNGSTENORE = "What a tough stone"
charDesc.WX78.DESCRIBE.TUNGSTENORE="HARDNESS > 8"
charDesc.WICKERBOTTOM.DESCRIBE.TUNGSTENORE = "Tungsten... also referred to as Wolfram"
charDesc.WENDY.DESCRIBE.TUNGSTENORE = "It's harder than all the other rocks"
charDesc.WOLFGANG.DESCRIBE.TUNGSTENORE = "Hard materials for a hard man"
charDesc.WILLOW.DESCRIBE.TUNGSTENORE = "Time to create something dangerous with it"

charDesc.GENERIC.DESCRIBE.ROCK_TOUGH = "Is it better than gold?"
charDesc.WX78.DESCRIBE.ROCK_TOUGH="HARD ROCK CONTAINS HEAVY METAL"
charDesc.WICKERBOTTOM.DESCRIBE.ROCK_TOUGH = "Where have I seen this kind of boulders before..?"
charDesc.WENDY.DESCRIBE.ROCK_TOUGH = "Let's smash it into pieces"
charDesc.WOLFGANG.DESCRIBE.ROCK_TOUGH = "Not as tough as me!"
charDesc.WILLOW.DESCRIBE.ROCK_TOUGH = "These look kind of funny"

charDesc.GENERIC.DESCRIBE.TUNGSTEN_FIREPIT = "This makes me wonder if I could harness the power of the sun..."
charDesc.WX78.DESCRIBE.TUNGSTEN_FIREPIT="WARNING! TEMPERATURE ON CONSTANT HIGH LEVEL!"
charDesc.WICKERBOTTOM.DESCRIBE.TUNGSTEN_FIREPIT = "This fire seems to be highly effecient."
charDesc.WENDY.DESCRIBE.TUNGSTEN_FIREPIT = "A portal to Hell!"
charDesc.WOLFGANG.DESCRIBE.TUNGSTEN_FIREPIT = "Fire makes my muscles weep! Is good!"
charDesc.WILLOW.DESCRIBE.TUNGSTEN_FIREPIT = "That's a little hot even for ME!"

charDesc.GENERIC.DESCRIBE.TUNGSTEN_AXE ="Made from 50% real Treeguard!"
charDesc.WX78.DESCRIBE.TUNGSTEN_AXE="RUN COMMAND; DEFORESTATION.EXE"
charDesc.WICKERBOTTOM.DESCRIBE.TUNGSTEN_AXE = "Not Environmentally Friendly"
charDesc.WENDY.DESCRIBE.TUNGSTEN_AXE = "Everything dies eventually. Even Trees."
charDesc.WOLFGANG.DESCRIBE.TUNGSTEN_AXE = "Wood is WEAK, I am MIGHTY!"
charDesc.WILLOW.DESCRIBE.TUNGSTEN_AXE = "Where do Trees go when they die? ON THE FIRE!"

charDesc.GENERIC.DESCRIBE.ARMOR_TUNGSTEN ="Hmm, so safety can be cool? Who knew!"
charDesc.WX78.DESCRIBE.ARMOR_TUNGSTEN="THE COLD IS IRRELEVANT"
charDesc.WICKERBOTTOM.DESCRIBE.ARMOR_TUNGSTEN = "A low temperature protective device"
charDesc.WENDY.DESCRIBE.ARMOR_TUNGSTEN = "Cold deep inside, like Abigail."
charDesc.WOLFGANG.DESCRIBE.ARMOR_TUNGSTEN = "Stay Safe, Stay Cool, Stay MIGHTY!"
charDesc.WILLOW.DESCRIBE.ARMOR_TUNGSTEN = "Safe AND Cold, That's no fun!"

charDesc.WILLOW.DESCRIBE.FIREBLADE = "I don't mind the heat"

name.TUNGSTEN_SPEAR = "Tungsten Spear"
recipeDesc.TUNGSTEN_SPEAR = "Forged in fire"

name.THERMAL_TETRAHEDRON = "Thermal Tetrahedron"
recipeDesc.THERMAL_TETRAHEDRON = "Best way to store energy"

name.SHIRUKEN = "Batarang"
recipeDesc.SHIRUKEN = "High damage single use weapon"

name.TUNGSTENORE = "Tungsten Nugget"
recipeDesc.TUNGSTENORE = "Metallic Material"

name.ROCK_TOUGH = "Tough Stone"

name.TUNGSTEN_FIREPIT = "Tungsten Firepit"
recipeDesc.TUNGSTEN_FIREPIT = "Improved Firepit that gives off more heat"

name.TUNGSTEN_AXE = "Corrupt Cutter"
recipeDesc.TUNGSTEN_AXE = "It hates Trees"

name.ARMOR_TUNGSTEN = "Zero Kelvin Suit"
recipeDesc.ARMOR_TUNGSTEN = "Cold as deep space"

name.FIREBLADE = "Fire Fleur"
recipeDesc.FIREBLADE = "Might be too hot for you"

name.WALL_TUNGSTEN_ITEM = "Tungsten Wall"
recipeDesc.WALL_TUNGSTEN_ITEM = "Better protection for your Base"

name.WALL_TUNGSTEN = "Tungsten Wall"

name.TUNGSTEN_PICKAXE = "Infiniminer"
recipeDesc.TUNGSTEN_PICKAXE = "Feasts upon the blood of your foes"

name.TUNGSTEN_HARDHAT = "Tungsten Hardhat"
recipeDesc.TUNGSTEN_HARDHAT = "Burns your nightmares"

name.TRAP_TESLA = "Tesla Trap"
recipeDesc.TRAP_TESLA = "Efficient base defense"

AddMinimapAtlas("tungstenimages/minimapicons.xml")

name.ARMOR_STONE = "Stone Suit"
recipeDesc.ARMOR_STONE = "Improve your Log Suit with Rocks"
charDesc.GENERIC.DESCRIBE.ARMOR_STONE = "A more 'stoney' Log Suit"

name.ARMOR_BONE = "Bone Suit"
recipeDesc.ARMOR_BONE = "Improve your Stone Suit with Bones"
charDesc.GENERIC.DESCRIBE.ARMOR_BONE = "A more 'boney' Stone Suit"

name.ARMOR_MY = "Fish Armor"
recipeDesc.ARMOR_MY = "Slippery armored piece of fish."
charDesc.GENERIC.DESCRIBE.ARMOR_MY = "Slippery armored piece of fish."
do
	local MISS_CHANCE = 0.5 --анс промаха.
	local inventory = GLOBAL.require "components/inventory"
	local old_ApplyDamage = inventory.ApplyDamage
	function inventory:ApplyDamage(damage,...) --€нжектимсЯ в ApplyDamage
		local armor = self:GetEquippedItem(GLOBAL.EQUIPSLOTS.BODY) --Џолучаем указатель на броню (если есть)
		if armor and armor.prefab=="armor_my" and math.random() < MISS_CHANCE then
			return 0 --‚ случае промаха нулевой урон.
		end
		return  old_ApplyDamage(self,damage,...) --€наче все, как обычно.
	end
end
AddPrefabPostInit("world",function()
AddIngredientValues({"armor_my"},{meat=1, fish=2})
end)

name.FISHBRELLA = "Fishbrella"
recipeDesc.FISHBRELLA = "Fish against the rain."
charDesc.GENERIC.DESCRIBE.FISHBRELLA = "Fish against the rain."

name.LUNARAXE = "Lunar Axe"
charDesc.GENERIC.DESCRIBE.LUNARAXE = "Sharpest axe you can find around here."
recipeDesc.LUNARAXE = "Axe that is out of this world."

name.LUNARSHOVEL = "Lunar Spade"
charDesc.GENERIC.DESCRIBE.LUNARSHOVEL = "This tool can dig for way longer than any other shovel."
recipeDesc.LUNARSHOVEL = "Dig for eternity."

name.LUNARHAM = "Lunar Mallet"
charDesc.GENERIC.DESCRIBE.LUNARHAM = "A sturdy hammer strong enough to smash anything and everything."
recipeDesc.LUNARHAM = "Masterful tool of mashing."

name.LUNARPICK = "Lunar Pickaxe"
charDesc.GENERIC.DESCRIBE.LUNARPICK = "No stone on this earth can withstand the strength of this pickaxe."
recipeDesc.LUNARPICK = "A pick to pierce the heavens."

name.LUNARSPEAR = "Celestial Lance"
charDesc.GENERIC.DESCRIBE.LUNARSPEAR = "The clouds split apart at the sight of this beautiful weapon."
recipeDesc.LUNARSPEAR = "Reach for the stars."

name.LUNARAMMY= "Anti-Gravity Amulet"
charDesc.GENERIC.DESCRIBE.LUNARAMMY = "Just staring at this makes me feel like I'm floating."
recipeDesc.LUNARAMMY = "Take the weight off of your shoulders."

name.LUNARSTAFF = "Meteor Shower"
charDesc.GENERIC.DESCRIBE.LUNARSTAFF = "Time to make some wishes."
recipeDesc.LUNARSTAFF = "The sky shall fall."

name.LUNARARMOR = "Lunar Armor"
charDesc.GENERIC.DESCRIBE.LUNARARMOR = "Wearing this makes me feel like I'm slipping through reality."
recipeDesc.LUNARARMOR = "Phase away from existence."

name.LUNARANG = "Lunarang"
charDesc.GENERIC.DESCRIBE.LUNARANG = "A boomerang that is bound to the stars."
recipeDesc.LUNARANG = "That's no moon."

name.MINIRANG = "Minirang"
charDesc.GENERIC.DESCRIBE.MINIRANG = "Technically I shouldn't be in possession of this..."
recipeDesc.MINIRANG = "Wew Lad."

name.TRAP_LUNAR = "Lunar Trap"
charDesc.GENERIC.DESCRIBE.TRAP_LUNAR = "Makes use of fancy satellites in the sky."
recipeDesc.TRAP_LUNAR = "Low Orbit Ion Cannon."

name.FIREWARD = "Lunarius Shootius"
charDesc.GENERIC.DESCRIBE.FIREWARD = "Make a wish!"
recipeDesc.FIREWARD = "High-end base defense."

name.GOLDENHAMMER = "Fancy Hammer"
recipeDesc.GOLDENHAMMER = "Bash in style."

name.GOLDENPITCHFORK = "Snazzy Pitchfork"
recipeDesc.GOLDENPITCHFORK = "Landscaping at its best."

name.GOLDENRAZOR = "Stylish Razor"
recipeDesc.GOLDENRAZOR = "The most luxurious shave."

name.SPMACE = "Spiked Mace"
recipeDesc.SPMACE = "Crush and stab."
charDesc.GENERIC.DESCRIBE.SPMACE = "It's all spikey."
name.MACE = "Mace"
recipeDesc.MACE = "Crush your enemies."
charDesc.GENERIC.DESCRIBE.MACE = "It's heavy."

name.DOWNVEST_GRAY77 = "DownVestGray77"    --名字
recipeDesc.DOWNVEST_GRAY77 = "Need a warm armor?"  --配方上面的描述
charDesc.GENERIC.DESCRIBE.DOWNVEST_GRAY77 = "I think I need a cool gray armor."  --人物检查的描述

name.DOWNVEST_BLUE77 = "DownVestBlue77"    --名字
recipeDesc.DOWNVEST_BLUE77 = "Need a warm armor?"  --配方上面的描述
charDesc.GENERIC.DESCRIBE.DOWNVEST_BLUE77 = "I think I need a melancholy blue armor."  --人物检查的描述

name.DOWNVEST_PINK77 = "DownVestPink77"    --名字
recipeDesc.DOWNVEST_PINK77 = "Need a warm armor?"  --配方上面的描述
charDesc.GENERIC.DESCRIBE.DOWNVEST_PINK77 = "I think I need a cute pink armor."  --人物检查的描述

name.DOWNVEST_YELLOW77 = "DownVestYellow77"    --名字
recipeDesc.DOWNVEST_YELLOW77 = "Need a warm armor?"  --配方上面的描述
charDesc.GENERIC.DESCRIBE.DOWNVEST_YELLOW77 = "I think I need a sunshine yellow armor."

name.HOUNDSBITE = "Hound's Bite Mace"
recipeDesc.HOUNDSBITE = "Its bites will hurt far worse than hound's."
charDesc.GENERIC.DESCRIBE.HOUNDSBITE = "I really wouldn't want to get hit with that thing"

name.GOLDSWORD = "Golden Sword"
recipeDesc.GOLDSWORD = "Its as deadly as its shiny"
charDesc.GENERIC.DESCRIBE.GOLDSWORD = "I really don't know what to do with my gold..."

name.ICEBLADE = "Sword of Ice"
recipeDesc.ICEBLADE = "It chills the air around its blade."
charDesc.GENERIC.DESCRIBE.ICEBLADE = "I hope I won't catch a cold using it."

name.MARBLBLADE = "Marble Sword"
recipeDesc.MARBLBLADE = "Its so heavy, it will crush what it can't slice."
charDesc.GENERIC.DESCRIBE.MARBLBLADE = "Looks heavy, can I even lift it?"

name.GOLDARMOR = "Golden Armor"
recipeDesc.GOLDARMOR = "Makes you look like a king. And protects you too."
charDesc.GENERIC.DESCRIBE.GOLDARMOR = "Well, at least it sturdier than wood"

name.GOLDHELM = "Golden Helmet"
recipeDesc.GOLDHELM = "Who needs a crown? This thing shines AND protects."
charDesc.GENERIC.DESCRIBE.GOLDHELM = "Golden helm for golden mind. Great."

name.STRONGSWORD = "Strong Sword"
recipeDesc.STRONGSWORD = "Bigger, stronger."
charDesc.GENERIC.DESCRIBE.STRONGSWORD = "At least it's not heavier"

name.GOLDENSPEAR = "Golden Spear"
recipeDesc.GOLDENSPEAR = "Gold is more durable?"
charDesc.GENERIC.DESCRIBE.GOLDENSPEAR = "Gold is more durable?"

name.WHITEGEM = "White Gem"
charDesc.GENERIC.DESCRIBE.WHITEGEM = "An unnaturally white gemstone."
recipeDesc.WHITEGEM = "Bright and fancy."

name.WHITESTAFF = "Ballistic Staff"
charDesc.GENERIC.DESCRIBE.WHITESTAFF = "Shoots a projectile made of heavy light."
recipeDesc.WHITESTAFF = "It's like old school RPG magic."

name.WHITEAMULET = "Enervating Amulet"
charDesc.GENERIC.DESCRIBE.WHITEAMULET = "This amulet is ratiating exhaustion."
recipeDesc.WHITEAMULET = "Combat is tiring."

name.MARBLEJAVELIN = "Marble Javelin"
charDesc.GENERIC.DESCRIBE.MARBLEJAVELIN = "Throwable pain."
recipeDesc.MARBLEJAVELIN = "Stab anything from afar."

name.TRAP_MARBLE = "Marble Caltrop"
charDesc.GENERIC.DESCRIBE.TRAP_MARBLE = "Such a finely crafted trap."
recipeDesc.TRAP_MARBLE = "Slow things down."

name.MARBLEMACE = "Marble Mace"
charDesc.GENERIC.DESCRIBE.MARBLEMACE = "Heavy and lethal."
recipeDesc.MARBLEMACE = "Heavy load coming through."

name.EEL_TORCH = "Eelight"
recipeDesc.EEL_TORCH = "Hide, nightmares!"
charDesc.GENERIC.DESCRIBE.EEL_TORCH = "Hide, nightmares!"

name.GREENT = "Green torch"
recipeDesc.GREENT = "What torch could be more disgusting?"
charDesc.GENERIC.DESCRIBE.GREENT = "Torch from green stuff..Ewww"

name.SMALLBOMB = "Small Bomb"
charDesc.GENERIC.DESCRIBE.SMALLBOMB = "A tiny explosive."
recipeDesc.SMALLBOMB = "Packs a tiny punch."

name.LARGEBOMB = "Large Bomb"
charDesc.GENERIC.DESCRIBE.LARGEBOMB = "Gotta be careful with this one."
recipeDesc.LARGEBOMB = "Military grade explosive."

name.SPIKEBOMB = "Spore Bomb"
charDesc.GENERIC.DESCRIBE.SPIKEBOMB = "Kind of difficult to hold."
recipeDesc.SPIKEBOMB = "Crowd control."

name.SHADOWBOMB = "Shadow Bomb"
charDesc.GENERIC.DESCRIBE.SHADOWBOMB = "This one will blow your mind."
recipeDesc.SHADOWBOMB = "Fearful firepower."

name.ICEBOMB = "Ice Bomb"
charDesc.GENERIC.DESCRIBE.ICEBOMB = "It's an explosive ice cube."
recipeDesc.ICEBOMB = "Jack Frost's favorite."

name.VOLTBOMB = "Volt Bomb"
charDesc.GENERIC.DESCRIBE.VOLTBOMB = "What a shocking little bomb."
recipeDesc.VOLTBOMB = "How scientific."

name.STICKYBOMB = "Sticky Bomb"
charDesc.GENERIC.DESCRIBE.STICKYBOMB = "A disgusting but effective bomb."
recipeDesc.STICKYBOMB = "Time for a sticky situation."

name.SHADOWTORCH = "Shadow Torch"
charDesc.GENERIC.DESCRIBE.SHADOWTORCH = "A darker version of light."
recipeDesc.SHADOWTORCH = "Burn deep into your mind."

name.SHADOWSPEAR = "Shadow Spear"
charDesc.GENERIC.DESCRIBE.SHADOWSPEAR = "I can stab things with the essence of nothing. Neat."
recipeDesc.SHADOWSPEAR = "Illusionary Weapon."

name.SHADOWTRIDENT = "Devil's Pitchfork"
charDesc.GENERIC.DESCRIBE.SHADOWTRIDENT = "Even the shadows fear this weapon."
recipeDesc.SHADOWTRIDENT = "Trident of the beast."

name.SHADOWHELM = "Bat Hat"
charDesc.GENERIC.DESCRIBE.SHADOWHELM = "It's dangerous putting nightmares so close to your brain."
recipeDesc.SHADOWHELM = "Insane brain container."

name.SHADOWCIRCLET = "Enigmatic Crown"
charDesc.GENERIC.DESCRIBE.SHADOWCIRCLET = "Frightening and fancy"
recipeDesc.SHADOWCIRCLET = "Ruler of nothing."

name.SHADOWSTAFF = "Vampire Staff"
charDesc.GENERIC.DESCRIBE.SHADOWSTAFF = "Very spooky."
recipeDesc.SHADOWSTAFF = "The wings are necessary."

name.SHADOWBATCAVE = "Spooky Den"
charDesc.GENERIC.DESCRIBE.SHADOWBATCAVE = "I can hear ominous breathing coming from this hole."

name.SHADOWBATENEMY = "Flying Terror"
charDesc.GENERIC.DESCRIBE.SHADOWBATENEMY = "Fast moving nightmare incarnate."

name.SHADWOBATMINION = "Flying Minion"
charDesc.GENERIC.DESCRIBE.SHADWOBATMINION = "Tiny terrors."

name.BLOODBAG = "Blood Bag"
charDesc.GENERIC.DESCRIBE.BLOODBAG = "I wonder if it's my blood type..."
charDesc.WX78.DESCRIBE.BLOODBAG = "I SHOULD NOT NEED THIS."
charDesc.WENDY.DESCRIBE.BLOODBAG = "If only my sister had this..."
charDesc.WILLOW.DESCRIBE.BLOODBAG = "I wonder if this burns..."
recipeDesc.BLOODBAG = "A bag full of blood."

name.LOVELYCHEST = "Lovely Chest"
recipeDesc.LOVELYCHEST = "Its so Pink!"
charDesc.GENERIC.DESCRIBE.LOVELYCHEST = "Its rather decorative."
AddMinimapAtlas("inventoryimages/lovelychest.xml")

name.MOVING_BOX = "Moving Box"
name.MOVING_BOX_FULL = "Moving Box (Full)"
recipeDesc.MOVING_BOX = "You can use it to move structures."

charDesc.GENERIC.DESCRIBE.MOVING_BOX = "It's a box I can move things with."
charDesc.WEBBER.DESCRIBE.MOVING_BOX = "It's a big box for us to move things with."

charDesc.GENERIC.ACTIONFAIL.UNPACK =
{
	GENERIC = "I can't unpack that now!",
	NOROOM = "There is not enough room to unpack that here."
}

name.FYJIEDENG = "Street lamp"
recipeDesc.FYJIEDENG = "Street lamp\nilluminating"
charDesc.GENERIC.DESCRIBE.FYJIEDENG = "Street lamp"
AddMinimapAtlas("minimap/fyjiedeng.xml")

name.SKELETON_SADDLE = "Bone Saddle"
charDesc.GENERIC.DESCRIBE.SKELETON_SADDLE = "this beastly ride will help me in my fights"
recipeDesc.SKELETON_SADDLE = "Bone Saddle"

name.WINGED_SADDLE = "Winged Saddle"
charDesc.GENERIC.DESCRIBE.WINGED_SADDLE = "wigfrids helmet..?..!"
recipeDesc.WINGED_SADDLE = "Winged Saddle"

name.LUNAR_SADDLE = "Lunar Saddle"
charDesc.GENERIC.DESCRIBE.LUNAR_SADDLE = "Can craddle a North Star.."
recipeDesc.LUNAR_SADDLE = "Lunar Saddle"

name.SUN_SADDLE = "Solar Saddle"
charDesc.GENERIC.DESCRIBE.SUN_SADDLE = "Can craddle a Dwarf Star.."
recipeDesc.SUN_SADDLE = "Solar Saddle"

name.MONSTERSKIN = "monsterskin"
charDesc.GENERIC.DESCRIBE.SUN_SADDLE = "Can craddle a Dwarf Star.."

name.BOOK_NOTEBOOK = "Notebook"
recipeDesc.BOOK_NOTEBOOK = "Better ink than memory!"
charDesc.GENERIC.DESCRIBE.BOOK_NOTEBOOK = "Should I take down some notes?"
string.NOTEBOOK    =
{
    BOOKTITLELEFT   = "\"",
    BOOKTITLERIGHT  = "\"",
    BUTTON_CANCEL   = "Cancel",
    BUTTON_CLEAR    = "Clear",
    BUTTON_ACCEPT   = "Accept",
    BUTTON_LASTPAGE = "Last Page",
    BUTTON_NEXTPAGE = "Next Page",
}

name.BEDROLL_BEARGER_FUR = "Bearger fur bedroll"
charDesc.GENERIC.DESCRIBE.BEDROLL_BEARGER_FUR = "Quite a soft bedroll."
recipeDesc.BEDROLL_BEARGER_FUR = "In such a suited as a bed."

name.BEDROLL_SLURPER_PELT = "Slurper pelt bedroll"
charDesc.GENERIC.DESCRIBE.BEDROLL_SLURPER_PELT = "It looks soldy and creepy."
recipeDesc.BEDROLL_SLURPER_PELT = "Magic bedroll."

name.MONSTERMEATBAT = "Monster Ham Bat"
charDesc.GENERIC.DESCRIBE.MONSTERMEATBAT = "a Worst way to use food"
recipeDesc.MONSTERMEATBAT = "It doesnt take food to make food"

name.DININGTABLE = "Dining table"
charDesc.GENERIC.DESCRIBE.DININGTABLE = "Have a good meal!"
recipeDesc.DININGTABLE = "Have a good meal!"
string.DININGTABLE_NONE = "none"
string.DINE = "dine"

name.BAMBOO = "Bamboo"
charDesc.GENERIC.DESCRIBE.BAMBOO = "Maybe I can bamboozle my enemies with this?"
charDesc.WILLOW.DESCRIBE.BAMBOO = "Looks flammable."
charDesc.WENDY.DESCRIBE.BAMBOO = "Green sticks... who cares..."
charDesc.WOLFGANG.DESCRIBE.BAMBOO = "Very mighty building material!"
charDesc.WICKERBOTTOM.DESCRIBE.BAMBOO = "A useful material of high tensile strength."
charDesc.WATHGRITHR.DESCRIBE.BAMBOO = "Sticks of great versatility."
charDesc.WAXWELL.DESCRIBE.BAMBOO = "I have several ideas in mind for this."
charDesc.WX78.DESCRIBE.BAMBOO = "Looks flammable."
charDesc.WOODIE.DESCRIBE.BAMBOO = "Looks flammable."

name.BAMBOOTREE = "Bamboo Patch"
charDesc.GENERIC.DESCRIBE.BAMBOOTREE = {
	GENERIC = "Looks pretty sturdy.",
	BURNING = "Bye bye, bamboo.",
	BURNT = "I feel like I could have prevented that.",
	CHOPPED = "Take that, nature!"
}
name.DUG_BAMBOOTREE = "Bamboo Root"
charDesc.GENERIC.DESCRIBE.DUG_BAMBOOTREE = "I need to plant this."
name.DEPLETED_BAMBOOTREE = "Bamboo Patch"
charDesc.GENERIC.DESCRIBE.DEPLETED_BAMBOOTREE = "Will it grow again?"
AddMinimapAtlas("minimap/bambootree.xml")

name.FABRIC = "Cloth"
charDesc.GENERIC.DESCRIBE.FABRIC = "Soft cloth made from hard roots!"
recipeDesc.FABRIC = "Bamboo is so versatile!"

--[[RECIPES]]
AddRecipe("moving_box",
{Ingredient("papyrus", 3), Ingredient("silk", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,
nil, -- placer
nil, -- min_spacing
nil, -- nounlock
nil, -- numtogive
nil, -- builder_tag
"images/inventoryimages/box.xml", -- atlas
"box.tex")
modimport("scripts/Pack.lua")
modimport("scripts/Note.lua")
modimport("scripts/BattleHorn.lua")

Recipe("saddle_basic", { Ingredient("beefalowool", 4),Ingredient("pigskin", 1), Ingredient("goldnugget", 4)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil, nil , nil, nil)

Recipe("saddle_war", { Ingredient("rabbit", 6),Ingredient("log", 10), Ingredient("rope", 2)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil, nil , nil, nil)

Recipe("saddle_race", { Ingredient("livinglog", 2),Ingredient("beefalowool", 20), Ingredient("butterflywings", 10),Ingredient("saddle_basic", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil, nil , nil, nil)

AddRecipe("skeleton_saddle",
{Ingredient("nightmarefuel", 5), Ingredient("fossil_piece", 1),Ingredient("saddle_race", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil,nil,nil,nil,"inventoryimages/skeleton_saddle.xml","skeleton_saddle.tex")

AddRecipe("lunar_saddle",
{Ingredient("trunk_winter", 1), Ingredient("moonrocknugget", 1),Ingredient("saddle_war", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil,nil,nil,nil,"inventoryimages/lunar_saddle.xml","lunar_saddle.tex")

AddRecipe("sun_saddle",
{Ingredient("trunk_summer", 1), Ingredient("goldnugget", 5),Ingredient("saddle_war", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil,nil,nil,nil,"inventoryimages/sun_saddle.xml","sun_saddle.tex")

AddRecipe("winged_saddle",
{Ingredient("feather_canary", 4), Ingredient("manrabbit_tail", 1),Ingredient("saddle_race", 1)},
RECIPETABS.TOOLS,TECH.SCIENCE_ONE,nil, nil,nil,nil,nil,"inventoryimages/winged_saddle.xml","winged_saddle.tex")

sweatervestRecipe = Recipe("sweatervest",{ Ingredient("houndstooth",8),Ingredient("fabric",2,"images/inventoryimages/inventoryimages.xml")},
RECIPETABS.DRESS,TECH.SCIENCE_TWO,nil, nil, nil , nil, nil)
local sweatervest_sortkey = AllRecipes["raincoat"]["sortkey"]
sweatervestRecipe.sortkey = sweatervest_sortkey + 0.1

trunkvest_summerRecipe = Recipe("trunkvest_summer",{ Ingredient("trunk_summer",1),Ingredient("fabric",2,"images/inventoryimages/inventoryimages.xml")},
RECIPETABS.DRESS,TECH.SCIENCE_TWO,nil, nil, nil , nil, nil)
trunkvest_summerRecipe.sortkey = sweatervest_sortkey + 0.2

trunkvest_winterRecipe = Recipe("trunkvest_winter",{ Ingredient("trunk_winter",1),Ingredient("fabric",2,"images/inventoryimages/inventoryimages.xml"),Ingredient("beefalowool",2)},
RECIPETABS.DRESS,TECH.SCIENCE_TWO,nil, nil, nil , nil, nil)
trunkvest_winterRecipe.sortkey = sweatervest_sortkey + 0.3

goggleshatRecipe = Recipe("goggleshat",{Ingredient("goldnugget", 1), Ingredient("fabric",1,"images/inventoryimages/inventoryimages.xml")},
RECIPETABS.DRESS, TECH.LOST)
local goggleshat_sortkey = AllRecipes["catcoonhat"]["sortkey"]
goggleshatRecipe.sortkey = goggleshat_sortkey + 0.1

AddMinimapAtlas("inventoryimages/piratepack.xml")
AddRecipe("piratepack",
{Ingredient("goldnugget", 15), Ingredient("boards", 10), Ingredient("rope", 5)},
RECIPETABS.SURVIVAL, TECH.SCIENCE_TWO, nil,nil,nil,nil,nil,"inventoryimages/piratepack.xml", "piratepack.tex" )
--[[IRON]]

AddRecipe("axe_iron",{
		Ingredient("twigs", 3),
		Ingredient("ore_iron", 4,"inventoryimages/ore_iron.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/axe_iron.xml", "axe_iron.tex")

AddRecipe("pickaxe_iron",{
		Ingredient("twigs", 3),
		Ingredient("ore_iron", 4,"inventoryimages/ore_iron.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/pickaxe_iron.xml", "pickaxe_iron.tex")

AddRecipe("shovel_iron",{
		Ingredient("twigs", 3),
		Ingredient("plate_iron", 1,"inventoryimages/plate_iron.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/shovel_iron.xml", "shovel_iron.tex")

AddRecipe("hammer_iron",{
		Ingredient("twigs", 3),
		Ingredient("ore_iron", 4,"inventoryimages/ore_iron.xml"),
		Ingredient("rope", 1)
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/hammer_iron.xml", "hammer_iron.tex")

AddRecipe("armor_iron",{
		Ingredient("plate_iron", 5,"inventoryimages/plate_iron.xml"),
		Ingredient("hammer", 1)
		},RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/armor_iron.xml", "armor_iron.tex")

AddRecipe("helmet_iron",{
		Ingredient("plate_iron", 3,"inventoryimages/plate_iron.xml")
		},RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/helmet_iron.xml", "helmet_iron.tex")

AddRecipe("spear_iron",{
		Ingredient("ore_iron", 2,"inventoryimages/ore_iron.xml"),
		Ingredient("twigs", 3),
		Ingredient("rope", 1)
		},RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/spear_iron.xml", "spear_iron.tex")

AddRecipe("plate_iron",{
		Ingredient("ore_iron", 3, "inventoryimages/ore_iron.xml"),
		},RECIPETABS.REFINE, TECH.SCIENCE_ONE, nil, nil, nil, nil ,nil, "inventoryimages/plate_iron.xml", "plate_iron.tex")

AddRecipe("gears",{
		Ingredient("ore_iron", 4, "inventoryimages/ore_iron.xml"),
		},RECIPETABS.REFINE, TECH.SCIENCE_TWO, nil, nil, nil, nil ,nil)

AddRecipe("trinket_6",{
		Ingredient("ore_iron", 3, "inventoryimages/ore_iron.xml"),
		Ingredient("ore_cobalt", 3, "inventoryimages/ore_cobalt.xml"),
		},RECIPETABS.REFINE, TECH.SCIENCE_TWO, nil, nil, nil, nil ,nil)

AddRecipe("trinket_11",{
		Ingredient("trinket_6", 7),
		Ingredient("plate_iron", 2, "inventoryimages/plate_iron.xml"),
		},RECIPETABS.REFINE, TECH.SCIENCE_TWO, nil, nil, nil, nil ,nil)

--[[COBALT]]

AddRecipe("axe_cobalt",{
		Ingredient("twigs", 3),
		Ingredient("ore_cobalt", 4,"inventoryimages/ore_cobalt.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/axe_cobalt.xml", "axe_cobalt.tex")

AddRecipe("pickaxe_cobalt",{
		Ingredient("twigs", 3),
		Ingredient("ore_cobalt", 4,"inventoryimages/ore_cobalt.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/pickaxe_cobalt.xml", "pickaxe_cobalt.tex")

AddRecipe("shovel_cobalt",{
		Ingredient("twigs", 3),
		Ingredient("plate_cobalt", 1,"inventoryimages/plate_cobalt.xml")
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/shovel_cobalt.xml", "shovel_cobalt.tex")

AddRecipe("hammer_cobalt",{
		Ingredient("twigs", 3),
		Ingredient("ore_cobalt", 4,"inventoryimages/ore_cobalt.xml"),
		Ingredient("rope", 1)
		},RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/hammer_cobalt.xml", "hammer_cobalt.tex")

AddRecipe("armor_cobalt",{
		Ingredient("plate_cobalt", 2, "inventoryimages/plate_cobalt.xml"),
		Ingredient("bluegem", 1),
		Ingredient("armor_iron", 1, "inventoryimages/armor_iron.xml")
		},RECIPETABS.WAR, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/armor_cobalt.xml", "armor_cobalt.tex")

AddRecipe("helmet_cobalt",{
		Ingredient("plate_cobalt", 1,"inventoryimages/plate_cobalt.xml"),
		Ingredient("helmet_iron", 1, "inventoryimages/helmet_iron.xml"),
		Ingredient("bluegem", 1)
		},RECIPETABS.WAR, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/helmet_cobalt.xml", "helmet_cobalt.tex")

AddRecipe("spear_cobalt",{
		Ingredient("ore_cobalt", 2,"inventoryimages/ore_cobalt.xml"),
		Ingredient("twigs", 3),
		Ingredient("rope", 1)
		},RECIPETABS.WAR, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/spear_cobalt.xml", "spear_cobalt.tex")

AddRecipe("plate_cobalt",{
		Ingredient("ore_cobalt", 3, "inventoryimages/ore_cobalt.xml"),
		},RECIPETABS.REFINE, TECH.SCIENCE_ONE, nil, nil, nil, nil ,nil, "inventoryimages/plate_cobalt.xml", "plate_cobalt.tex")

--[[TITAN]]

--[[TUNGSTEN]]
local tungsten = Ingredient("tungstenore", 1, "tungstenimages/inventoryimages.xml")

tungsten.amount = 3
AddRecipe("tungsten_spear", {Ingredient("twigs", 3), Ingredient("rope", 1), tungsten}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 4
AddRecipe("tungsten_axe", {Ingredient("purplegem", 2), Ingredient("livinglog", 2),Ingredient("nightmarefuel", 1), tungsten}, RECIPETABS.TOOLS, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 4
AddRecipe("armor_tungsten", {Ingredient("armor_cobalt", 1, "inventoryimages/armor_cobalt.xml"),Ingredient("purplegem", 1), Ingredient("ice", 4), tungsten}, RECIPETABS.WAR, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 5
AddRecipe("fireblade", {Ingredient("redgem", 2), tungsten, Ingredient("nightmarefuel", 2)}, RECIPETABS.WAR, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 1
AddRecipe("wall_tungsten_item", {Ingredient("cutstone", 1), tungsten}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, nil, nil, nil, 6, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 5
AddRecipe("tungsten_pickaxe", {Ingredient("purplegem", 2), Ingredient("livinglog", 3),Ingredient("nightmarefuel", 1), tungsten}, RECIPETABS.TOOLS, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 5
AddRecipe("tungsten_hardhat", {Ingredient("helmet_cobalt",1,"inventoryimages/helmet_cobalt.xml"), Ingredient("nightmarefuel", 1), tungsten, Ingredient("fireflies", 2)}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 4
AddRecipe("thermal_tetrahedron", {Ingredient("purplegem", 1), Ingredient("heatrock", 1), tungsten, Ingredient("moonrocknugget", 2)}, RECIPETABS.SURVIVAL, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml", "tetrahedron3.tex")

tungsten.amount = 2
AddRecipe("shiruken", {Ingredient("batwing", 1), Ingredient("goldnugget", 2), tungsten}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 10, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 4
AddRecipe("trap_tesla", {Ingredient("transistor", 3), Ingredient("lightninggoathorn", 1), Ingredient("moonrocknugget", 5), tungsten}, RECIPETABS.WAR, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

tungsten.amount = 4
AddRecipe("tungsten_firepit", {tungsten, Ingredient("cutstone", 5), Ingredient("boards", 3), Ingredient("transistor", 3)}, RECIPETABS.LIGHT, TECH.SCIENCE_TWO, "tungsten_firepit_placer", nil, nil, nil, nil, "tungstenimages/inventoryimages.xml")

local armor_stone = GLOBAL.Ingredient("armor_stone", 1)
armor_stone.atlas = "inventoryimages/armor_stone.xml"

AddRecipe("armor_stone", {
		Ingredient("armorwood", 1),
		Ingredient("rope", 2),
		Ingredient("rocks", 6)
	}, RECIPETABS.WAR,TECH.SCIENCE_TWO,nil,nil,nil,nil,nil,"inventoryimages/armor_stone.xml")

AddRecipe("armor_bone", {
		armor_stone,
		Ingredient("rope", 2),
		Ingredient("boneshard", 6)
	}, RECIPETABS.WAR,TECH.SCIENCE_TWO,nil,nil,nil,nil,nil,"inventoryimages/armor_bone.xml")
AddRecipe("armor_my", {
	Ingredient("pigskin", 2),
	Ingredient("flint", 1),
	Ingredient("fish", 4)
}, RECIPETABS.WAR,TECH.SCIENCE_ONE,nil,nil,nil,nil,nil,"inventoryimages/armor_my.xml")
AddRecipe("fishbrella", {
	Ingredient("twigs", 2),
	Ingredient("fish", 5)
}, RECIPETABS.DRESS,TECH.SCIENCE_TWO,nil,nil,nil,nil,nil,"inventoryimages/fishbrella.xml")

AddRecipe("lunarshovel", {
	Ingredient("flint", 1),
	Ingredient("boards", 1),
	Ingredient("moonrocknugget", 3)
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunarshovel.xml", "lunarshovel.tex")

AddRecipe("lunaraxe", {
	Ingredient("flint", 2),
	Ingredient("boards", 1),
	Ingredient("moonrocknugget", 4)
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunaraxe.xml", "lunaraxe.tex")

AddRecipe("lunarpick", {
	Ingredient("flint", 2),
	Ingredient("boards", 1),
	Ingredient("moonrocknugget", 4)
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunarpick.xml", "lunarpick.tex")

AddRecipe("lunarham", {
	Ingredient("rope", 2),
	Ingredient("boards", 1),
	Ingredient("moonrocknugget", 3)
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunarham.xml", "lunarham.tex")
AddRecipe("lunarspear", {
	Ingredient("rope", 2),
	Ingredient("boards", 1),
	Ingredient("moonrocknugget", 4)
}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunarspear.xml", "lunarspear.tex")

AddRecipe("lunararmor", {
	Ingredient("armormarble", 1),
	Ingredient("rope", 2),
	Ingredient("moonrocknugget", 6)
}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunararmor.xml", "lunararmor.tex")

AddRecipe("lunarang", {
	Ingredient("nightmarefuel", 2),
	Ingredient("silk", 4),
	Ingredient("moonrocknugget", 3)
}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/lunarang.xml", "lunarang.tex")

AddRecipe("lunarstaff", {
	Ingredient("purplegem", 1),
	Ingredient("livinglog", 2),
	Ingredient("moonrockcrater", 2)
}, RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "inventoryimages/lunarstaff.xml", "lunarstaff.tex")

AddRecipe("lunarammy", {
	Ingredient("goldnugget", 5),
	Ingredient("nightmarefuel", 2),
	Ingredient("moonrockcrater", 1)
}, RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "inventoryimages/lunarammy.xml", "lunarammy.tex")

AddRecipe("trap_lunar", {
	Ingredient("stinger", 2),
	Ingredient("transistor", 1),
	Ingredient("moonrockcrater", 1)
}, RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/trap_lunar.xml", "trap_lunar.tex")

AddRecipe("fireward", {
	Ingredient("livinglog", 2),
	Ingredient("transistor", 2),
	Ingredient("redmooneye", 1)
}, RECIPETABS.MAGIC, TECH.MAGIC_THREE, "fireward_placer", nil, nil, nil, nil, "inventoryimages/fireward.xml", "fireward.tex")

AddRecipe("goldenhammer", {
	Ingredient("twigs", 6),
	Ingredient("goldnugget", 4),
	Ingredient("rope", 2),
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/goldenhammer.xml", "goldenhammer.tex")

AddRecipe("goldenpitchfork", {
	Ingredient("twigs", 4),
	Ingredient("goldnugget", 3),
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/goldenpitchfork.xml", "goldenpitchfork.tex")

AddRecipe("goldenrazor", {
	Ingredient("twigs", 4),
	Ingredient("goldnugget", 3),
}, RECIPETABS.TOOLS, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/goldenrazor.xml", "goldenrazor.tex")

AddRecipe("spmace", {
	Ingredient("twigs", 3),
	Ingredient("houndstooth", 1),
	Ingredient("rocks", 2)
}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, nil, "inventoryimages/spmace.xml")

AddRecipe("mace", {
	Ingredient("twigs", 2),
	Ingredient("cutgrass", 3),
	Ingredient("rocks", 2)
}, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, nil, "inventoryimages/mace.xml")

AddRecipe("downvest_gray77", {
	Ingredient("beefalowool", 15),
	Ingredient("ash", 5),
	Ingredient("fabric", 2,"images/inventoryimages/inventoryimages.xml")
}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, nil, "inventoryimages/downvest_gray77.xml", "downvest_gray77.tex")

tungsten.amount = 1
AddRecipe("downvest_blue77", {
	Ingredient("beefalowool", 15),
	Ingredient("ice", 4),
	Ingredient("fabric", 2,"images/inventoryimages/inventoryimages.xml"),
	tungsten
}, RECIPETABS.WAR, TECH.SCIENCE_ONE,  nil, nil, nil, nil, nil, "inventoryimages/downvest_blue77.xml", "downvest_blue77.tex")

AddRecipe("downvest_pink77", {
	Ingredient("beefalowool", 15),
	Ingredient("healingsalve", 1),
	Ingredient("fabric", 2,"images/inventoryimages/inventoryimages.xml")
}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, nil, "inventoryimages/downvest_pink77.xml", "downvest_pink77.tex")

AddRecipe("downvest_yellow77", {
	Ingredient("beefalowool", 15),
	Ingredient("fabric", 2,"images/inventoryimages/inventoryimages.xml"),
	Ingredient("fireflies", 1),
	Ingredient("durian", 1)
}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, nil, "inventoryimages/downvest_yellow77.xml", "downvest_yellow77.tex")

--Hound's Bite Mace
TUNING.MAD_HOUNDSBITE = { damage = 50, uses = 150 }
AddRecipe("houndsbite",	{
	Ingredient("boards", 2),
	Ingredient("houndstooth", 2),
	Ingredient("rope", 2),
},RECIPETABS.WAR, TECH.SCIENCE_ONE,nil,nil,nil,nil,nil,"inventoryimages/houndsbite.xml" )

--Golden Sword
TUNING.MAD_GOLDSWORD = { damage = 75, uses = 100 }
AddRecipe("goldsword", {
	Ingredient("goldnugget", 5),
	Ingredient("phlegm", 1),
},RECIPETABS.WAR, TECH.SCIENCE_TWO,nil,nil,nil,nil,nil, "inventoryimages/goldsword.xml")

--Sword of Ice
TUNING.MAD_ICEBLADE = { damage = 25, uses = 40,
equippedheat = TUNING.BLUEGEM_COOLER*10, dapperness = TUNING.CRAZINESS_MED*0.5,
player_coldness = 0.5, temp_delta = -5, npc_coldness = 2 } --холод игрокам, температура игрокам, холод животным.
AddRecipe("iceblade", {
	Ingredient("ice", 12),
	Ingredient("bluegem", 2),
	Ingredient("nightsword", 1),
},RECIPETABS.MAGIC, TECH.MAGIC_THREE,nil,nil,nil,nil,nil, "inventoryimages/iceblade.xml")

--Marble Sword
TUNING.MAD_MARBLBLADE = { damage = 110, uses = 200, walkspeedmult = 0.75, hungerdelta = -2, hungerrate = 5 }
AddRecipe("marblblade", {
	Ingredient("marble", 5),
	Ingredient("phlegm", 1),
	Ingredient("purplegem", 1),
},RECIPETABS.WAR, TECH.SCIENCE_TWO,nil,nil,nil,nil,nil, "inventoryimages/marblblade.xml")

--Golden Armor
TUNING.MAD_GOLDARMOR = { absorption = 1.2, armor = TUNING.ARMORWOOD*2 } --90%; 900
AddRecipe("goldarmor", {
	Ingredient("goldnugget", 10),
	Ingredient("rope", 2),
	Ingredient("butter", 1)
},RECIPETABS.WAR, TECH.SCIENCE_TWO,nil,nil,nil,nil,nil, "inventoryimages/goldarmor.xml")

--Golden Helmet
TUNING.MAD_GOLDHELM = { absorption = 1 , armor = 825 } --90%; 825
AddRecipe("goldhelm", {
	Ingredient("goldnugget", 6),
	Ingredient("butter", 1)
},RECIPETABS.WAR, TECH.SCIENCE_TWO,nil,nil,nil,nil,nil, "inventoryimages/goldhelm.xml")

--Strong Sword
TUNING.MAD_STRONGSWORD = { damage = TUNING.NIGHTSWORD_DAMAGE*1.5, uses = TUNING.NIGHTSWORD_USES*3, -- 68*1.5=102; 100*3=300
	sanitydelta = -3, dapperness = TUNING.CRAZINESS_MED*1.2, }
AddRecipe("strongsword", {
	Ingredient("nightsword", 1),
	Ingredient("nightmarefuel", 10),
	Ingredient("purplegem", 1)
},RECIPETABS.MAGIC, TECH.MAGIC_THREE,nil,nil,nil,nil,nil, "inventoryimages/strongsword.xml")

AddPrefabPostInit("ice",function(inst)
    if not _G.TheWorld.ismastersim then
        return inst
    end
	inst.components.repairer.workrepairvalue = 0.5
end)

AddRecipe("goldenspear", {
  Ingredient("deerclops_eyeball", 1),
  Ingredient("goose_feather", 10),
	Ingredient("twigs", 40),
  Ingredient("goldnugget", 30)
}, RECIPETABS.WAR,  TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/goldenspear.xml", "goldenspear.tex")

AddRecipe("marblemace", {
	Ingredient("cutstone", 2),
	Ingredient("log", 3),
	Ingredient("marble", 5)
},RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, nil, nil, "inventoryimages/marblemace.xml", "marblemace.tex")

AddRecipe("trap_marble",
{Ingredient("stinger", 4), Ingredient("marble", 1), Ingredient("silk", 2)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, "trap_marble_placer", nil, nil, nil, nil, "inventoryimages/trap_marble.xml", "trap_marble.tex")

AddRecipe("marblejavelin",
{Ingredient("flint", 2), Ingredient("marble", 1), Ingredient("boards", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 5, nil, "inventoryimages/marblejavelin.xml", "marblejavelin.tex")

AddRecipe("whitegem",
{Ingredient("marble", 1), Ingredient("nightmarefuel", 1), Ingredient("purplegem", 1)},
RECIPETABS.REFINE, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/whitegem.xml", "whitegem.tex")

AddRecipe("whitestaff",
{Ingredient("livinglog", 2), Ingredient("nightmarefuel", 2), Ingredient("whitegem", 1, "inventoryimages/whitegem.xml")},
RECIPETABS.MAGIC, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/whitestaff.xml", "whitestaff.tex")

AddRecipe("whiteamulet",
{Ingredient("goldnugget", 5), Ingredient("nightmarefuel", 2), Ingredient("whitegem", 1, "inventoryimages/whitegem.xml")},
RECIPETABS.MAGIC, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/whiteamulet.xml", "whiteamulet.tex")

AddRecipe("eel_torch",
{ Ingredient("eel", 3), Ingredient("twigs", 2), Ingredient("lightbulb", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO,nil,nil,nil,nil,nil,"inventoryimages/eel_torch.xml")

AddRecipe("greent", {
	Ingredient("twigs", 3),
	Ingredient("slurtleslime", 2),
	Ingredient("cutgrass", 1)
}, RECIPETABS.LIGHT, TECH.SCIENCE_ONE,nil,nil,nil,nil,nil,"inventoryimages/greent.xml")

AddRecipe("bloodbag",
{Ingredient("mosquito", 4), Ingredient("rope", 1), Ingredient("silk", 2) },
RECIPETABS.SURVIVAL, TECH.SCIENCE_TWO, nil, nil, nil, 1, nil, "inventoryimages/bloodbag.xml", "bloodbag.tex")

AddRecipe("smallbomb",
{Ingredient("flint", 2), Ingredient("papyrus", 1), Ingredient("nitre", 2)},
RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, 3, nil, "inventoryimages/smallbomb.xml", "smallbomb.tex")

AddRecipe("largebomb",
{Ingredient("cutstone", 2), Ingredient("papyrus", 1), Ingredient("gunpowder", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 3, nil, "inventoryimages/largebomb.xml", "largebomb.tex")

AddRecipe("spikebomb",
{Ingredient("green_cap", 3), Ingredient("spoiled_food", 6), Ingredient("gunpowder", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 3, nil, "inventoryimages/spikebomb.xml", "spikebomb.tex")

AddRecipe("shadowbomb",
{Ingredient("monstermeat", 3), Ingredient("livinglog", 1), Ingredient("nightmarefuel", 3)},
RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, 3, nil, "inventoryimages/shadowbomb.xml", "shadowbomb.tex")

AddRecipe("icebomb",
{Ingredient("ice", 6), Ingredient("papyrus", 1), Ingredient("nitre", 3)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 3, nil, "inventoryimages/icebomb.xml", "icebomb.tex")

AddRecipe("voltbomb",
{Ingredient("transistor", 1), Ingredient("papyrus", 1), Ingredient("lightninggoathorn", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 3, nil, "inventoryimages/voltbomb.xml", "voltbomb.tex")

AddRecipe("stickybomb",
{Ingredient("slurtleslime", 2), Ingredient("papyrus", 1), Ingredient("phlegm", 1)},
RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 3, nil, "inventoryimages/stickybomb.xml", "stickybomb.tex")

AddRecipe("shadowspear",
{Ingredient("spear", 1), Ingredient("nightmarefuel", 4)},
RECIPETABS.MAGIC, TECH.MAGIC_TWO, nil, nil, nil, nil, nil, "inventoryimages/shadowspear.xml", "shadowspear.tex")

AddRecipe("shadowtorch",
{Ingredient("torch", 1), Ingredient("nightmarefuel", 3)},
RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "inventoryimages/shadowtorch.xml", "shadowtorch.tex")

AddRecipe("shadowhelm",
{Ingredient("pigskin", 1), Ingredient("nightmarefuel", 2), Ingredient("batwing", 2)},
RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "inventoryimages/shadowhelm.xml", "shadowhelm.tex")

AddRecipe("shadowstaff",
{Ingredient("purplegem", 1), Ingredient("nightmarefuel", 3), Ingredient("batwing", 2)},
RECIPETABS.MAGIC, TECH.MAGIC_THREE, nil, nil, nil, nil, nil, "inventoryimages/shadowstaff.xml", "shadowstaff.tex")

AddRecipe("shadowtrident",
{Ingredient("spear", 1), Ingredient("nightmarefuel", 3), Ingredient("livinglog", 2)},
RECIPETABS.MAGIC, TECH.LOST, nil, nil, nil, nil, nil, "inventoryimages/shadowtrident.xml", "shadowtrident.tex")

AddRecipe("shadowcirclet",
{Ingredient("purplegem", 1), Ingredient("nightmarefuel", 4), Ingredient("moonrocknugget", 4)},
RECIPETABS.MAGIC, TECH.LOST, nil, nil, nil, nil, nil, "inventoryimages/shadowcirclet.xml", "shadowcirclet.tex")

AddRecipe("lovelychest",
{Ingredient("boards", 4), Ingredient("pigskin", 1), Ingredient("glommerfuel", 4)},
RECIPETABS.TOWN, TECH.SCIENCE_TWO, "lovelychest_placer", 1, nil, nil, nil, "inventoryimages/lovelychest.xml", "lovelychest.tex")

local fyjiedeng = GLOBAL.Recipe("fyjiedeng", {Ingredient("yellowmooneye", 1), Ingredient("transistor", 2), Ingredient("cutstone", 3)}, RECIPETABS.TOWN, TECH.SCIENCE_TWO, "fyjiedeng_placer",1)
fyjiedeng.atlas = "inventoryimages/fyjiedeng.xml"

AddRecipe("book_notebook",
{ Ingredient("papyrus", 2), Ingredient("pigskin", 1)},
 RECIPETABS.TOOLS, TECH.NONE, nil, nil, nil, nil, nil, "inventoryimages/book_notebook.xml", nil, nil)

 AddRecipe("bedroll_bearger_fur",
 {Ingredient("bearger_fur", 1), Ingredient("bedroll_straw", 1), Ingredient("silk", 60)},
 RECIPETABS.SURVIVAL, TECH.SCIENCE_TWO, nil, nil, nil, 1, nil, "inventoryimages/bedroll_bearger_fur.xml" ,"bedroll_bearger_fur.tex")

 AddRecipe("bedroll_slurper_pelt",
 {Ingredient("slurper_pelt", 10), Ingredient("nightmarefuel", 10), Ingredient("rope", 3)},
 RECIPETABS.SURVIVAL, TECH.MAGIC_TWO, nil, nil, nil, 1, nil, "inventoryimages/bedroll_slurper_pelt.xml", "bedroll_slurper_pelt.tex")

 AddRecipe("monstermeatbat",
 {Ingredient("twigs", 2), Ingredient("monstermeat", 2), Ingredient("tentaclespots", 1) },
 RECIPETABS.WAR, TECH.SCIENCE_TWO, nil, nil, nil, 1, nil, "inventoryimages/monstermeatbat.xml")

 AddRecipe("diningtable",
 {Ingredient("marble", 2), Ingredient("boards", 2), Ingredient("bluegem", 1)},
 RECIPETABS.TOWN, TECH.SCIENCE_TWO, "diningtable_placer", 1.5, nil, nil, nil,"inventoryimages/diningtable.xml")
 modimport("scripts/Diningtable.lua")

 AddRecipe("fabric",
 {Ingredient("bamboo",3,"images/inventoryimages/inventoryimages.xml"),Ingredient("silk",1)},
 RECIPETABS.REFINE, TECH.SCIENCE_ONE, nil, nil, nil, 1, nil,"images/inventoryimages/inventoryimages.xml")

--prefab migration
--this will convert the old "tungsten" spear with the new "tungsten_spear" spear
local old_SpawnPrefab = GLOBAL.SpawnPrefab
GLOBAL.SpawnPrefab = function(name, skin, skin_id, creator)
	return old_SpawnPrefab(name == "tungsten" and "tungsten_spear" or name, skin, skin_id, creator)
end

-- OK, listen: The following code was copied from "Throwable Spears". My modifications are minor. This is supposed to enable compatibility with Throwable Spears.
-- I do not claim the following code to be my own code, it's just there to assure compatibility!
if GLOBAL.KnownModIndex:IsModEnabled(GLOBAL.KnownModIndex:GetModActualName("Throwable Spears")) then
	local SMALL_MISS_CHANCE =  GLOBAL.GetModConfigData("SMALL_MISS_CHANCE", GLOBAL.KnownModIndex:GetModActualName("Throwable Spears"))
	local SMALL_USES =  GLOBAL.GetModConfigData("SMALL_USES", GLOBAL.KnownModIndex:GetModActualName("Throwable Spears"))
	local LARGE_USES =  GLOBAL.GetModConfigData("LARGE_USES", GLOBAL.KnownModIndex:GetModActualName("Throwable Spears"))
	local RANGE_CHECK =  GLOBAL.GetModConfigData("RANGE_CHECK", GLOBAL.KnownModIndex:GetModActualName("Throwable Spears"))

	local smallhits =
	{
		frog = true,
		penguin = true,
		eyeplant = true,
	}

	local function spearthrow_onattack(inst, attacker, target, skipsanity)
	    local smalltarget = target:HasTag("smallcreature")
	                and not target:HasTag("spider")
	                and not smallhits[target.prefab]
	    local missed = false
	    local spear = GLOBAL.SpawnSaveRecord(inst._spear)
	    spear.Transform:SetPosition(inst:GetPosition():Get())
	    if math.random() < SMALL_MISS_CHANCE and smalltarget then
	        missed = true
	        if attacker.components and attacker.components.talker then
	            local miss_message = "Ugh, I don't think I can hit something that small!"
	            if attacker.prefab == 'wx78' then miss_message = "INSUFFICIENT ACCURACY" end
	            attacker.components.talker:Say(miss_message)
	            target:PushEvent("attacked", {attacker = attacker, damage = 0, weapon = spear})
	        end
	    else
	        if target.components.combat then
	            spear.projectile = true
	            target.components.combat:GetAttacked(attacker, attacker.components.combat:CalcDamage(target, spear), spear)
	        end
	    end
	    if spear.components.finiteuses then
	        spear.components.finiteuses:Use((smalltarget and not missed)
	            and GLOBAL.TUNING.SPEAR_USES/SMALL_USES
	            or GLOBAL.TUNING.SPEAR_USES/LARGE_USES)
	    end
	    spear:AddTag("scarytoprey")
	    spear:DoTaskInTime(1, function(inst) inst:RemoveTag("scarytoprey") end)
	    inst:Remove()

	    attacker.SoundEmitter:PlaySound("dontstarve/wilson/attack_weapon", nil, nil, true)
	end

	AddPrefabPostInit("tungsten_spear", function(inst)
		if not GLOBAL.TheWorld.ismastersim then return end

		inst:AddComponent('spearthrowable')
		inst.components.spearthrowable:SetRange(8, 10)
		inst.components.spearthrowable:SetOnAttack(spearthrow_onattack)
		inst.components.spearthrowable:SetProjectile("tungsten_spear_projectile")
	end)

	function ShadowSpearPostInit(inst)
		local spear = inst
		local function onattack(inst, attacker, target, skipsanity)
			local smalltarget = target:HasTag("smallcreature") and not smallhits[target.prefab]
			local missed = false
			if target.components.combat then
				target:PushEvent("attacked", {attacker = attacker, 0, weapon = spear})
			end
			attacker.components.sanity:DoDelta(-5)
			local newspear = GLOBAL.SpawnPrefab('shadowspear')
			newspear.Transform:SetPosition(inst:GetPosition():Get())
			if newspear.components.finiteuses then
				newspear.components.finiteuses:SetUses(spear.components.finiteuses:GetUses())
				newspear.components.finiteuses:Use(3)
			end
			inst:Remove()
		-- spear.parent.AnimState:OverrideSymbol("swap_object", "", "")
			spear:Remove()
		end

		local function playsound (inst, attacker, target)
			attacker.SoundEmitter:PlaySound("dontstarve/wilson/attack_weapon", nil, nil, true)
		end
		inst:AddComponent('spearthrowable')
		inst.components.spearthrowable:SetRange(8, 10)
		inst.components.spearthrowable:SetOnAttack(onattack)
		inst.components.spearthrowable:SetOnProjectileLaunch(playsound)
		inst.components.spearthrowable:SetProjectile("shadow_spear_projectile")
	end
	AddPrefabPostInit("shadowspear", ShadowSpearPostInit)
end

function BluePrintEffect(inst)
	function newcolor(inst)
		if inst.recipetouse == "shadowtrident" or inst.recipetouse == "shadowcirclet" or inst.recipetouse == "shadowstaff" then
			if inst.components.inventoryitem then
    		inst.entity:AddSoundEmitter()
				inst.components.inventoryitem.imagename = "shadowblueprint"
    		inst.components.inventoryitem.atlasname = "inventoryimages/shadowblueprint.xml"
	 				function onignite(inst)
    				inst.SoundEmitter:PlaySound("dontstarve/creatures/leif/livinglog_burn")
					end
 				function FuelTaken(inst, taker)
    			if taker ~= nil and taker.SoundEmitter ~= nil then
        		taker.SoundEmitter:PlaySound("dontstarve/creatures/leif/livinglog_burn")
    			end
				end
			end
	    inst:ListenForEvent("onignite", onignite)
	    inst.components.fuel:SetOnTakenFn(FuelTaken)
		 	inst.components.fuel.fuelvalue = TUNING.MED_FUEL
			inst.AnimState:SetMultColour(0, 0, 0, 0.5)
		end
	end
 	inst:DoTaskInTime(0, newcolor)
end
AddPrefabPostInit("blueprint", BluePrintEffect)

AddPrefabPostInit("crawlinghorror", CrawlingLoot)
AddPrefabPostInit("crawlingnightmare", CrawlingLoot)
function CrawlingLoot (inst)
	inst.components.lootdropper:AddChanceLoot("shadowtrident_blueprint", 0.05)
end

AddPrefabPostInit("terrorbeak", TerrorLoot)
AddPrefabPostInit("nightmarebeak", TerrorLoot)
function TerrorLoot (inst)
	inst.components.lootdropper:AddChanceLoot("shadowcirclet_blueprint", 0.05)
end

function TreeFunction (inst)
	function OnWorkedMe(inst)
		if inst:HasTag("burnt") or inst:HasTag("stump") then
			local x, y, z = inst.Transform:GetWorldPosition()
 			local unit = GLOBAL.SpawnPrefab("shadowbatcave")
 			unit.Transform:SetPosition(x, y, z)
		else
		end
	end
	--inst:ListenForEvent("worked", OnWorkedMe)--
end
--AddPrefabPostInit("livingtree", TreeFunction)--

 modimport("scripts/Marble.lua")
----------------------------------------------DROP-----------------------------------------
local function change_rockdrop(ent,drop_rate)
  return function(inst)
    if inst and inst.components.lootdropper then
      if drop_rate and 0 <= drop_rate then
        local ld = inst.components.lootdropper
        ld:AddChanceLoot(ent, drop_rate)
      end
    end
  end
end

AddPrefabPostInit("rock1", change_rockdrop("ore_iron",0.15))
AddPrefabPostInit("rock2", change_rockdrop("ore_iron",0.25))
AddPrefabPostInit("rock_moon", change_rockdrop("ore_iron",0.25))

AddPrefabPostInit("rock1", change_rockdrop("ore_cobalt",0.05))
AddPrefabPostInit("rock2", change_rockdrop("ore_cobalt",0.15))
AddPrefabPostInit("rock_moon", change_rockdrop("ore_cobalt",0.25))
