2013-02-22 18:53:42 +01:00
|
|
|
-- AWARDS
|
2014-05-02 19:48:32 +02:00
|
|
|
-- by Rubenwardy, CC-BY-SA
|
2013-02-22 18:53:42 +01:00
|
|
|
-------------------------------------------------------
|
2013-02-22 21:43:40 +01:00
|
|
|
-- this is the init file for the award mod
|
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")
|
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"),
|
|
|
|
description = S("Place 100 torches"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "novicebuilder.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "place",
|
|
|
|
node = "default:torch",
|
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
|
|
|
})
|
|
|
|
|
|
|
|
-- Lumber Jack
|
|
|
|
awards.register_achievement("award_lumberjack",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Lumber Jack"),
|
|
|
|
description = S("Dig 100 tree blocks"),
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
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:43:40 +01:00
|
|
|
-- Found some Mese!
|
2013-02-22 18:53:42 +01:00
|
|
|
awards.register_achievement("award_mesefind",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("First Mese Find"),
|
|
|
|
description = S("Found some Mese!"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "mese.png",
|
|
|
|
background = "bg_mining.png",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
2014-05-02 20:56:36 +02:00
|
|
|
node = "default:mese",
|
|
|
|
target = 1
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-22 18:53:42 +01:00
|
|
|
})
|
|
|
|
|
2013-02-23 18:31:40 +01:00
|
|
|
-- Found a Nyan cat!
|
|
|
|
awards.register_achievement("award_nyanfind",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("OMG, Nyan Cat!"),
|
|
|
|
description = S("Find a nyan cat"),
|
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
|
|
|
-- Just entered the mine
|
|
|
|
awards.register_achievement("award_mine1",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Entering the mine"),
|
|
|
|
description = S("You have dug 10 stone blocks"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "miniminer.png",
|
|
|
|
background = "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 = 10
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 15:44:23 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Mini Miner
|
|
|
|
awards.register_achievement("award_mine2",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Mini Miner"),
|
|
|
|
description = S("You have dug 100 stone blocks"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "miniminer.png",
|
|
|
|
background = "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
|
|
|
|
awards.register_achievement("award_mine3",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Hardened Miner"),
|
|
|
|
description = S("You have dug 1000 stone blocks"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "miniminer.png",
|
|
|
|
background = "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
|
|
|
|
awards.register_achievement("award_mine4",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("Master Miner"),
|
|
|
|
description = S("You have dug 10000 stone blocks"),
|
2013-02-25 20:15:40 +01:00
|
|
|
icon = "miniminer.png",
|
|
|
|
background = "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
|
|
|
})
|
|
|
|
|
|
|
|
-- First Death
|
|
|
|
awards.register_achievement("award_death1",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("First Death"),
|
|
|
|
description = S("You have more lives than a cat!"),
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "death",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1
|
2014-05-02 20:11:21 +02:00
|
|
|
}
|
2013-02-23 18:04:20 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Burned to death
|
|
|
|
awards.register_achievement("award_burn",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("You're a witch!"),
|
2014-05-02 21:09:54 +02:00
|
|
|
description = S("Burn to death in a fire")
|
2013-02-23 18:04:20 +01:00
|
|
|
})
|
|
|
|
|
2014-05-02 20:11:21 +02:00
|
|
|
-- 1 sentence
|
|
|
|
awards.register_achievement("award_chat1",{
|
2014-05-02 20:52:25 +02:00
|
|
|
title = S("First Word"),
|
|
|
|
description = S("Use the chat to talk to players"),
|
2014-05-02 20:11:21 +02:00
|
|
|
trigger = {
|
|
|
|
type = "chat",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1
|
2014-05-02 20:52:25 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- Join
|
|
|
|
awards.register_achievement("award_join1",{
|
|
|
|
title = S("Welcome!"),
|
|
|
|
description = S("Connect to the server"),
|
|
|
|
trigger = {
|
|
|
|
type = "join",
|
2014-05-02 20:56:36 +02:00
|
|
|
target = 1
|
2014-05-02 20:52:25 +02:00
|
|
|
}
|
2014-05-02 20:11:21 +02:00
|
|
|
})
|
|
|
|
|
2013-02-23 18:04:20 +01:00
|
|
|
awards.register_onDeath(function(player,data)
|
2014-05-02 19:42:25 +02:00
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and minetest.find_node_near(pos, 1, "fire:basic_flame") ~= nil then
|
2013-02-23 18:04:20 +01:00
|
|
|
return "award_burn"
|
2014-05-02 19:42:25 +02:00
|
|
|
end
|
2013-02-23 18:04:20 +01:00
|
|
|
return nil
|
|
|
|
end)
|