code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-02-21 05:50-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: api.lua
msgid "Secret Achievement Unlocked:"
msgstr ""

#: api.lua
msgid "Achievement Unlocked:"
msgstr ""

#: api.lua
#, lua-format
msgid "Secret Achievement Unlocked: %s"
msgstr ""

#: api.lua
#, lua-format
msgid "Achievement Unlocked: %s"
msgstr ""

#: api.lua
msgid "Secret Achievement Unlocked!"
msgstr ""

#: api.lua
msgid "Achievement Unlocked!"
msgstr ""

#: api.lua
msgid "Error: No awards available."
msgstr ""

#: api.lua
msgid "OK"
msgstr ""

#: api.lua
msgid "(Secret Award)"
msgstr ""

#: api.lua
msgid "Unlock this award to find out what it is."
msgstr ""

#: api.lua
#, lua-format
msgid "%s (got)"
msgstr ""

#: api.lua
msgid "You've disabled awards. Type /awards enable to reenable."
msgstr ""

#: api.lua
msgid "You have not unlocked any awards."
msgstr ""

#: api.lua
#, lua-format
msgid "%s’s awards:"
msgstr ""

#: api.lua chat_commands.lua
#, lua-format
msgid "%s: %s"
msgstr ""

#: sfinv.lua unified_inventory.lua
msgid "Awards"
msgstr ""

#: triggers.lua
msgid "@1/@2 dug"
msgstr ""

#. Translators: @1 is count, @2 is description.
#: triggers.lua
msgid "Mine: @2"
msgid_plural "Mine: @1×@2"
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "Mine @1 block."
msgid_plural "Mine @1 blocks."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 placed"
msgstr ""

#. Translators: @1 is count, @2 is description.
#: triggers.lua
msgid "Place: @2"
msgid_plural "Place: @1×@2"
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "Place a block."
msgid_plural "Place @1 blocks."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 eaten"
msgstr ""

#. Translators: @1 is count, @2 is description.
#: triggers.lua
msgid "Eat: @2"
msgid_plural "Eat: @1×@2"
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "Eat an item."
msgid_plural "Eat @1 items."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 deaths"
msgstr ""

#: triggers.lua
msgid "Die."
msgid_plural "Die @1 times."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 chat messages"
msgstr ""

#: triggers.lua
msgid "Write something in chat."
msgid_plural "Write @1 chat messages."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 game joins"
msgstr ""

#: triggers.lua
msgid "Join the game."
msgid_plural "Join the game @1 times."
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "@1/@2 crafted"
msgstr ""

#. Translators: @1 is count, @2 is description.
#: triggers.lua
msgid "Craft: @2"
msgid_plural "Craft: @1×@2"
msgstr[0] ""
msgstr[1] ""

#: triggers.lua
msgid "Craft an item."
msgid_plural "Craft @1 items."
msgstr[0] ""
msgstr[1] ""

#: init.lua
msgid "Saint-Maclou"
msgstr ""

#: init.lua
msgid "Place 20 coal checkers."
msgstr ""

#: init.lua
msgid "Castorama"
msgstr ""

#: init.lua
msgid "Place 20 iron checkers."
msgstr ""

#: init.lua
msgid "Sam the Trapper"
msgstr ""

#: init.lua
msgid "Place 2 trap stones."
msgstr ""

#: init.lua
msgid "Backpacker"
msgstr ""

#: init.lua
msgid "Craft 4 large bags."
msgstr ""

#: init.lua
msgid "Pyromaniac"
msgstr ""

#: init.lua
msgid "Craft 8 times flint and steel."
msgstr ""

#: init.lua
msgid "Firefighter"
msgstr ""

#: init.lua
msgid "Put out 1000 fires."
msgstr ""

#: init.lua
msgid "Light It Up"
msgstr ""

#: init.lua
msgid "Place 100 torches."
msgstr ""

#: init.lua
msgid "Well Lit"
msgstr ""

#: init.lua
msgid "Place 1,000 torches."
msgstr ""

#: init.lua
msgid "Really Well Lit"
msgstr ""

#: init.lua
msgid "Craft 10 mese lamps."
msgstr ""

#: init.lua
msgid "Outpost"
msgstr ""

#: init.lua
msgid "Craft 200 stone bricks."
msgstr ""

#: init.lua
msgid "Watchtower"
msgstr ""

#: init.lua
msgid "Craft 800 stone bricks."
msgstr ""

#: init.lua
msgid "Fortress"
msgstr ""

#: init.lua
msgid "Craft 3,200 stone bricks."
msgstr ""

#: init.lua
msgid "Desert Dweller"
msgstr ""

#: init.lua
msgid "Craft 400 desert stone bricks."
msgstr ""

#: init.lua
msgid "Pharaoh"
msgstr ""

#: init.lua
msgid "Craft 100 sandstone bricks."
msgstr ""

#: init.lua
msgid "Little Library"
msgstr ""

#: init.lua
msgid "Craft 7 bookshelves."
msgstr ""

#: init.lua
msgid "Lava and Water"
msgstr ""

#: init.lua
msgid "Mine your first obsidian."
msgstr ""

#: init.lua
msgid "Obsessed with Obsidian"
msgstr ""

#: init.lua
msgid "Mine 50 obsidian."
msgstr ""

#: init.lua
msgid "Lava Miner"
msgstr ""

#: init.lua
msgid "Mine any block while being very close to lava."
msgstr ""

#: init.lua
msgid "On The Way"
msgstr ""

#: init.lua
msgid "Place 100 rails."
msgstr ""

#: init.lua
msgid "First Day in the Woods"
msgstr ""

#: init.lua
msgid "Dig 6 tree blocks."
msgstr ""

#: init.lua
msgid "Lumberjack"
msgstr ""

#: init.lua
msgid "Dig 36 tree blocks."
msgstr ""

#: init.lua
msgid "Semi-pro Lumberjack"
msgstr ""

#: init.lua
msgid "Dig 216 tree blocks."
msgstr ""

#: init.lua
msgid "Professional Lumberjack"
msgstr ""

#: init.lua
msgid "Dig 1,296 tree blocks."
msgstr ""

#: init.lua
msgid "Junglebaby"
msgstr ""

#: init.lua
msgid "Dig 100 jungle tree blocks."
msgstr ""

#: init.lua
msgid "Jungleman"
msgstr ""

#: init.lua
msgid "Dig 1,000 jungle tree blocks."
msgstr ""

#: init.lua
msgid "First Mese Find"
msgstr ""

#: init.lua
msgid "Mine your first mese ore."
msgstr ""

#: init.lua
msgid "Mese Mastery"
msgstr ""

#: init.lua
msgid "Mine a mese block."
msgstr ""

#: init.lua
msgid "You’re a copper"
msgstr ""

#: init.lua
msgid "Dig 1,000 copper ores."
msgstr ""

#: init.lua
msgid "A Cat in a Pop-Tart?!"
msgstr ""

#: init.lua
msgid "Mine a nyan cat."
msgstr ""

#: init.lua
msgid "Mini Miner"
msgstr ""

#: init.lua
msgid "Dig 100 stone blocks."
msgstr ""

#: init.lua
msgid "Hardened Miner"
msgstr ""

#: init.lua
msgid "Dig 1,000 stone blocks."
msgstr ""

#: init.lua
msgid "Master Miner"
msgstr ""

#: init.lua
msgid "Dig 10,000 stone blocks."
msgstr ""

#: init.lua
msgid "Marchand De Sable"
msgstr ""

#: init.lua
msgid "Dig 1,000 sand."
msgstr ""

#: init.lua
msgid "Crafter of Sticks"
msgstr ""

#: init.lua
msgid "Craft 100 sticks."
msgstr ""

#: init.lua
msgid "Jungle Discoverer"
msgstr ""

#: init.lua
msgid "Mine your first jungle grass."
msgstr ""

#: init.lua
msgid "Grasslands Discoverer"
msgstr ""

#: init.lua
msgid "Mine some grass."
msgstr ""

#: init.lua
msgid "Savannah Discoverer"
msgstr ""

#: init.lua
msgid "Mine some dry grass."
msgstr ""

#: init.lua
msgid "Desert Discoverer"
msgstr ""

#: init.lua
msgid "Mine your first cactus."
msgstr ""

#: init.lua
msgid "Far Lands"
msgstr ""

#: init.lua
msgid "Mine your first dry shrub."
msgstr ""

#: init.lua
msgid "Glacier Discoverer"
msgstr ""

#: init.lua
msgid "Mine your first ice."
msgstr ""

#: init.lua
msgid "Very Simple Snow Man"
msgstr ""

#: init.lua
msgid "Place two snow blocks."
msgstr ""

#: init.lua
msgid "First Gold Find"
msgstr ""

#: init.lua
msgid "Mine your first gold ore."
msgstr ""

#: init.lua
msgid "Gold Rush"
msgstr ""

#: init.lua
msgid "Mine 45 gold ores."
msgstr ""

#: init.lua
msgid "Wow, I am Diamonds!"
msgstr ""

#: init.lua
msgid "Mine your first diamond ore."
msgstr ""

#: init.lua
msgid "Girl's Best Friend"
msgstr ""

#: init.lua
msgid "Mine 18 diamond ores."
msgstr ""

#: init.lua
msgid "Hardest Block on Earth"
msgstr ""

#: init.lua
msgid "Craft a diamond block."
msgstr ""

#: init.lua
msgid "In the Dungeon"
msgstr ""

#: init.lua
msgid "Mine a mossy cobblestone."
msgstr ""

#: init.lua
msgid "Smelter"
msgstr ""

#: init.lua
msgid "Craft 10 furnaces."
msgstr ""

#: init.lua
msgid "Treasurer"
msgstr ""

#: init.lua
msgid "Craft 15 chests."
msgstr ""

#: init.lua
msgid "Bankier"
msgstr ""

#: init.lua
msgid "Craft 30 locked chests."
msgstr ""

#: init.lua
msgid "Bricker"
msgstr ""

#: init.lua
msgid "Craft 200 brick blocks."
msgstr ""

#: init.lua
msgid "House of Obsidian"
msgstr ""

#: init.lua
msgid "Craft 100 obsidian bricks."
msgstr ""

#: init.lua
msgid "Build a Cave"
msgstr ""

#: init.lua
msgid "Place 100 stone."
msgstr ""

#: init.lua
msgid "Long Ladder"
msgstr ""

