--[[
BY
 _____   _____   __   _
|  _  \ /  _  \ |  \ | |
| | | | | | | | |   \| |
| | | | | | | | | |\   |
| |_| | | |_| | | | \  |
|_____/ \_____/ |_|  \_|

]]

local Ingre = GLOBAL.Ingredient
local RecTab = GLOBAL.RECIPETABS
local RecTabLvl = GLOBAL.TECH
local CHARACTER_INGREDIENT = GLOBAL.CHARACTER_INGREDIENT

local prefabsfilesdon = { "rpgdon_potions", "rpgdon_fx", "rpgdon_books", "rpgdon_weapons",--[["donfurnace_potions",
"donforge_workbench",]] "rpgdon_tools",--[[ "donmob_maxwell_boss", "donreviverdark", "donmod_maxwellboss_pet", "donphonograph",]] "donskeletonmob",
"weapondon_shadow_fx_blue", "weapondon_shadow_fx_multicolor", "weapondon_shadow_fx_purple", "weapondon_shadow_fx_purple_low",
"weapondon_shadow_fx_red", "weapondon_shadow_fx_yellow"  }


--local iconsminimapdon = { "donfurnacepotionsmap", "donforgeworkbenchmap", "donbossmaxwellsmap" }

local inventoryimagesdon = { --[["donfurnace_potions", "donforge_workbench",]] "donpotionempty", "donpotionlife", "donpotionstrange", "donpotionfood", "donpotionsanity", "donpotionlight",
"donpotionmaxlife", "donpotionpoisonous", "donpotionsleep",--[["donbookpotionsvol1", "donbookpotionsvol2",]] "donrpgweapon_eyeteleport",
"donrpgweapon_pests", "donrpgweapon_animals", "donrpgtools_axe_blue", "donrpgtools_axe_red", "donrpgtools_axe_purple", "donrpgtools_pickaxe_blue",
"donrpgtools_pickaxe_red", "donrpgtools_pickaxe_purple", "donrpgtools_spear_blue", "donrpgtools_spear_red", "donrpgtools_spear_purple",
--[["donbooktoolandweaponsvol1", "donbooktoolandweaponsvol2", "donbooktoolandweaponsvol3",]] "donbooknecronomicon",--[["donreviverdark", "donphonograph"]]}

local mainimagesdon = {  }

