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"),
|
2014-09-26 20:36:58 +02:00
|
|
|
description = S("Found my first mese block"),
|
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-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
|
|
|
})
|
|
|
|
|
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!"),
|
2014-09-26 20:36:58 +02:00
|
|
|
description = S("I found a nyan cat"),
|
2014-09-26 20:39:17 +02:00
|
|
|
icon = "default_nc_rb.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
|
|
|
|
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-09-26 20:36:58 +02:00
|
|
|
title = S("Dies a lot"),
|
|
|
|
description = S("The game isn't that hard, is it?"),
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "death",
|
2014-09-26 20:36:58 +02:00
|
|
|
target = 100
|
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-09-26 20:36:58 +02:00
|
|
|
awards.register_onDeath(function(player,data)
|
|
|
|
local pos = player:getpos()
|
|
|
|
if pos and minetest.find_node_near(pos, 1, "fire:basic_flame") ~= nil then
|
|
|
|
return "award_burn"
|
|
|
|
end
|
|
|
|
return nil
|
|
|
|
end)
|
2013-02-23 18:04:20 +01:00
|
|
|
|
2014-09-26 20:42:00 +02:00
|
|
|
-- Chat
|
|
|
|
awards.register_achievement("award_chat2",{
|
|
|
|
title = S("Chatter Box"),
|
|
|
|
description = S("Speak over one hundred times"),
|
2014-05-02 20:11:21 +02:00
|
|
|
trigger = {
|
|
|
|
type = "chat",
|
2014-09-26 20:42:00 +02:00
|
|
|
target = 100
|
|
|
|
},
|
|
|
|
secret = true
|
2014-05-02 20:52:25 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- Join
|
2014-05-02 21:12:30 +02:00
|
|
|
awards.register_achievement("award_join2",{
|
|
|
|
title = S("Frequent Visitor"),
|
|
|
|
description = S("Connect to the server 50 times"),
|
|
|
|
trigger = {
|
|
|
|
type = "join",
|
|
|
|
target = 50
|
|
|
|
},
|
|
|
|
secret = true
|
|
|
|
})
|