#: init.lua
msgid "Place 400 wooden ladders."
msgstr ""

#: init.lua
msgid "Industrial Age"
msgstr ""

#: init.lua
msgid "Place 40 steel ladders."
msgstr ""

#: init.lua
msgid "Yummy!"
msgstr ""

#: init.lua
msgid "Eat 80 apples."
msgstr ""

#: init.lua
msgid "Glasser"
msgstr ""

#: init.lua
msgid "Craft 14 vessels shelves."
msgstr ""

#: init.lua
msgid "Farming Skills Acquired"
msgstr ""

#: init.lua
msgid "Harvest a fully grown wheat plant."
msgstr ""

#: init.lua
msgid "Field Worker"
msgstr ""

#: init.lua
msgid "Harvest 25 fully grown wheat plants."
msgstr ""

#: init.lua
msgid "Aspiring Farmer"
msgstr ""

#: init.lua
msgid "Harvest 125 fully grown wheat plants."
msgstr ""

#: init.lua
msgid "Wheat Magnate"
msgstr ""

#: init.lua
msgid "Harvest 625 fully grown wheat plants."
msgstr ""

#: init.lua
msgid "Baker"
msgstr ""

#: init.lua
msgid "Eat 10 loaves of bread."
msgstr ""

#: init.lua
msgid "Wool Over Your Eyes"
msgstr ""

#: init.lua
msgid "Craft 250 white wool."
msgstr ""

#: init.lua
msgid "Hotelier"
msgstr ""

#: init.lua
msgid "Craft 15 fancy beds."
msgstr ""

#: init.lua
msgid "Filthy Rich"
msgstr ""

#: init.lua
msgid "Craft 24 gold block stairs."
msgstr ""

#: init.lua
msgid "Roses Are Red"
msgstr ""

#: init.lua
msgid "Craft 400 red dyes."
msgstr ""

#: init.lua
msgid "Dandelions are Yellow"
msgstr ""

#: init.lua
msgid "Craft 400 yellow dyes."
msgstr ""

#: init.lua
msgid "Geraniums are Blue"
msgstr ""

#: init.lua
msgid "Craft 400 blue dyes."
msgstr ""

#: init.lua
msgid "White Color Stock"
msgstr ""

#: init.lua
msgid "Craft 100 white dyes."
msgstr ""

#: init.lua
msgid "Tasty Mushrooms"
msgstr ""

#: init.lua
msgid "Eat 3 brown mushrooms."
msgstr ""

#: init.lua
msgid "Mushroom Lover"
msgstr ""

#: init.lua
msgid "Eat 33 brown mushrooms."
msgstr ""

#: init.lua
msgid "Underground Mushroom Farmer"
msgstr ""

#: init.lua
msgid "Eat 333 brown mushrooms."
msgstr ""

#: init.lua
msgid "Builder"
msgstr ""

#: init.lua
msgid "Constructor"
msgstr ""

#: init.lua
msgid "Architect"
msgstr ""

#: init.lua
msgid "Master Architect"
msgstr ""

#: chat_commands.lua
msgid "[c|clear|disable|enable]"
msgstr ""

#: chat_commands.lua
msgid "Show, clear, disable or enable your achievements"
msgstr ""

#: chat_commands.lua
msgid ""
"All your awards and statistics have been cleared. You can now start again."
msgstr ""

#: chat_commands.lua
msgid "You have disabled your achievements."
msgstr ""

#: chat_commands.lua
msgid "You have enabled your achievements."
msgstr ""

#: chat_commands.lua
msgid "<achievement ID>"
msgstr ""

#: chat_commands.lua
msgid "Show details of an achievement"
msgstr ""

#: chat_commands.lua
msgid "Achievement not found."
msgstr ""

#: chat_commands.lua
msgid "<name>"
msgstr ""

#: chat_commands.lua
msgid "Get the achievements statistics for the given player or yourself"
msgstr ""


code:
name = awards
title = Awards
author = rubenwardy
description = Adds awards to Minetest, and an API to register new ones.
optional_depends = intllib,sfinv,unified_inventory,default,stairs,farming,dye,beds,wool,vessels,moreblocks,fire,flowers,nyancat
license = MIT
forum = https://forum.minetest.net/viewtopic.php?t=4870
version = 3.0.0

repo_name: korkut/MeseCraft

license: mit


code:
# Add default achievements from the awards mod
awards.add_defaults (Add Default Achievements) bool true


code:
-- Copyright (c) 2013-18 rubenwardy. MIT.

local S = awards.gettext

function awards.register_award(name, def)
	def.name = name

	-- Add Triggers
	if def.trigger and def.trigger.type then
		local tdef = awards.registered_triggers[def.trigger.type]
		assert(tdef, "Trigger not found: " .. def.trigger.type)
		tdef:on_register(def)
	end

	function def:can_unlock(data)
		if not self.requires then
			return true
		end

		for i=1, #self.requires do
			if not data.unlocked[self.requires[i]] then
				return false
			end
		end
		return true
	end

	-- Add Award
	awards.registered_awards[name] = def

	local tdef = awards.registered_awards[name]
	if def.description == nil and tdef.getDefaultDescription then
		def.description = tdef:getDefaultDescription()
	end
end

-- This function is called whenever a target condition is met.
-- It checks if a player already has that award, and if they do not,
-- it gives it to them
----------------------------------------------
--awards.unlock(name, award)
-- name - the name of the player
-- award - the name of the award to give
function awards.unlock(name, award)
	-- Ensure the player is online.
	if not minetest.get_player_by_name(name) then
		return
	end

	-- Access Player Data
	local data  = awards.player(name)
	local awdef = awards.registered_awards[award]
	assert(awdef, "Unable to unlock an award which doesn't exist!")

	if data.disabled or
			(data.unlocked[award] and data.unlocked[award] == award) then
		return
	end

	if not awdef:can_unlock(data) then
		minetest.log("warning", "can_unlock returned false in unlock of " ..
				award .. " for " .. name)
		return
	end

	-- Unlock Award
	minetest.log("action", name.." has unlocked award "..award)
	data.unlocked[award] = award
	awards.save()

	-- Give Prizes
	if awdef and awdef.prizes then
		for i = 1, #awdef.prizes do
			local itemstack = ItemStack(awdef.prizes[i])
			if not itemstack:is_empty() then
				local receiverref = minetest.get_player_by_name(name)
				if receiverref then
					receiverref:get_inventory():add_item("main", itemstack)
				end
			end
		end
	end

	-- Run callbacks
	if awdef.on_unlock and awdef.on_unlock(name, awdef) then
		return
	end
	for _, callback in pairs(awards.on_unlock) do
		if callback(name, awdef) then
			return
		end
	end

	-- Get Notification Settings
	local title = awdef.title or award
	local desc = awdef.description or ""
	local background = awdef.hud_background or awdef.background or "awards_bg_default.png"
	local icon = (awdef.icon or "awards_unknown.png") .. "^[resize:32x32"
	local sound = awdef.sound
	if sound == nil then
		-- Explicit check for nil because sound could be `false` to disable it
		sound = {name="awards_got_generic", gain=0.25}
	end

	-- Do Notification
	if sound then
		-- Enforce sound delay to prevent sound spamming
		local lastsound = data.lastsound
		if lastsound == nil or os.difftime(os.time(), lastsound) >= 1 then
			minetest.sound_play(sound, {to_player=name})
			data.lastsound = os.time()
		end
	end

	if awards.show_mode == "chat" then
		local chat_announce
		if awdef.secret then
			chat_announce = S("Secret Award Unlocked: %s")
		else
			chat_announce = S("Award Unlocked: %s")
		end
		-- use the chat console to send it
		minetest.chat_send_player(name, string.format(chat_announce, title))
		if desc~="" then
			minetest.chat_send_player(name, desc)
		end
	else
		local player = minetest.get_player_by_name(name)
		local one = player:hud_add({
			hud_elem_type = "image",
			name = "award_bg",
			scale = {x = 2, y = 1},
			text = background,
			position = {x = 0.5, y = 0.05},
			offset = {x = 0, y = 138},
			alignment = {x = 0, y = -1}
		})
		local hud_announce
		if awdef.secret then
			hud_announce = S("Secret Award Unlocked!")
		else
			hud_announce = S("Award Unlocked!")
		end
		local two = player:hud_add({
			hud_elem_type = "text",
			name = "award_au",
			number = 0xFFFFFF,
			scale = {x = 100, y = 20},
			text = hud_announce,
			position = {x = 0.5, y = 0.05},
			offset = {x = 0, y = 45},
			alignment = {x = 0, y = -1}
		})
		local three = player:hud_add({
			hud_elem_type = "text",
			name = "award_title",
			number = 0xFFFFFF,
			scale = {x = 100, y = 20},
			text = title,
			position = {x = 0.5, y = 0.05},
			offset = {x = 0, y = 100},
			alignment = {x = 0, y = -1}
		})
		local four = player:hud_add({
			hud_elem_type = "image",
			name = "award_icon",
			scale = {x = 2, y = 2}, -- adjusted for 32x32 from x/y = 4
			text = icon,
			position = {x = 0.5, y = 0.05},
			offset = {x = -200.5, y = 126},
			alignment = {x = 0, y = -1}
		})
		minetest.after(4, function()
			local player2 = minetest.get_player_by_name(name)
			if player2 then
				player2:hud_remove(one)
				player2:hud_remove(two)
				player2:hud_remove(three)
				player2:hud_remove(four)
			end
		end)
	end
end

function awards.get_award_states(name)
	local hash_is_unlocked = {}
	local retval = {}

	-- Add all unlocked awards
	local data = awards.player(name)
	if data and data.unlocked then
		for awardname, _ in pairs(data.unlocked) do
			local def = awards.registered_awards[awardname]
			if def then
				hash_is_unlocked[awardname] = true
				local score = -100000

				local difficulty = def.difficulty or 1
				if def.trigger and def.trigger.target then
					difficulty = difficulty * def.trigger.target
				end
				score = score + difficulty

				retval[#retval + 1] = {
					name     = awardname,
					def      = def,
					unlocked = true,
					started  = true,
					score    = score,
					progress = nil,
				}
			end
		end
	end

	-- Add all locked awards
	for _, def in pairs(awards.registered_awards) do
		if not hash_is_unlocked[def.name] and def:can_unlock(data) then
			local progress = def.get_progress and def:get_progress(data)
			local started = false
			local score = def.difficulty or 1
			if def.secret then
				score = 1000000
			elseif def.trigger and def.trigger.target and progress then
				local perc = progress.current / progress.target
				score = score * (1 - perc) * def.trigger.target
				if perc < 0.001 then
					score = score + 100
				else
					started = true
				end
			else
				score = 100
			end

			retval[#retval + 1] = {
				name     = def.name,
				def      = def,
				unlocked = false,
				started  = started,
				score    = score,
				progress = progress,
			}
		end
	end

	table.sort(retval, function(a, b)
		return a.score < b.score
	end)
	return retval