local donpotion = Ingre("donpotionempty", 1, "images/inventoryimages/donpotionemptyicon.xml")
local recipeslistdon = {


	--GERAL ITENS:
	{
		prefabname = "donrpgtools_axe_blue",
		ingres = { Ingre("axe", 1) ,Ingre("blue_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_axe_red",
		ingres = { Ingre("axe", 1) ,Ingre("red_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_axe_purple",
		ingres = { Ingre("axe", 1) ,Ingre("nightmarefuel", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 50)},
		tab =RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_pickaxe_blue",
		ingres = { Ingre("pickaxe", 1) ,Ingre("blue_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_pickaxe_red",
		ingres = { Ingre("pickaxe", 1) ,Ingre("red_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_pickaxe_purple",
		ingres = { Ingre("pickaxe", 1) ,Ingre("nightmarefuel", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 50)},
		tab =RecTab.TOOLS,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_spear_blue",
		ingres = { Ingre("spear", 1) ,Ingre("blue_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.WAR,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_spear_red",
		ingres = { Ingre("spear", 1) ,Ingre("red_cap", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 25)},
		tab = RecTab.WAR,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgtools_spear_purple",
		ingres = { Ingre("spear", 1) ,Ingre("nightmarefuel", 1),Ingre(CHARACTER_INGREDIENT.SANITY, 50)},
		tab =RecTab.WAR,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
{
		prefabname = "donpotionempty",
		ingres = { Ingre("nitre", 2) },
		tab = RecTab.REFINE,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionlife",
		ingres = { donpotion,Ingre("spidergland", 1),Ingre("ash", 1),Ingre("cutgrass", 1),Ingre("poop", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionstrange",
		ingres = { donpotion,Ingre("spoiled_food", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionfood",
		ingres = { donpotion,Ingre("carrot", 1),Ingre("monstermeat", 1),Ingre("log", 1),Ingre("berries", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionsanity",
		ingres = { donpotion,Ingre("froglegs", 1),Ingre("cutgrass", 1),Ingre("green_cap", 1),Ingre("red_cap", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionlight",
		ingres = { donpotion,Ingre("red_cap", 1),Ingre("froglegs", 1),Ingre("berries", 1),Ingre("ash", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionmaxlife",
		ingres = { donpotion,Ingre("spidergland", 5),Ingre("butterfly", 2),Ingre("red_cap", 3),Ingre("froglegs", 2)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionpoisonous",
		ingres = { donpotion,Ingre("bee", 1),Ingre("poop", 1),Ingre("monstermeat", 1),Ingre("cutgrass", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donpotionsleep",
		ingres = { donpotion,Ingre("honey", 1),Ingre("froglegs", 1),Ingre("pinecone", 1),Ingre("petals", 1)},
		tab =RecTab.SURVIVAL,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
--[[
	--STRUCTURES
	{
		prefabname = "donfurnace_potions",
		ingres = { Ingre("cutstone", 2), Ingre("nightmarefuel", 2), Ingre("twigs", 3) },
		tab = RecTab.FARM,
		tablvl = RecTabLvl.SCIENCE_TWO,
		placer = "donfurnace_potions_placer",
		imgicon = "donfurnace_potionsicon",
	},
	{
		prefabname = "donforge_workbench",
		ingres = { Ingre("cutstone", 3), Ingre("gears", 1), Ingre("log", 3) },
		tab = RecTab.SCIENCE,
		tablvl = RecTabLvl.SCIENCE_TWO,
		placer = "donforge_workbench_placer",
		imgicon = "donforge_workbenchicon",
	},

	--BOOKS:
	{
		prefabname = "donbookpotionsvol1",
		ingres = { Ingre("papyrus", 2), Ingre("petals", 2) },
		tab = RecTab.SURVIVAL,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donbookpotionsvol2",
		ingres = { Ingre("papyrus", 2), Ingre("petals", 2) },
		tab = RecTab.SURVIVAL,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donbooktoolandweaponsvol1",
		ingres = { Ingre("papyrus", 2), Ingre("flint", 2) },
		tab = RecTab.SURVIVAL,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donbooktoolandweaponsvol2",
		ingres = { Ingre("papyrus", 2), Ingre("flint", 2) },
		tab = RecTab.SURVIVAL,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donbooktoolandweaponsvol3",
		ingres = { Ingre("papyrus", 2), Ingre("flint", 2) },
		tab = RecTab.SURVIVAL,
		tablvl = RecTabLvl.SCIENCE_ONE,
		placer = nil,
		imgicon = nil,
	},]]

	{
		prefabname = "donbooknecronomicon",
		ingres = { Ingre("papyrus", 4), Ingre("nightmarefuel", 2), Ingre("spidergland", 1) },
		tab = RecTab.MAGIC,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},

	--STAFFS
	{
		prefabname = "donrpgweapon_eyeteleport",
		ingres = { Ingre("twigs", 3), Ingre("purplegem", 1) },
		tab = RecTab.MAGIC,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgweapon_pests",
		ingres = { Ingre("twigs", 3), Ingre("nightmarefuel", 2), Ingre("batwing", 1) },
		tab = RecTab.MAGIC,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},
	{
		prefabname = "donrpgweapon_animals",
		ingres = { Ingre("twigs", 3), Ingre("petals", 6), Ingre("poop", 4) },
		tab = RecTab.MAGIC,
		tablvl = RecTabLvl.MAGIC_TWO,
		placer = nil,
		imgicon = nil,
	},


}


------------AutoLoad:

--Sounds:
table.insert(Assets, Asset("SOUNDPACKAGE", "sound/rpgdongeralsounds.fev"))
table.insert(Assets, Asset("SOUND", "sound/rpgdongeralsounds_bank00.fsb"))


--Prefabs
for i, v in ipairs(prefabsfilesdon) do
	table.insert(PrefabFiles, v)
end

--Images/Atlas:
for i, v in ipairs(inventoryimagesdon) do
	table.insert(Assets, Asset("ATLAS", "images/inventoryimages/"..v.."icon.xml"))
	table.insert(Assets, Asset("IMAGE", "images/inventoryimages/"..v.."icon.tex"))
end

--Loads:
for i, v in ipairs(mainimagesdon) do
	table.insert(Assets, Asset("ATLAS", "images/"..v..".xml"))
	table.insert(Assets, Asset("IMAGE", "images/"..v..".tex"))
end


--MiniMap:
--[[for i, v in ipairs(iconsminimapdon) do
	AddMinimapAtlas("images/minimap/"..v..".xml")
end]]

--Recipes:
for i, v in ipairs(recipeslistdon) do
	if v.imgicon == nil then
		v.imgicon = (v.prefabname.."icon")
	end

	AddRecipe(v.prefabname, v.ingres, v.tab, v.tablvl, v.placer, nil, nil, nil, nil, "images/inventoryimages/"..v.imgicon..".xml", v.imgicon..".tex")
end
