2014-09-26 21:36:40 +02:00
|
|
|
-- AWARDS
|
2015-06-10 19:48:20 +02:00
|
|
|
--
|
|
|
|
-- 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.
|
|
|
|
--
|
|
|
|
|
2013-02-22 18:53:42 +01:00
|
|
|
|
2014-05-02 20:52:25 +02:00
|
|
|
local S
|
|
|
|
if (intllib) then
|
|
|
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2013-02-22 21:43:40 +01:00
|
|
|
dofile(minetest.get_modpath("awards").."/api.lua")
|
2015-06-10 18:45:18 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/chat_commands.lua")
|
2015-06-10 20:18:56 +02:00
|
|
|
dofile(minetest.get_modpath("awards").."/triggers.lua")
|
2015-06-11 18:35:32 +02:00
|
|
|
awards.set_intllib(S)
|
2013-02-22 21:38:01 +01:00
|
|
|
|
2013-02-23 15:44:23 +01:00
|
|
|
-- Light it up
|
|
|
|
awards.register_achievement("award_lightitup",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Light It Up"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Place 100 torches."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "default:torch",
|
2016-07-29 18:13:01 +02:00
|
|
|
target = 100
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 15:44:23 +01:00
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Light ALL the things!
|
2016-07-29 17:32:58 +02:00
|
|
|
awards.register_achievement("award_well_lit",{
|
|
|
|
title = S("Well Lit"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Place 1,000 torches."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "default:torch",
|
|
|
|
target = 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- Saint-Maclou
|
|
|
|
if minetest.get_modpath("moreblocks") then
|
|
|
|
awards.register_achievement("award_saint_maclou",{
|
|
|
|
title = S("Saint-Maclou"),
|
|
|
|
description = S("Place 20 coal checkers."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "moreblocks:coal_checker",
|
|
|
|
target = 20
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Castorama
|
|
|
|
awards.register_achievement("award_castorama",{
|
|
|
|
title = S("Castorama"),
|
|
|
|
description = S("Place 20 iron checkers."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "moreblocks:iron_checker",
|
|
|
|
target = 20
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Sam the Trapper
|
|
|
|
awards.register_achievement("award_sam_the_trapper",{
|
|
|
|
title = S("Sam the Trapper"),
|
|
|
|
description = S("Place 2 trap stones."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "moreblocks:trap_stone",
|
|
|
|
target = 2
|
|
|
|
}
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Obsessed with Obsidian
|
|
|
|
awards.register_achievement("award_obsessed_with_obsidian",{
|
|
|
|
title = S("Obsessed with Obsidian"),
|
|
|
|
description = S("Mine 50 obsidian."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_miniminer.png",
|
|
|
|
background = "awards_bg_mining.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:obsidian",
|
2016-07-29 18:13:01 +02:00
|
|
|
target = 50
|
2014-09-26 21:20:44 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- On the way
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_on_the_way", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("On The Way"),
|
|
|
|
description = S("Place 100 rails."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_novicebuilder.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "default:rail",
|
|
|
|
target = 100
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Lumberjack
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_lumberjack", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Lumberjack"),
|
|
|
|
description = S("Dig 100 tree blocks."),
|
|
|
|
icon = "default_tree.png",
|
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
2016-07-29 18:13:01 +02:00
|
|
|
target = 100
|
2014-09-26 21:20:44 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Semi-pro Lumberjack
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_lumberjack_semipro", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Semi-pro Lumberjack"),
|
|
|
|
description = S("Dig 1,000 tree blocks."),
|
|
|
|
icon = "default_tree.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
2014-09-26 21:20:44 +02:00
|
|
|
target = 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Professional Lumberjack
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_lumberjack_professional", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Professional Lumberjack"),
|
|
|
|
description = S("Dig 10,000 tree blocks."),
|
|
|
|
icon = "default_tree.png",
|
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
|
|
|
target = 10000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- L33T Lumberjack
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_lumberjack_leet", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("L33T Lumberjack"),
|
|
|
|
description = S("Dig 100,000 tree blocks."),
|
|
|
|
icon = "default_tree.png",
|
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
|
|
|
target = 100000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Junglebaby
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_junglebaby", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Junglebaby"),
|
|
|
|
description = S("Dig 100 jungle tree blocks."),
|
|
|
|
icon = "default_jungletree.png",
|
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:jungletree",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 100
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 15:44:23 +01:00
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Jungleman
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_jungleman", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Jungleman"),
|
|
|
|
description = S("Dig 1,000 jungle tree blocks."),
|
|
|
|
icon = "default_jungletree.png",
|
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:jungletree",
|
|
|
|
target = 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2013-02-22 21:43:40 +01:00
|
|
|
-- Found some Mese!
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_mesefind", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("First Mese Find"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Find some Mese."),
|
|
|
|
icon = "default_mese_block.png",
|
2016-08-01 21:34:23 +02:00
|
|
|
background = "awards_bg_mining.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
2014-09-26 20:36:58 +02:00
|
|
|
node = "default:stone_with_mese",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-22 18:53:42 +01:00
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- You're a copper
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_youre_a_copper", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("You're a copper"),
|
|
|
|
description = S("Dig 1,000 copper ores."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_miniminer.png",
|
|
|
|
background = "awards_bg_mining.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:stone_with_copper",
|
|
|
|
target = 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2013-02-23 18:31:40 +01:00
|
|
|
-- Found a Nyan cat!
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_nyanfind", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("OMG, Nyan Cat!"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Find a nyan cat."),
|
2016-07-29 17:25:39 +02:00
|
|
|
icon = "nyancat_front.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:nyancat",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 18:31:40 +01:00
|
|
|
})
|
|
|
|
|
2013-02-23 15:44:23 +01:00
|
|
|
-- Mini Miner
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_mine2", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Mini Miner"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Dig 100 stone blocks."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_miniminer.png",
|
|
|
|
background = "awards_bg_mining.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:stone",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 100
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 15:44:23 +01:00
|
|
|
})
|
2013-02-22 21:38:01 +01:00
|
|
|
|
2013-02-23 15:44:23 +01:00
|
|
|
-- Hardened Miner
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_mine3", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Hardened Miner"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Dig 1,000 stone blocks"),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_miniminer.png",
|
|
|
|
background = "awards_bg_mining.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:stone",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1000
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 15:44:23 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Master Miner
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_mine4", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Master Miner"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Dig 10,000 stone blocks."),
|
2016-08-01 21:34:23 +02:00
|
|
|
icon = "awards_miniminer.png",
|
|
|
|
background = "awards_bg_mining.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:stone",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 10000
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 16:13:21 +01:00
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Marchand de sable
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_marchand_de_sable", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Marchand De Sable"),
|
|
|
|
description = S("Dig 1,000 sand."),
|
2016-08-01 21:34:23 +02:00
|
|
|
background = "awards_bg_mining.png",
|
2014-09-26 21:20:44 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:sand",
|
|
|
|
target = 1000
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2016-07-29 17:19:58 +02:00
|
|
|
awards.register_achievement("awards_crafter_of_sticks", {
|
|
|
|
title = S("Crafter of Sticks"),
|
|
|
|
description = S("Create 100 Sticks"),
|
|
|
|
trigger = {
|
|
|
|
type = "craft",
|
|
|
|
item = "default:stick",
|
|
|
|
target = 100
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Join
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_join2", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Frequent Visitor"),
|
|
|
|
description = S("Connect to the server 50 times."),
|
|
|
|
trigger = {
|
|
|
|
type = "join",
|
|
|
|
target = 50
|
|
|
|
},
|
|
|
|
secret = true
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Dying Spree
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_dying_spree", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Dying Spree"),
|
|
|
|
description = S("Die 5 times."),
|
|
|
|
trigger = {
|
|
|
|
type = "death",
|
|
|
|
target = 5
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Bot-like
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_bot_like", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("Bot-like"),
|
|
|
|
description = S("Die 10 times."),
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "death",
|
2014-09-26 21:20:44 +02:00
|
|
|
target = 10
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 18:04:20 +01:00
|
|
|
})
|
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- You Suck!
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_you_suck", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("You Suck!"),
|
|
|
|
description = S("Die 100 times."),
|
|
|
|
trigger = {
|
|
|
|
type = "death",
|
|
|
|
target = 100
|
|
|
|
},
|
|
|
|
secret = true
|
|
|
|
})
|
|
|
|
|
2013-02-23 18:04:20 +01:00
|
|
|
-- Burned to death
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_burn", {
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("You're a witch!"),
|
2014-09-26 21:20:44 +02:00
|
|
|
description = S("Burn to death in a fire.")
|
2013-02-23 18:04:20 +01:00
|
|
|
})
|
2014-09-26 20:36:58 +02:00
|
|
|
awards.register_onDeath(function(player,data)
|
|
|
|
local pos = player:getpos()
|
2014-09-26 21:20:44 +02:00
|
|
|
if pos and minetest.find_node_near(pos, 2, "fire:basic_flame") ~= nil then
|
2014-09-26 20:36:58 +02:00
|
|
|
return "award_burn"
|
2015-06-10 18:45:18 +02:00
|
|
|
end
|
2014-09-26 20:36:58 +02:00
|
|
|
return nil
|
|
|
|
end)
|
2013-02-23 18:04:20 +01:00
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Died in flowing lava
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_in_the_flow", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("In the Flow"),
|
|
|
|
description = S("Die in flowing lava.")
|
2014-05-02 20:52:25 +02:00
|
|
|
})
|
2014-09-26 21:20:44 +02:00
|
|
|
awards.register_onDeath(function(player,data)
|
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and minetest.find_node_near(pos, 2, "default:lava_flowing") ~= nil then
|
|
|
|
return "award_in_the_flow"
|
2015-06-10 18:45:18 +02:00
|
|
|
end
|
2014-09-26 21:20:44 +02:00
|
|
|
return nil
|
|
|
|
end)
|
2014-05-02 20:52:25 +02:00
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Die near diamond ore
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_this_is_sad", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("This is Sad"),
|
|
|
|
description = S("Die near diamond ore.")
|
|
|
|
})
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_on_death(function(player,data)
|
2014-09-26 21:20:44 +02:00
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and minetest.find_node_near(pos, 5, "default:stone_with_diamond") ~= nil then
|
|
|
|
return "award_this_is_sad"
|
2015-06-10 18:45:18 +02:00
|
|
|
end
|
2014-09-26 21:20:44 +02:00
|
|
|
return nil
|
|
|
|
end)
|
2014-05-02 20:52:25 +02:00
|
|
|
|
2014-09-26 21:20:44 +02:00
|
|
|
-- Die near diamond ore
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_achievement("award_the_stack", {
|
2014-09-26 21:20:44 +02:00
|
|
|
title = S("The Stack"),
|
|
|
|
description = S("Die near bones.")
|
2014-05-02 21:12:30 +02:00
|
|
|
})
|
2015-06-10 19:39:22 +02:00
|
|
|
awards.register_on_death(function(player,data)
|
2014-09-26 21:20:44 +02:00
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and minetest.find_node_near(pos, 5, "bones:bones") ~= nil then
|
|
|
|
return "award_the_stack"
|
2015-06-10 18:45:18 +02:00
|
|
|
end
|
2014-09-26 21:20:44 +02:00
|
|
|
return nil
|
|
|
|
end)
|
2016-07-29 17:32:58 +02:00
|
|
|
|
|
|
|
-- Die near diamond ore
|
|
|
|
awards.register_achievement("award_deep_down", {
|
|
|
|
title = S("Deep Down"),
|
|
|
|
description = S("Die below -10000"),
|
|
|
|
secret = true
|
|
|
|
})
|
|
|
|
awards.register_on_death(function(player,data)
|
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and pos.y < -10000 then
|
|
|
|
return "award_deep_down"
|
|
|
|
end
|
|
|
|
return nil
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- Die near diamond ore
|
|
|
|
awards.register_achievement("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:getpos()
|
|
|
|
if pos and pos.y > 10000 then
|
|
|
|
return "award_no_screen"
|
|
|
|
end
|
|
|
|
return nil
|
|
|
|
end)
|