end


code:
-- Copyright (c) 2013-18 rubenwardy. MIT.

local S, NS = awards.gettext, awards.ngettext

awards.on = {}

local default_def = {}

function default_def:run_callbacks(player, data, table_func)
	for i = 1, #self.on do
		local res = nil
		local entry = self.on[i]
		if type(entry) == "function" then
			res = entry(player, data)
		elseif type(entry) == "table" and entry.award then
			res = table_func(entry)
		end

		if res then
			awards.unlock(player:get_player_name(), res)
		end
	end
end

function awards.register_trigger(tname, tdef)
	assert(type(tdef) == "table",
			"Passing a callback to register_trigger is not supported in 3.0")

	tdef.name = tname
	for key, value in pairs(default_def) do
		tdef[key] = value
	end

	if tdef.type == "counted" then
		local old_reg = tdef.on_register

		function tdef:on_register(def)
			local tmp = {
				award  = def.name,
				target = def.trigger.target,
			}
			tdef.register(tmp)

			function def.get_progress(_, data)
				local current = math.min(data[tname] or 0, tmp.target)
				return {
					current = current,
					target = tmp.target,
					label = S(tdef.progress, current, tmp.target),
				}
			end

			function def.getDefaultDescription(_)
				local n = def.trigger.target
				return NS(tdef.auto_description[1], tdef.auto_description[2], n, n)
			end

			if old_reg then
				return old_reg(tdef, def)
			end
		end

		function tdef.notify(player)
			assert(player and player.is_player and player:is_player())
			local name = player:get_player_name()
			local data = awards.player(name)

			-- Increment counter
			local currentVal = (data[tname] or 0) + 1
			data[tname] = currentVal

			tdef:run_callbacks(player, data, function(entry)
				if entry.target and entry.award and currentVal and
						currentVal >= entry.target then
					return entry.award
				end
			end)
		end

		awards["notify_" .. tname] = tdef.notify

	elseif tdef.type == "counted_key" then
		if tdef.key_is_item then
			tdef.watched_groups = {}
		end

		-- On award register
		local old_reg = tdef.on_register
		function tdef:on_register(def)
			-- Register trigger
			local tmp = {
				award  = def.name,
				key    = tdef:get_key(def),
				target = def.trigger.target,
			}
			tdef.register(tmp)

			-- If group, add it to watch list
			if tdef.key_is_item and tmp.key and tmp.key:sub(1, 6) == "group:" then
				tdef.watched_groups[tmp.key:sub(7, #tmp.key)] = true
			end

			-- Called to get progress values and labels
			function def.get_progress(_, data)
				data[tname] = data[tname] or {}

				local done
				if tmp.key then
					done = data[tname][tmp.key] or 0
				else
					done = data[tname].__total or 0
				end
				done = math.min(done, tmp.target)

				return {
					current = done,
					target = tmp.target,
					label = S(tdef.progress, done, tmp.target),
				}
			end

			-- Build description if none is specificed by the award
			function def.getDefaultDescription(_)
				local n = def.trigger.target
				if tmp.key then
					local nname = tmp.key
					return NS(tdef.auto_description[1],
							tdef.auto_description[2], n, n, nname)
				else
					return NS(tdef.auto_description_total[1],
							tdef.auto_description_total[2], n, n)
				end
			end

			-- Call on_register in trigger type definition
			if old_reg then
				return old_reg(tdef, def)
			end
		end

		function tdef.notify(player, key, n)
			n = n or 1

			if tdef.key_is_item and key:sub(1, 6) ~= "group:" then
				local itemdef = minetest.registered_items[key]
				if itemdef then
					for groupname,rating in pairs(itemdef.groups or {}) do
						if rating ~= 0 and tdef.watched_groups[groupname] then
							tdef.notify(player, "group:" .. groupname, n)
						end
					end
				end
			end

			assert(player and player.is_player and player:is_player() and key)
			local name = player:get_player_name()
			local data = awards.player(name)

			-- Increment counter
			data[tname] = data[tname] or {}
			local currentVal = (data[tname][key] or 0) + n
			data[tname][key] = currentVal
			data[tname].__total = (data[tname].__total or 0)
			if key:sub(1, 6) ~= "group:" then
				data[tname].__total = data[tname].__total + n
			end

			tdef:run_callbacks(player, data, function(entry)
				local current
				if entry.key == key then
					current = currentVal
				elseif entry.key == nil then
					current = data[tname].__total
				else
					return
				end
				if current >= entry.target then
					return entry.award
				end
			end)
		end

		awards["notify_" .. tname] = tdef.notify

	elseif tdef.type and tdef.type ~= "custom" then
		error("Unrecognised trigger type " .. tdef.type)
	end

	awards.registered_triggers[tname] = tdef

	tdef.on = {}
	tdef.register = function(func)
		table.insert(tdef.on, func)
	end

	-- Backwards compat
	awards.on[tname] = tdef.on
	awards['register_on_' .. tname] = tdef.register
	return tdef
end

function awards.increment_item_counter(data, field, itemname, count)
	itemname = minetest.registered_aliases[itemname] or itemname
	data[field][itemname] = (data[field][itemname] or 0) + (count or 1)
end

function awards.get_item_count(data, field, itemname)
	itemname = minetest.registered_aliases[itemname] or itemname
	return data[field][itemname] or 0
end

function awards.get_total_keyed_count(data, field)
	return data[field].__total or 0
end

function awards.register_on_unlock(func)
	table.insert(awards.on_unlock, func)
end


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

local S = awards.gettext

-- Saint-Maclou
if minetest.get_modpath("moreblocks") then
	awards.register_award("award_saint_maclou",{
		title = S("Saint-Maclou"),
		description = S("Place 20 coal checkers."),
		icon = "awards_saint_maclou.png",
		trigger = {
			type = "place",
			node = "moreblocks:coal_checker",
			target = 20
		}
	})

	-- Castorama
	awards.register_award("award_castorama",{
		title = S("Castorama"),
		description = S("Place 20 iron checkers."),
		icon = "awards_castorama.png",
		trigger = {
			type = "place",
			node = "moreblocks:iron_checker",
			target = 20
		}
	})

	-- Sam the Trapper
	awards.register_award("award_sam_the_trapper",{
		title = S("Sam the Trapper"),
		description = S("Place 2 trap stones."),
		icon = "awards_sam_the_trapper.png",
		trigger = {
			type = "place",
			node = "moreblocks:trap_stone",
			target = 2
		}
	})
end

-- This award can't be part of Unified Inventory, it would make a circular dependency
if minetest.get_modpath("unified_inventory") then
	if minetest.get_all_craft_recipes("unified_inventory:bag_large") ~= nil then
		awards.register_award("awards_ui_bags", {
			title = S("Backpacker"),
			description = S("Craft 4 large bags."),
			icon = "awards_backpacker.png",
			trigger = {
				type = "craft",
				item = "unified_inventory:bag_large",
				target = 4
			}
		})
	end
end

if minetest.get_modpath("fire") then
	awards.register_award("awards_pyro", {
		title = S("Pyromaniac"),
		description = S("Craft 8 times flint and steel."),
		icon = "awards_pyromaniac.png",
		trigger = {
			type = "craft",
			item = "fire:flint_and_steel",
			target = 8
		}
	})
	if minetest.settings:get_bool("disable_fire") ~= true then
		awards.register_award("awards_firefighter", {
			title = S("Firefighter"),
			description = S("Put out 1000 fires."),
			icon = "awards_firefighter.png",
			trigger = {
				type = "dig",
				node = "fire:basic_flame",
				target = 1000
			}
		})
	end

	-- Burned to death
	awards.register_award("award_burn", {
		title = S("You're a witch!"),
		description = S("Burn to death in a fire."),
		secret = true,
	})
	awards.register_on_death(function(player,data)
		local pos = player:get_pos()
		if pos and minetest.find_node_near(pos, 2, "fire:basic_flame") ~= nil then
			return "award_burn"
		end
		return nil
	end)
end

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

-- Die hi
awards.register_award("award_deep_down", {
	title = S("Death in the Deeps"),
	description = S("Die below -10000"),
	secret = true,
})
awards.register_on_death(function(player,data)
	local pos = player:get_pos()
	if pos and pos.y < -10000 then
		return "award_deep_down"
	end
	return nil
end)

-- Die near diamond ore
awards.register_award("award_no_screen", {
	title = S("In space, no one can hear you scream"),
	description = S("Die above 10000"),
	secret = true,
})
awards.register_on_death(function(player,data)
	local pos = player:get_pos()
	if pos and pos.y > 10000 then
		return "award_no_screen"
	end
	return nil
end)

if minetest.get_modpath("default") then
	-- Light it up
	awards.register_award("award_lightitup",{
		title = S("Light It Up"),
		description = S("Place 100 torches."),
		icon = "awards_light_it_up.png^awards_level1.png",
		difficulty = 0.01,
		trigger = {
			type = "place",
			node = "default:torch",
			target = 100
		}
	})

	-- Light ALL the things!
	awards.register_award("award_well_lit",{
		title = S("Well Lit"),
		icon = "awards_well_lit.png^awards_level2.png",
		description = S("Place 1,000 torches."),
		difficulty = 0.01,
		trigger = {
			type = "place",
			node = "default:torch",
			target = 1000
		}
	})

	awards.register_award("award_meselamp",{
		title = S("Really Well Lit"),
		description = S("Craft 10 mese lamps."),
		icon = "awards_really_well_lit.png",
		difficulty = 0.2,
		trigger = {
			type = "craft",
			item = "default:meselamp",
			target = 10
		}
	})

	awards.register_award("awards_stonebrick", {
		title = S("Outpost"),
		description = S("Craft 200 stone bricks."),
		icon = "awards_outpost.png^awards_level1.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item = "default:stonebrick",
			target = 200
		}
	})

	awards.register_award("awards_stonebrick2", {
		title = S("Watchtower"),
		description = S("Craft 800 stone bricks."),
		icon = "awards_watchtower.png^awards_level2.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item = "default:stonebrick",
			target = 800
		}
	})

	awards.register_award("awards_stonebrick3", {
		title = S("Fortress"),
		description = S("Craft 3,200 stone bricks."),
		icon = "awards_fortress.png^awards_level3.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item = "default:stonebrick",
			target = 3200
		}
	})

	awards.register_award("awards_desert_stonebrick", {
		title = S("Desert Dweller"),
		description = S("Craft 400 desert stone bricks."),
		icon = "awards_desert_dweller.png",
		difficulty = 0.09,
		trigger = {
			type = "craft",
			item = "default:desert_stonebrick",
			target = 400
		}
	})

	awards.register_award("awards_desertstonebrick", {
		title = S("Pharaoh"),
		description = S("Craft 100 sandstone bricks."),
		icon = "awards_pharaoh.png",
		difficulty = 0.09,
		trigger = {
			type = "craft",
			item = "default:sandstonebrick",
			target = 100
		}
	})

	awards.register_award("awards_bookshelf", {
		title = S("Little Library"),
		description = S("Craft 7 bookshelves."),
		icon = "awards_little_library.png",
		difficulty = 0.2,
		trigger = {
			type = "craft",
			item = "default:bookshelf",
			target = 7
		}
	})

	awards.register_award("awards_obsidian", {
		title = S("Lava and Water"),
		description = S("Mine your first obsidian."),
		icon = "awards_lava_and_water.png^awards_level1.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1.5,
		trigger = {
			type = "dig",
			node = "default:obsidian",
			target = 1
		}
	})

	-- Obsessed with Obsidian
	awards.register_award("award_obsessed_with_obsidian",{
		title = S("Obsessed with Obsidian"),
		description = S("Mine 50 obsidian."),
		icon = "awards_obsessed_with_obsidian.png^awards_level2.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1.5,
		trigger = {
			type = "dig",
			node = "default:obsidian",
			target = 50
		}
	})

	-- Proof that player has found lava
	awards.register_award("award_lavaminer",{
		title = S("Lava Miner"),
		description = S("Mine any block while being very close to lava."),
		icon = "awards_lava_miner.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1,
	})
	awards.register_on_dig(function(player,data)
		local pos = player:get_pos()
		if pos and (minetest.find_node_near(pos, 1, "default:lava_source") or
				minetest.find_node_near(pos, 1, "default:lava_flowing")) then
			return "award_lavaminer"
		end
		return nil
	end)

	-- On the way
	awards.register_award("award_on_the_way", {
		title = S("On The Way"),
		description = S("Place 100 rails."),
		icon = "awards_on_the_way.png",
		difficulty = 0.1,
		trigger = {
			type = "place",
			node = "default:rail",
			target = 100
		}
	})

	awards.register_award("award_lumberjack_firstday", {
		title = S("First Day in the Woods"),
		description = S("Dig 6 tree blocks."),
		icon = "awards_first_day_in_the_woods.png^awards_level1.png",
		difficulty = 0.03,
		trigger = {
			type = "dig",
			node = "default:tree",
			target = 6
		}
	})

	-- Lumberjack
	awards.register_award("award_lumberjack", {
		title = S("Lumberjack"),
		description = S("Dig 36 tree blocks."),
		icon = "awards_lumberjack.png^awards_level2.png",
		difficulty = 0.03,
		trigger = {
			type = "dig",
			node = "default:tree",
			target = 36
		}
	})

	-- Semi-pro Lumberjack
	awards.register_award("award_lumberjack_semipro", {
		title = S("Semi-pro Lumberjack"),
		description = S("Dig 216 tree blocks."),
		icon = "awards_semi_pro_lumberjack.png^awards_level3.png",
		difficulty = 0.03,
		trigger = {
			type = "dig",
			node = "default:tree",
			target = 216
		}
	})

	-- Professional Lumberjack
	awards.register_award("award_lumberjack_professional", {
		title = S("Professional Lumberjack"),
		description = S("Dig 1,296 tree blocks."),
		icon = "awards_professional_lumberjack.png^awards_level4.png",
		difficulty = 0.03,
		trigger = {
			type = "dig",
			node = "default:tree",
			target = 1296
		}
	})

	-- Junglebaby
	awards.register_award("award_junglebaby", {
		title = S("Junglebaby"),
		description = S("Dig 100 jungle tree blocks."),
		icon = "awards_junglebaby.png^awards_level1.png",
		difficulty = 0.05,
		trigger = {
			type = "dig",
			node = "default:jungletree",
			target = 100
		}
	})

	-- Jungleman
	awards.register_award("award_jungleman", {
		title = S("Jungleman"),
		description = S("Dig 1,000 jungle tree blocks."),
		icon = "awards_jungleman.png^awards_level2.png",
		difficulty = 0.05,
		trigger = {
			type = "dig",
			node = "default:jungletree",
			target = 1000
		}
	})

	-- Found some Mese!
	awards.register_award("award_mesefind", {
		title = S("First Mese Find"),
		description = S("Mine your first mese ore."),
		icon = "awards_first_mese_find.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1,
		trigger = {
			type = "dig",
			node = "default:stone_with_mese",
			target = 1
		}
	})

	-- Mese Block
	awards.register_award("award_meseblock", {
		secret = true,
		title = S("Mese Mastery"),
		description = S("Mine a mese block."),
		icon = "awards_mese_mastery.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1.1,
		trigger = {
			type = "dig",
			node = "default:mese",
			target = 1
		}
	})

	-- You're a copper
	awards.register_award("award_youre_a_copper", {
		title = S("You’re a copper"),
		description = S("Dig 1,000 copper ores."),
		icon = "awards_youre_a_copper.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.2,
		trigger = {
			type = "dig",
			node = "default:stone_with_copper",
			target = 1000
		}
	})

	-- Mini Miner
	awards.register_award("award_mine2", {
		title = S("Mini Miner"),
		description = S("Dig 100 stone blocks."),
		icon = "awards_mini_miner.png^awards_level1.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.02,
		trigger = {
			type = "dig",
			node = "default:stone",
			target = 100
		}
	})

	-- Hardened Miner
	awards.register_award("award_mine3", {
		title = S("Hardened Miner"),
		description = S("Dig 1,000 stone blocks."),
		icon = "awards_hardened_miner.png^awards_level2.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.02,
		trigger = {
			type = "dig",
			node = "default:stone",
			target = 1000
		}
	})

	-- Master Miner
	awards.register_award("award_mine4", {
		title = S("Master Miner"),
		description = S("Dig 10,000 stone blocks."),
		icon = "awards_master_miner.png^awards_level3.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.02,
		trigger = {
			type = "dig",
			node = "default:stone",
			target = 10000
		}
	})

	-- Marchand de sable
	awards.register_award("award_marchand_de_sable", {
		title = S("Marchand De Sable"),
		description = S("Dig 1,000 sand."),
		icon = "awards_marchand_de_sable.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.05,
		trigger = {
			type = "dig",
			node = "default:sand",
			target = 1000
		}
	})

	awards.register_award("awards_crafter_of_sticks", {
		title = S("Crafter of Sticks"),
		description = S("Craft 100 sticks."),
		icon = "awards_crafter_of_sticks.png",
		difficulty = 0.01,
		trigger = {
			type = "craft",
			item = "default:stick",
			target = 100
		}
	})

	awards.register_award("awards_junglegrass", {
		title = S("Jungle Discoverer"),
		description = S("Mine your first jungle grass."),
		icon = "awards_jungle_discoverer.png",
		difficulty = 0.009,
		trigger = {
			type = "dig",
			node = "default:junglegrass",
			target = 1
		}
	})

	awards.register_award("awards_grass", {
		title = S("Grasslands Discoverer"),
		description = S("Mine some grass."),
		icon = "awards_grasslands_discoverer.png",
		difficulty = 0.009,
		trigger = {
			type = "dig",
			node = "default:grass_1",
			target = 1
		}
	})

	awards.register_award("awards_dry_grass", {
		title = S("Savannah Discoverer"),
		description = S("Mine some dry grass."),
		icon = "awards_savannah_discoverer.png",
		difficulty = 0.009,
		trigger = {
			type = "dig",
			node = "default:dry_grass_3",
			target = 1
		}
	})

	awards.register_award("awards_cactus", {
		title = S("Desert Discoverer"),
		description = S("Mine your first cactus."),
		icon = "awards_desert_discoverer.png",
		difficulty = 0.03,
		trigger = {
			type = "dig",
			node = "default:cactus",
			target = 1
		}
	})

	awards.register_award("awards_dry_shrub", {
		title = S("Far Lands"),
		description = S("Mine your first dry shrub."),
		icon = "awards_far_lands.png",
		difficulty = 0.009,
		trigger = {
			type = "dig",
			node = "default:dry_shrub",
			target = 1
		}
	})

	awards.register_award("awards_ice", {
		title = S("Glacier Discoverer"),
		description = S("Mine your first ice."),
		icon = "awards_glacier_discoverer.png",
		difficulty = 0.02,
		trigger = {
			type = "dig",
			node = "default:ice",
			target = 1
		}
	})

	-- Proof that player visited snowy lands
	awards.register_award("awards_snowblock", {
		title = S("Very Simple Snow Man"),
		description = S("Place two snow blocks."),
		icon = "awards_very_simple_snow_man.png",
		difficulty = 0.02,
		trigger = {
			type = "place",
			node = "default:snowblock",
			target = 2
		}
	})

	awards.register_award("awards_gold_ore", {
		title = S("First Gold Find"),
		description = S("Mine your first gold ore."),
		icon = "awards_first_gold_find.png^awards_level1.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.9,
		trigger = {
			type = "dig",
			node = "default:stone_with_gold",
			target = 1
		}
	})

	awards.register_award("awards_gold_rush", {
		title = S("Gold Rush"),
		description = S("Mine 45 gold ores."),
		icon = "awards_gold_rush.png^awards_level2.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 0.9,
		trigger = {
			type = "dig",
			node = "default:stone_with_gold",
			target = 45
		}
	})

	awards.register_award("awards_diamond_ore", {
		title = S("Wow, I am Diamonds!"),
		description = S("Mine your first diamond ore."),
		icon = "awards_wow_i_am_diamonds.png^awards_level1.png",
		difficulty = 1,
		trigger = {
			type = "dig",
			node = "default:stone_with_diamond",
			target = 1
		}
	})

	awards.register_award("awards_diamond_rush", {
		title = S("Girl's Best Friend"),
		description = S("Mine 18 diamond ores."),
		icon = "awards_girls_best_friend.png^awards_level2.png",
		hud_background = "awards_bg_mining.png",
		difficulty = 1,
		trigger = {
			type = "dig",
			node = "default:stone_with_diamond",
			target = 18
		}
	})

	awards.register_award("awards_diamondblock", {
		title = S("Hardest Block on Earth"),
		description = S("Craft a diamond block."),
		icon = "awards_hardest_block_on_earth.png",
		difficulty = 1.1,
		trigger = {
			type = "craft",
			item = "default:diamondblock",
			target = 1
		}
	})

	awards.register_award("awards_mossycobble", {
		title = S("In the Dungeon"),
		description = S("Mine a mossy cobblestone."),
		icon = "awards_in_the_dungeon.png",
		difficulty = 0.9,
		trigger = {
			type = "dig",
			node = "default:mossycobble",
			target = 1
		}
	})

	awards.register_award("award_furnace", {
		title = S("Smelter"),
		description = S("Craft 10 furnaces."),
		icon = "awards_smelter.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item= "default:furnace",
			target = 10
		}
	})

	awards.register_award("award_chest", {
		title = S("Treasurer"),
		description = S("Craft 15 chests."),
		icon = "awards_treasurer.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item= "default:chest",
			target = 15
		}
	})

	awards.register_award("award_chest2", {
		title = S("Banker"),
		description = S("Craft 30 locked chests."),
		icon = "awards_banker.png",
		difficulty = 0.08,
		trigger = {
			type = "craft",
			item= "default:chest_locked",
			target = 30
		}
	})

	awards.register_award("award_brick", {
		title = S("Bricker"),
		description = S("Craft 200 brick blocks."),
		icon = "awards_bricker.png",
		difficulty = 0.03,
		trigger = {
			type = "craft",
			item= "default:brick",
			target = 200
		}
	})

	awards.register_award("award_obsidianbrick", {
		title = S("House of Obsidian"),
		description = S("Craft 100 obsidian bricks."),
		icon = "awards_house_of_obsidian.png",
		difficulty = 0.4,
		trigger = {
			type = "craft",
			item= "default:obsidianbrick",
			target = 100
		}
	})

	awards.register_award("award_placestone", {
		title = S("Build a Cave"),
		description = S("Place 100 stone."),
		icon = "awards_build_a_cave.png",
		difficulty = 0.1,
		trigger = {
			type = "place",
			node = "default:stone",
			target = 100
		}
	})

	awards.register_award("award_woodladder", {
		title = S("Long Ladder"),
		description = S("Place 400 wooden ladders."),
		icon = "awards_long_ladder.png",
		difficulty = 0.1,
		trigger = {
			type = "place",
			node = "default:ladder_wood",
			target = 400
		}
	})

	awards.register_award("award_steelladder", {
		title = S("Industrial Age"),
		description = S("Place 40 steel ladders."),
		icon = "awards_industrial_age.png",
		difficulty = 1,
		trigger = {
			type = "place",
			node = "default:ladder_steel",
			target = 40
		}
	})

	awards.register_award("award_apples", {
		title = S("Yummy!"),
		description = S("Eat 80 apples."),
		icon = "awards_yummy.png",
		difficulty = 0.1,
		trigger = {
			type = "eat",
			item = "default:apple",
			target = 80
		}
	})

	-- Died in flowing lava
	awards.register_award("award_in_the_flow", {
		title = S("In the Flow"),
		description = S("Die in flowing lava."),
		secret = true,
	})
	awards.register_on_death(function(player,data)
		local pos = player:get_pos()
		if pos and (minetest.find_node_near(pos, 2, "default:lava_flowing") ~= nil or
				minetest.find_node_near(pos, 2, "default:lava_source") ~= nil) then
			return "award_in_the_flow"
		end
		return nil
	end)

	-- Die near diamond ore
	awards.register_award("award_this_is_sad", {
		title = S("This is Sad"),
		description = S("Die near diamond ore."),
		secret = true,
	})
	awards.register_on_death(function(player,data)
		local pos = player:get_pos()
		if pos and minetest.find_node_near(pos, 5, "default:stone_with_diamond") ~= nil then
			return "award_this_is_sad"
		end
		return nil
	end)
