-- Copyright (c) 2013-18 rubenwardy and Wuzzy. MIT.

local S = awards.translator


-- You Suck!
awards.register_award("award_you_suck", {
	title = S("You Suck!"),
	description = S("Die 10 times."),
	trigger = {
		type = "death",
		target = 10
	},
	secret = true,
})

-- This ensures the following code is executed after all items have been registered
core.after(0, function()
	local inventorycube = core.inventorycube

	local mineable_image = inventorycube("thinkingwitharrows_nodes_mineable_block.png")
	local arrow_image = "x_bows_arrow_wood.png"

	--[[ For the future
	local button1_image = inventorycube("thinkingwitharrows_buttons_button_block_1.png")
	local button2_image = inventorycube("thinkingwitharrows_buttons_button_block_2.png")
	local target_image = inventorycube("thinkingwitharrows_bows_target.png")
	local reflector_image = inventorycube("thinkingwitharrows_bows_reflector_side.png", "thinkingwitharrows_bows_reflector_side.png", "thinkingwitharrows_bows_reflector_front.png")
	local arrow_block_image = inventorycube("thinkingwitharrows_bows_arrow_block.png")
	local bow_image = "x_bows_bow_wood.png"
	local antigravity_toggle_image = inventorycube("thinkingwitharrows_antigravity_toggle_top.png", "thinkingwitharrows_antigravity_toggle_side.png", "thinkingwitharrows_antigravity_toggle_side.png")
	--]]

	-- Builder series
	awards.register_award("awards_builder1", {
		title = S("Builder"),
		icon = mineable_image,
		trigger = {
			type = "place",
			target = 25,
		},
	})
	awards.register_award("awards_builder2", {
		title = S("Engineer"),
		icon = mineable_image,
		trigger = {
			type = "place",
			target = 100,
		},
		requires = {"awards_builder1"},
	})
	awards.register_award("awards_builder3", {
		title = S("Architect"),
		icon = mineable_image,
		trigger = {
			type = "place",
			target = 200,
		},
		requires = {"awards_builder1", "awards_builder2"},
	})
	awards.register_award("awards_builder4", {
		title = S("Master Architect"),
		icon = mineable_image,
		trigger = {
			type = "place",
			target = 500,
		},
		requires = {"awards_builder1", "awards_builder2", "awards_builder3"},
	})

	-- Archer series
	awards.register_award("awards_shoot1", {
		title = S("Beginning Archer"),
		icon = arrow_image,
		trigger = {
			type = "shoot",
			target = 25,
		},
	})
	awards.register_award("awards_shoot2", {
		title = S("Starting Archer"),
		icon = arrow_image,
		trigger = {
			type = "shoot",
			target = 100,
		},
		requires = {"awards_shoot1"},
	})
	awards.register_award("awards_shoot3", {
		title = S("Better Archer"),
		icon = arrow_image,
		trigger = {
			type = "shoot",
			target = 200,
		},
		requires = {"awards_shoot1", "awards_shoot2"},
	})
	awards.register_award("awards_shoot4", {
		title = S("Advanced Archer"),
		icon = arrow_image,
		trigger = {
			type = "shoot",
			target = 500,
		},
		requires = {"awards_shoot1", "awards_shoot2", "awards_shoot3"},
	})
	awards.register_award("awards_shoot5", {
		title = S("Expert Archer"),
		icon = arrow_image,
		trigger = {
			type = "shoot",
			target = 1000,
		},
		requires = {"awards_shoot1", "awards_shoot2", "awards_shoot3", "awards_shoot4"},
	})

	--[[
	awards.register_award("awards_win", {
		title = S("Win"),
		--icon = "awards_master_architect.png^awards_level4.png",
		trigger = {
			type = "win",
		},
	})
	--]]
end)