end

if minetest.get_modpath("bones") then
	-- Die near bones
	awards.register_award("award_the_stack", {
		title = S("Graveyard"),
		description = S("Die near bones."),
		secret = true,
	})
	awards.register_on_death(function(player,data)
		local pos = player:get_pos()
		if pos and minetest.find_node_near(pos, 5, "mesecraft_bones:bones") ~= nil then
			return "award_the_stack"
		end
		return nil
	end)
end

if minetest.get_modpath("vessels") then
	awards.register_award("award_vessels_shelf", {
		title = S("Glasser"),
		icon = "awards_glasser.png",
		description = S("Craft 14 vessels shelves."),
		trigger = {
			type = "craft",
			item= "vessels:shelf",
			target = 14
		}
	})
end

if minetest.get_modpath("farming") then
	awards.register_award("awards_farmer", {
		title = S("Farming Skills Acquired"),
		description = S("Harvest a fully grown wheat plant."),
		icon = "awards_farming_skills_acquired.png^awards_level1.png",
		trigger = {
			type = "dig",
			node = "farming:wheat_8",
			target = 1
		}
	})
	awards.register_award("awards_farmer2", {
		title = S("Field Worker"),
		description = S("Harvest 25 fully grown wheat plants."),
		icon = "awards_field_worker.png^awards_level2.png",
		trigger = {
			type = "dig",
			node = "farming:wheat_8",
			target = 25
		}
	})

	awards.register_award("awards_farmer3", {
		title = S("Aspiring Farmer"),
		description = S("Harvest 125 fully grown wheat plants."),
		icon = "awards_aspiring_farmer.png^awards_level3.png",
		trigger = {
			type = "dig",
			node = "farming:wheat_8",
			target = 125
		}
	})

	awards.register_award("awards_farmer4", {
		title = S("Wheat Magnate"),
		description = S("Harvest 625 fully grown wheat plants."),
		icon = "awards_wheat_magnate.png^awards_level4.png",
		trigger = {
			type = "dig",
			node = "farming:wheat_8",
			target = 625
		}
	})

	awards.register_award("award_bread", {
		title = S("Baker"),
		description = S("Eat 10 loaves of bread."),
		icon = "awards_baker.png",
		trigger = {
			type = "eat",
			item = "farming:bread",
			target = 10
		}
	})

end

if minetest.get_modpath("wool") and minetest.get_modpath("farming") then
	awards.register_award("awards_wool", {
		title = S("Wool Over Your Eyes"),
		description = S("Craft 250 white wool."),
		icon = "awards_wool_over_your_eyes.png",
		trigger = {
			type = "craft",
			item = "wool:white",
			target = 250
		}
	})
end

if minetest.get_modpath("beds") then
	awards.register_award("award_bed", {
		title = S("Hotelier"),
		description = S("Craft 15 fancy beds."),
		icon = "awards_hotelier.png",
		trigger = {
			type = "craft",
			item= "beds:fancy_bed_bottom",
			target = 15
		}
	})
end

if minetest.get_modpath("stairs") then
	awards.register_award("award_stairs_goldblock", {
		title = S("Filthy Rich"),
		description = S("Craft 24 gold block stairs."),
		icon = "awards_filthy_rich.png",
		trigger = {
			type = "craft",
			item= "stairs:stair_goldblock",
			target = 24
		}
	})
end

if minetest.get_modpath("dye") then
	awards.register_award("awards_dye_red", {
		title = S("Roses Are Red"),
		description = S("Craft 400 red dyes."),
		icon = "awards_roses_are_red.png",
		trigger = {
			type = "craft",
			item = "dye:red",
			target = 400
		}
	})

	awards.register_award("awards_dye_yellow", {
		title = S("Dandelions are Yellow"),
		description = S("Craft 400 yellow dyes."),
		icon = "awards_dandelions_are_yellow.png",
		trigger = {
			type = "craft",
			item = "dye:yellow",
			target = 400
		}
	})

	awards.register_award("awards_dye_blue", {
		title = S("Geraniums are Blue"),
		description = S("Craft 400 blue dyes."),
		icon = "awards_geraniums_are_blue.png",
		trigger = {
			type = "craft",
			item= "dye:blue",
			target = 400
		}
	})

	awards.register_award("awards_dye_white", {
		title = S("White Color Stock"),
		description = S("Craft 100 white dyes."),
		icon = "awards_white_color_stock.png",
		trigger = {
			type = "craft",
			item= "dye:white",
			target = 100
		}
	})
end

if minetest.get_modpath("flowers") then
	awards.register_award("awards_brown_mushroom1", {
		title = S("Tasty Mushrooms"),
		description = S("Eat 3 brown mushrooms."),
		icon = "awards_tasty_mushrooms.png^awards_level1.png",
		trigger = {
			type = "eat",
			item= "flowers:mushroom_brown",
			target = 3,
		}
	})
	awards.register_award("awards_brown_mushroom2", {
		title = S("Mushroom Lover"),
		description = S("Eat 33 brown mushrooms."),
		icon = "awards_mushroom_lover.png^awards_level2.png",
		trigger = {
			type = "eat",
			item= "flowers:mushroom_brown",
			target = 33,
		}
	})
	awards.register_award("awards_brown_mushroom3", {
		title = S("Underground Mushroom Farmer"),
		description = S("Eat 333 brown mushrooms."),
		icon = "awards_underground_mushroom_farmer.png^awards_level3.png",
		trigger = {
			type = "eat",
			item= "flowers:mushroom_brown",
			target = 333,
		}
	})
end

-- This ensures the following code is executed after all items have been registered
minetest.after(0, function()
	-- Check whether there is at least one node which can be built by the player
	local building_is_possible = false
	for _, def in pairs(minetest.registered_nodes) do
		if (def.description and def.pointable ~= false and not def.groups.not_in_creative_inventory) then
			building_is_possible = true
			break
		end
	end

	-- The following awards require at least one node which can be built
	if not building_is_possible then
		return
	end

	awards.register_award("awards_builder1", {
		title = S("Builder"),
		icon = "awards_builder.png^awards_level1.png",
		trigger = {
			type = "place",
			target = 1000,
		},
	})
	awards.register_award("awards_builder2", {
		title = S("Engineer"),
		icon = "awards_engineer.png^awards_level2.png",
		trigger = {
			type = "place",
			target = 5000,
		},
	})
	awards.register_award("awards_builder3", {
		title = S("Architect"),
		icon = "awards_architect.png^awards_level3.png",
		trigger = {
			type = "place",
			target = 10000,
		},
	})
	awards.register_award("awards_builder4", {
		title = S("Master Architect"),
		icon = "awards_master_architect.png^awards_level4.png",
		trigger = {
			type = "place",
			target = 25000,
		},
	})
end)

if minetest.get_modpath("nyancat") then
	-- Found a Nyan cat!
	awards.register_award("award_nyanfind", {
		secret = true,
		title = S("A Cat in a Pop-Tart?!"),
		description = S("Mine a nyan cat."),
		icon = "awards_a_cat_in_a_pop_tart.png",
		trigger = {
			type = "dig",
			node = "nyancat:nyancat",
			target = 1
		}
	})
end

if minetest.get_modpath("pipeworks") then
	awards.register_award("award_pipeworks_transporter", {
		title = S("Item transporter"),
		description = S("Place 10000 tubes."),
		difficulty = 0.05,
		trigger = {
			type = "place",
			node = "pipeworks:tube_1",
			target = 2000,
		}
	})

	awards.register_award("award_pipeworks_automator", {
		title = S("Factory"),
		description = S("Place 5 autocrafters."),
		difficulty = 3,
		trigger = {
			type = "place",
			node = "pipeworks:autocrafter",
			target = 5,
		}
	})
end

if minetest.get_modpath("mesecons") then
	awards.register_award("awards_mesecons", {
		title = S("Electical Engineer"),
		description = S("Place 500 mesecon wires."),
		difficulty = 0.2,
		trigger = {
			type = "place",
			node = "mesecons:wire_00000000_off",
			target = 500,
		}
	})
end

if minetest.get_modpath("basic_materials") then
	awards.register_award("awards_oil", {
		title = S("Oil Typhoon"),
		description = S("Craft 500 times oil extract."),

		trigger = {
			type = "craft",
			item = "basic_materials:oil_extract",
			target = 500,
		}
	})
end


code:
-- Copyright (c) 2013-18 rubenwardy. MIT.

local S = awards.gettext

minetest.register_chatcommand("awards", {
	params = S("[c|clear|disable|enable]"),
	description = S("Show, clear, disable or enable your awards"),
	func = function(name, param)
		if param == "clear" then
			awards.clear_player(name)
			minetest.chat_send_player(name,
			S("All your awards and statistics have been cleared. You can now start again."))
		elseif param == "disable" then
			awards.disable(name)
			minetest.chat_send_player(name, S("You have disabled awards."))
		elseif param == "enable" then
			awards.enable(name)
			minetest.chat_send_player(name, S("You have enabled awards."))
		elseif param == "c" then
			awards.show_to(name, name, nil, true)
		else
			awards.show_to(name, name, nil, false)
		end

		if (param == "disable" or param == "enable") and minetest.global_exists("sfinv") then
			local player = minetest.get_player_by_name(name)
			if player then
				sfinv.set_player_inventory_formspec(player)
			end
		end
	end
})

minetest.register_chatcommand("awd", {
	params = S("<award ID>"),
	description = S("Show details of an award"),
	func = function(name, param)
		local def = awards.registered_awards[param]
		if def then
			minetest.chat_send_player(name, string.format(S("%s: %s"), def.title, def.description))
		else
			minetest.chat_send_player(name, S("Award not found."))
		end
	end
})

minetest.register_chatcommand("awpl", {
	privs = {
		server = true
	},
	params = S("<name>"),
	description = S("Get the awards statistics for the given player or yourself"),
	func = function(name, param)
		if not param or param == "" then
			param = name
		end
		minetest.chat_send_player(name, param)
		local player = awards.player(param)
		minetest.chat_send_player(name, dump(player))
	end
})


code:
local storage = minetest.get_mod_storage()
local __player_data

-- Table Save Load Functions
function awards.save()
	storage:set_string("player_data", minetest.write_json(__player_data))
end

local function convert_data()
	minetest.log("warning", "Importing awards data from previous version")

	local old_players = __player_data
	__player_data = {}
	for name, data in pairs(old_players) do
		while name.name do
			name = name.name
		end
		data.name = name
		print("Converting data for " .. name)

		-- Just rename counted
		local counted = {
			chats  = "chat",
			deaths = "death",
			joins  = "join",
		}
		for from, to in pairs(counted) do
			data[to]   = data[from]
			data[from] = nil
		end

		data.death = {
			unknown = data.death,
			__total = data.death,
		}

		-- Convert item db to new format
		local counted_items = {
			count = "dig",
			place = "place",
			craft = "craft",
		}
		for from, to in pairs(counted_items) do
			local ret = {}

			local count = 0
			if data[from] then
				for modname, items in pairs(data[from]) do
					for itemname, value in pairs(items) do
						itemname = modname .. ":" .. itemname
						local key = minetest.registered_aliases[itemname] or itemname
						ret[key] = value
						count = count + value
					end
				end
			end

			ret.__total = count
			data[from] = nil
			data[to] = ret
		end

		__player_data[name] = data
	end
end

function awards.load()
	local old_save_path = minetest.get_worldpath().."/awards.txt"
	local file = io.open(old_save_path, "r")
	if file then
		local table = minetest.deserialize(file:read("*all"))
		if type(table) == "table" then
			__player_data = table
			convert_data()
		else
			__player_data = {}
		end
		file:close()
		os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt")
		awards.save()
	else
		local json = storage:get("player_data")
		__player_data = json and minetest.parse_json(json) or {}
	end
end

function awards.player(name)
	assert(type(name) == "string")
	local data = __player_data[name] or {}
	__player_data[name] = data

	data.name     = data.name or name
	data.unlocked = data.unlocked or {}
	return data
end

function awards.player_or_nil(name)
	return __player_data[name]
end

function awards.enable(name)
	awards.player(name).disabled = nil
end

function awards.disable(name)
	awards.player(name).disabled = true
end

function awards.clear_player(name)
	__player_data[name] = {}
end


code:
-- Copyright (c) 2013-18 rubenwardy. MIT.

local S = awards.gettext

function awards.get_formspec(name, to, sid)
	local formspec = ""
	local awards_list = awards.get_award_states(name)

	if #awards_list == 0 then
		formspec = formspec .. "label[3.9,1.5;"..minetest.formspec_escape(S("Error: No achivements available.")).."]"
		formspec = formspec .. "button_exit[4.2,2.3;3,1;close;"..minetest.formspec_escape(S("OK")).."]"
		return formspec
	end
	sid = awards_list[sid] and sid or 1

	-- Sidebar
	local sitem = awards_list[sid]
	local sdef = sitem.def
	if sdef and sdef.secret and not sitem.unlocked then
		formspec = formspec .. "label[1,2.75;"..
				minetest.formspec_escape(S("(Secret Award)")).."]"..
				"image[1,0;3,3;awards_unknown.png]"
		if sdef and sdef.description then
			formspec = formspec	.. "textarea[0.25,3.25;4.8,1.7;;"..
					minetest.formspec_escape(
							S("Unlock this award to find out what it is."))..";]"
		end
	else
		local title = sitem.name
		if sdef and sdef.title then
			title = sdef.title
		end
		local status = "%s"
		if sitem.unlocked then
			status = S("%s (unlocked)")
		end

		formspec = formspec .. "textarea[0.5,3.1;4.8,1.45;;" ..
			string.format(status, minetest.formspec_escape(title)) ..
			";]"

		if sdef and sdef.icon then
			formspec = formspec .. "image[0.45,0;3.5,3.5;" .. sdef.icon .. "]"  -- adjusted values from 0.6,0;3,3
		end

		if sitem.progress then
			local barwidth = 3.95
			local perc = sitem.progress.current / sitem.progress.target
			local label = sitem.progress.label
			if perc > 1 then
				perc = 1
			end
			formspec = formspec .. "background[0,8.24;" .. barwidth ..",0.4;awards_progress_gray.png;false]"
			formspec = formspec .. "background[0,8.24;" .. (barwidth * perc) ..",0.4;awards_progress_green.png;false]"
			if label then
				formspec = formspec .. "label[1.6,8.15;" .. minetest.formspec_escape(label) .. "]"
			end
		end

		if sdef and sdef.description then
			formspec = formspec .. "box[-0.05,3.75;3.9,4.2;#000]"
			formspec = formspec	.. "textarea[0.25,3.75;3.9,4.2;;" ..
					minetest.formspec_escape(sdef.description) .. ";]"
		end
	end

	-- Create list box
	formspec = formspec .. "textlist[4,0;3.8,8.6;awards;"
	local first = true
	for _, award in pairs(awards_list) do
		local def = award.def
		if def then
			if not first then
				formspec = formspec .. ","
			end
			first = false

			if def.secret and not award.unlocked then
				formspec = formspec .. "#707070"..minetest.formspec_escape(S("(Secret Award)"))
			else
				local title = award.name
				if def and def.title then
					title = def.title
				end
				-- title = title .. " [" .. award.score .. "]"
				if award.unlocked then
					formspec = formspec .. minetest.formspec_escape(title)
				elseif award.started then
					formspec = formspec .. "#c0c0c0".. minetest.formspec_escape(title)
				else
					formspec = formspec .. "#a0a0a0".. minetest.formspec_escape(title)
				end
			end
		end
	end
	return formspec .. ";"..sid.."]"
end

function awards.show_to(name, to, sid, text)
	if name == "" or name == nil then
		name = to
	end
	local data = awards.player(to)
	if name == to and data.disabled then
		minetest.chat_send_player(name, S("You've disabled awards. Type /awards enable to reenable."))
		return
	end
	if text then
		local awards_list = awards.get_award_states(name)
		if #awards_list == 0 then
			minetest.chat_send_player(to, S("Error: No award available."))
			return
		elseif not data or not data.unlocked  then
			minetest.chat_send_player(to, S("You have not unlocked any awards."))
			return
		end
		minetest.chat_send_player(to, string.format(S("%s’s awards:"), name))

		for str, _ in pairs(data.unlocked) do
			local def = awards.registered_awards[str]
			if def then
				if def.title then
					if def.description then
						minetest.chat_send_player(to, string.format(S("%s: %s"), def.title, def.description))
					else
						minetest.chat_send_player(to, def.title)
					end
				else
					minetest.chat_send_player(to, str)
				end
			end
		end
	else
		local deco = ""
		if minetest.global_exists("default") then
			deco = default.gui_bg .. default.gui_bg_img
		end
		-- Show formspec to user
		minetest.show_formspec(to,"awards:awards",
			"size[8,8.6]" .. deco ..
			awards.get_formspec(name, to, sid))
	end
end

minetest.register_on_player_receive_fields(function(player, formname, fields)
	if formname ~= "awards:awards" then
		return false
	end
	if fields.quit then
		return true
	end
	local name = player:get_player_name()
	if fields.awards then
		local event = minetest.explode_textlist_event(fields.awards)
		if event.type == "CHG" then
			awards.show_to(name, name, event.index, false)
		end
	end

	return true
end)

if minetest.get_modpath("sfinv") then
	sfinv.register_page("awards:awards", {
		title = S("Awards"),
		on_enter = function(self, player, context)
			context.awards_idx = 1
		end,
		is_in_nav = function(self, player, context)
			local data = awards.player(player:get_player_name())
			return not data.disabled
		end,
		get = function(self, player, context)
			local name = player:get_player_name()
			return sfinv.make_formspec(player, context,
				awards.get_formspec(name, name, context.awards_idx),
				false)
		end,
		on_player_receive_fields = function(self, player, context, fields)
			if fields.awards then
				local event = minetest.explode_textlist_event(fields.awards)
				if event.type == "CHG" then
					context.awards_idx = event.index
					sfinv.set_player_inventory_formspec(player, context)
				end
			end
		end
	})

	local function check_and_reshow(name)
		local player = minetest.get_player_by_name(name)
		if not player then
			return
		end

		local context = sfinv.get_or_create_context(player)
		if context.page ~= "awards:awards" then
			return
		end

		sfinv.set_player_inventory_formspec(player, context)
	end

	awards.register_on_unlock(check_and_reshow)
end

if minetest.get_modpath("unified_inventory") ~= nil then
	unified_inventory.register_button("awards", {
		type = "image",
		image = "awards_ui_icon.png",
		tooltip = S("Awards"),
		action = function(player)
			local name = player:get_player_name()
			awards.show_to(name, name, nil, false)
		end,
	})
end


code:
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.

-- Get the latest version of this file at:
--   https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua

local function format(str, ...)
	local args = { ... }
	local function repl(escape, open, num, close)
		if escape == "" then
			local replacement = tostring(args[tonumber(num)])
			if open == "" then
				replacement = replacement..close
			end
			return replacement
		else
			return "@"..open..num..close
		end
	end
	return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end

local gettext, ngettext
if minetest.get_modpath("intllib") then
	if intllib.make_gettext_pair then
		-- New method using gettext.
		gettext, ngettext = intllib.make_gettext_pair()
	else
		-- Old method using text files.
		gettext = intllib.Getter()
	end
end

-- Fill in missing functions.

gettext = gettext or function(msgid, ...)
	return format(msgid, ...)
end

ngettext = ngettext or function(msgid, msgid_plural, n, ...)
	return format(n==1 and msgid or msgid_plural, ...)
end

return gettext, ngettext


code:
-- AWARDS
--
-- Copyright (C) 2013-2015 rubenwardy
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
-- the Free Software Foundation; either version 2.1 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public License along
-- with this program; if not, write to the Free Software Foundation, Inc.,
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--

-- Check if a player object is valid for awards.
local function player_ok(player)
	return player and player.is_player and player:is_player() and not player.is_fake_player
end

awards.register_trigger("chat", {
	type = "counted",
	progress = "@1/@2 chat messages",
	auto_description = { "Send a chat message", "Chat @1 times" },
})
minetest.register_on_chat_message(function(name, message)
	local player = minetest.get_player_by_name(name)
	if not player_ok(player) or string.find(message, "/")  then
		return
	end

	awards.notify_chat(player)
end)

awards.register_trigger("join", {
	type = "counted",
	progress = "@1/@2 joins",
	auto_description = { "Join once", "Join @1 times" },
})
minetest.register_on_joinplayer(awards.notify_join)

awards.register_trigger("death", {
	type = "counted_key",
	progress = "@1/@2 deaths",
	auto_description = { "Die once of @2", "Die @1 times of @2" },
	auto_description_total = { "Die @1 times.", "Mine @1 times" },
	get_key = function(self, def)
		return def.trigger.reason
	end,
})
minetest.register_on_dieplayer(function(player, reason)
	if reason then
		reason = reason.type
	else
		reason = "unknown"
	end
	awards.notify_death(player, reason)
end)

awards.register_trigger("dig", {
	type = "counted_key",
	progress = "@1/@2 dug",
	auto_description = { "Mine: @2", "Mine: @1×@2" },
	auto_description_total = { "Mine @1 block.", "Mine @1 blocks." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.node] or def.trigger.node
	end,
	key_is_item = true,
})
minetest.register_on_dignode(function(pos, node, player)
	if not player_ok(player) or not pos or not node then
		return
	end

	local node_name = node.name
	node_name = minetest.registered_aliases[node_name] or node_name
	awards.notify_dig(player, node_name)
end)

awards.register_trigger("place", {
	type = "counted_key",
	progress = "@1/@2 placed",
	auto_description = { "Place: @2", "Place: @1×@2" },
	auto_description_total = { "Place @1 block.", "Place @1 blocks." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.node] or def.trigger.node
	end,
	key_is_item = true,
})
minetest.register_on_placenode(function(pos, node, player)
	if not player_ok(player) or not pos or not node then
		return
	end

	local node_name = node.name
	node_name = minetest.registered_aliases[node_name] or node_name
	awards.notify_place(player, node_name)
end)

awards.register_trigger("craft", {
	type = "counted_key",
	progress = "@1/@2 crafted",
	auto_description = { "Craft: @2", "Craft: @1×@2" },
	auto_description_total = { "Craft @1 item", "Craft @1 items." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.item] or def.trigger.item
	end,
	key_is_item = true,
})
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
	if not player_ok(player) or itemstack:is_empty() then
		return
	end

	local itemname = itemstack:get_name()
	itemname = minetest.registered_aliases[itemname] or itemname
	awards.notify_craft(player, itemname, itemstack:get_count())
end)

awards.register_trigger("eat", {
	type = "counted_key",
	progress = "@1/@2 eaten",
	auto_description = { "Eat @2", "Eat @1×@2" },
	auto_description_total = { "Eat @1 item", "Eat @1 items." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.item] or def.trigger.item
	end,
	key_is_item = true,
})
minetest.register_on_item_eat(function(_, _, itemstack, player, _)
	if not player_ok(player) or itemstack:is_empty() then
		return
	end

	local itemname = itemstack:get_name()
	itemname = minetest.registered_aliases[itemname] or itemname
	awards.notify_eat(player, itemname)
end)


code:
       __________                   .___    _____
       \______   \ ____ _____     __| _/   /     \   ____
    	|       _// __ \\__  \   / __ |   /  \ /  \_/ __ \
    	|    |   \  ___/ / __ \_/ /_/ |  /    Y    \  ___/
    	|____|_  /\___  >____  /\____ |  \____|__  /\___ >
  	           \/     \/     \/      \/          \/     \/

					     and license info

 Below is a listing of the Award icon source and attribution/licence info.
     CC BY-SA 3.0 - https://creativecommons.org/licenses/by-sa/3.0/
   CC0 - https://creativecommons.org/share-your-work/public-domain/cc0/

A Cat in a Pop Tart?! -- CC0
	Inspiration art RinRinDaishi on Deviant art
	https://www.deviantart.com/rinrindaishi/art/Nyancat-Bed-335515771
	see _RinrinDaishi_message.png
	Icon drawn by Sirrobzeroone from scratch

Architect -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Stone Wall (cobble) texture - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Aspiring Farmer -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Fence texture - Paramat/Blockmen
	Wheat Texture - PilzAdam/BlockMen/MasterGollum/Gambit
	Rest - Sirrobzeroone

Backpacker -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Binoculars - Paramat
	Wool Texture - Cisoun
	Rest - Sirrobzeroone

Baker -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Stone Wall texture - Neuromancer/Brane Praefect
	Furnace - Neuromancer
	Rest - Sirrobzeroone

Banker -- CC BY-SA 3.0
	Wood Pine Floor (default_pinewood.png) - Paramat
	Chest - BlockMen
	Rest - Sirrobzeroone

Bricker -- CC BY-SA 3.0
	Brick Texture - Calinou
	Rest - Sirrobzeroone

Build a Cave -- CC BY-SA 3.0
	Stone (default_stone.png) - Cisoun
	Grass texture (default_grass.png) - Paramat
	Rest - Sirrobzeroone

Builder -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Wool Texture - Cisoun
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Castorama -- CC0 (Public Domain)
	All - Sirrobzeroone

Crafter of Sticks -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Grass Tall (default_grass_*.png) - Gambit
	Rest - Sirrobzeroone

Dandelions are Yellow -- CC0 (Public Domain)
	All - Openclipart Library/Sirrobzeroone

Desert Discoverer -- CC BY-SA 3.0
	Sand (default_desert_sand.png) - VanessaE
	Dry Shrub (default_dry_shrub.png) - celeron55
	Sun () - Celeron55
	Rest - Sirrobzeroone

Desert Dweller -- CC BY-SA 3.0
	Sand (default_desert_sand.png) - VanessaE
	Rest - Sirrobzeroone

Engineer -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Far Lands -- CC BY-SA 3.0
	Water (default_water.png) - Cisoun
	Tree Bark (default_tree.png) - Cisoun
	Tree Wood (default_wood.png) - BlockMen
	Tree Leaves (default_leaves.png) - Cisoun
	Sun () - Celeron55
	Rest - Sirrobzeroone

Farming Skills Acquired -- CC BY-SA 3.0
	Wheat Texture - PilzAdam/BlockMen/MasterGollum/Gambit
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Grass texture (default_grass.png) - Paramat
	Sun () - Celeron55
	Rest - Sirrobzeroone

Field Worker -- CC BY-SA 3.0
	Wheat Texture - PilzAdam/BlockMen/MasterGollum/Gambit
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Rest - Sirrobzeroone

Filthy Rich -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Firefighter -- CC0 (Public Domain)
	All - Sirrobzeroone

First Day in the Woods -- CC BY-SA 3.0
	Tree Bark (default_tree.png) - Cisoun
	Grass texture (default_grass.png) - Paramat
	Grass Tall (default_grass_*.png) - Gambit
	Axe (default_tool_*.png) - BlockMen
	Rest - Sirrobzeroone

First Gold Find -- CC BY-SA 3.0
	Gold Nugget (default_gold_lump.png) - Gambit
	Stone (default_stone.png) - Cisoun
	Rest - Sirrobzeroone

First Mese Find -- CC BY-SA 3.0
	Stone (default_stone.png) - Cisoun
	Mese Crystal (default_mese_crystal.png) - VanessaE
	Rest - Sirrobzeroone

Fortress -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Rest - Sirrobzeroone

Geraniums are Blue -- CC BY-SA 3.0
	Geranium (flowers_geranium.png)
	Wool Texture - Cisoun
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Girl's Best Friend -- CC BY-SA 3.0
	Diamond (default_diamond.png) - BlockMen
	Rest - Sirrobzeroone

Glacier Discoverer -- CC BY-SA 3.0
	Ice (default_ice.png) - as197
	Snow (default_snow.png) - Gambit
	Rest - Sirrobzeroone

Glasser -- CC BY-SA 3.0
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Gold Rush -- CC BY-SA 3.0
	Stone Blocks (default_stone_block.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Stone (default_stone.png) - Cisoun
	Gold Nugget (default_gold_lump.png) - Gambit
	Torch (default_torch_on_floor.png) - VanessaE
	Rail (carts_rail_*) - Hexafraction/Sofar
	Cart (carts_cart_side.png) - Gambit
	Rest - Sirrobzeroone

Grasslands Discoverer -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Sun () - Celeron55
	Bluberry (default_blueberries.png) - Random-Geek
	Viola (flowers_viola.png) - RHRhino/Gambit/yyt16384/Paramat
	Rest - Sirrobzeroone

Hardened Miner -- CC BY-SA 3.0
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Hardest Block on Earth -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Diamond Block (default_diamond_block.png) - Gambit
	Rest - Sirrobzeroone

Hotelier -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Wood (default_wood.png) - BlockMen
	Tree Bark (default_tree.png) - Cisoun
	Wood Pine Floor (default_pinewood.png) - Paramat
	Wood Acacia Floor (default_acacia_wood.png) - Paramat
	Rest - Sirrobzeroone

House of Obsidian -- CC BY-SA 3.0
	Wood Acacia Floor (default_acacia_wood.png) - Paramat
	Grass texture (default_grass.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Obsidian (default_obsidian.png) - Jojoa1997
	Rest - Sirrobzeroone

In the Dungeon -- CC BY-SA 3.0
	Wood Pine Floor (default_pinewood.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Industrial Age -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Wood Pine Floor (default_pinewood.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Sun () - Celeron55
	Rest - Sirrobzeroone

Jungle Discoverer -- CC BY-SA 3.0
	Jungle Bark (default_jungletree.png) - Cisoun
	Jungle Leaves (default_jungleleaves.png) - PilzAdam
	Jungle Litter (default_rainforest_litter.png) - npx
	Grass texture (default_grass.png) - Paramat
	Rest - Sirrobzeroone

Junglebaby -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Jungle Bark (default_jungletree.png) - Cisoun
	Rest - Sirrobzeroone

Jungleman -- CC BY-SA 3.0
	Jungle Bark (default_jungletree.png) - Cisoun
	Jungle Leaves (default_jungleleaves.png) - PilzAdam
	Rest - Sirrobzeroone

Lava and Water -- CC BY-SA 3.0
	Water (default_water.png) - Cisoun
	Lava  (default_lava.png) - Cisoun
	Obsidian (default_obsidian.png) - Jojoa1997
	Rest - Sirrobzeroone

Lava Miner -- CC BY-SA 3.0
	Lava  (default_lava.png) - Cisoun
	Stone (default_stone.png) - Cisoun
	Rest - Sirrobzeroone

Light It Up -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
 	Torch (default_torch_on_floor.png) - VanessaE
	Rest - Sirrobzeroone

Little Library -- CC BY-SA 3.0
	BookShelf (default_bookshelf.png) - Celeron55
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Long Ladder -- CC BY-SA 3.0
	Ladder (default_ladder_wood.png) - Celeron55
	Rest - Sirrobzeroone

Lumberjack -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Rest - Sirrobzeroone

Marchand De Sable -- CC BY-SA 3.0
	Sand ( default_desert_sand.png) - VanessaE
	Sand Block (default_desert_stone.png) - VanessaE
	Rest - Sirrobzeroone

Master Miner -- CC BY-SA 3.0
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Mese Mastery -- CC BY-SA 3.0
	Stone (default_stone.png) - Cisoun
	Mese block (default_mese_block.png) - Paramat
	Rest - Sirrobzeroone

Mini Miner -- CC BY-SA 3.0
	Stone (default_stone.png) - Cisoun
	Iron Ore (default_mineral_iron.png) - Celeron55
	Rest - Sirrobzeroone

Mushroom Lover -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Obsessed with Obsidian -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Obsidian (default_obsidian.png) - Jojoa1997
	Rest - Sirrobzeroone

On The Way -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Rail (carts_rail_*) - Hexafraction/Sofar
	Rest - Sirrobzeroone

Outpost -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Rest - Sirrobzeroone

Pharaoh -- CC BY-SA 3.0
	Sand (default_desert_sand.png) - VanessaE
	Rest - Sirrobzeroone

Professional Lumberjack -- CC BY-SA 3.0
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Wood (default_wood.png) - BlockMen
	Axe (default_tool_*.png) - BlockMen
	Rest - Sirrobzeroone

Pyromaniac -- CC0 (Public Domain)
	All - Sirrobzeroone

Really Well Lit -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Wheat Texture - PilzAdam/BlockMen/MasterGollum/Gambit
	Tree Wood (default_wood.png) - BlockMen
	Rest - Sirrobzeroone

Roses Are Red -- CC0 (Public Domain)
	All - Sirrobzeroone

Saint-Maclou -- CC0 (Public Domain)
	All - Sirrobzeroone

Sam the Trapper -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Grass texture (default_grass.png) - Paramat
	Rest - Sirrobzeroone

Savannah Discoverer -- CC BY-SA 3.0
	Dry grass (default_dry_grass.png) - Paramat
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Sun () - Celeron55
	Acacia Leaves (default_acacia_leaves.png) - Paramat
	Acacia Bark (default_acacia_tree.png) - Paramat
	Rest - Sirrobzeroone

Semi-pro Lumberjack -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Tree Bark (default_tree.png) - Cisoun
	Axe (default_tool_*.png) - BlockMen
	Rest - Sirrobzeroone

Smelter -- CC0 (Public Domain)
	All - Openclipart library/Sirrobzeroone

Tasty Mushrooms -- CC0 (Public Domain)
	All - Openclipart library/Sirrobzeroone

Treasurer -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Wood Pine Floor (default_pinewood.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Underground Mushroom Farmer -- CC BY-SA 3.0
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Stone (default_stone.png) - Cisoun
	Mushroom (flowers_mushroom_brown.png)	- RHRhino/Gambit/yyt16384/Paramat
	Torch (default_torch_on_floor.png) - VanessaE
	Rest - Sirrobzeroone

Very Simple Snow Man -- CC BY-SA 3.0
	Snow (default_snow.png) - Gambit
	Stick (default_stick.png) - BlockMen
	Rest - Sirrobzeroone

Watchtower -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Tree Bark (default_tree.png) - Cisoun
	Tree Leaves (default_leaves.png) - Cisoun
	Rest - Sirrobzeroone

Well Lit -- CC BY-SA 3.0
	Grass texture (default_grass.png) - Paramat
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Wood Pine Floor (default_pinewood.png) - Paramat
	Rest - Sirrobzeroone

Wheat Magnate -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Sun () - Celeron55
	Wheat Texture - PilzAdam/BlockMen/MasterGollum/Gambit
	Rest - Sirrobzeroone

White Color Stock -- CC BY-SA 3.0
	Tree Wood (default_wood.png) - BlockMen
	Cobble Wall (default_cobble.png) - Neuromancer/Brane Praefect
	Rest - Sirrobzeroone

Wool Over Your Eyes -- CC BY-SA 3.0
	Sun () - Celeron55
	Grass texture (default_grass.png) - Paramat
	Dirt Texture (default_dirt.png) - Random-Geek/Neuromancer
	Bluberry (default_blueberries.png) - Random-Geek
	Viola (flowers_viola.png) - RHRhino/Gambit/yyt16384/Paramat
	Grass Tall (default_grass_*.png) - Gambit
	Rest - Sirrobzeroone

Wow, I am Diamonds! -- CC BY-SA 3.0
	Diamond (default_diamond.png) - BlockMen
	Stone (default_stone.png) - Cisoun
	Rest - Sirrobzeroone

You�re a copper  -- CC0 (Public Domain)
	All - Sirrobzeroone

Yummy! -- CC0 (Public Domain)
	All - Openclipart library/Sirrobzeroone


code:
#! /bin/bash

# To create a new translation:
#   msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot

cd "$(dirname "${BASH_SOURCE[0]}")/..";

# Extract translatable strings.
xgettext --from-code=UTF-8 \
		--keyword=S \
		--keyword=NS:1,2 \
		--keyword=N_ \
		--add-comments='Translators:' \
		--add-location=file \
		-o locale/template.pot \
		$(find . -name '*.lua')

# Update translations.
find locale -name '*.po' | while read -r file; do
	echo $file
	msgmerge --update $file locale/template.pot;
done


code:
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs     diff=csharp
*.sln    merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain


code:
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath

#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store

#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg


code:
# Diet

Adds a mechanic to encourage food variety.

Created by rubenwardy. Works best with the food mod.

License: CC0

https://forum.minetest.net/viewtopic.php?t=9051