2013-02-22 18:53:42 +01:00
|
|
|
-- AWARDS
|
|
|
|
-- by Rubenwardy, CC-BY-SA
|
|
|
|
-------------------------------------------------------
|
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
|
|
|
-------------------------------------------------------
|
|
|
|
|
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",{
|
|
|
|
title = "Light It Up",
|
|
|
|
description = "You have placed 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",
|
|
|
|
target = 100,
|
2013-02-23 15:44:23 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Lumber Jack
|
|
|
|
awards.register_achievement("award_lumberjack",{
|
|
|
|
title = "Lumber Jack",
|
|
|
|
description = "You have dug 100 tree blocks",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:tree",
|
|
|
|
target = 100,
|
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",{
|
|
|
|
title = "First Mese Find",
|
|
|
|
description = "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",
|
|
|
|
node = "default:stone_with_mese",
|
|
|
|
target = 100,
|
2013-02-23 13:02:02 +01: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",{
|
|
|
|
title = "OMG, Nyan Cat!",
|
|
|
|
description = "Find a nyan cat",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "dig",
|
|
|
|
node = "default:nyancat",
|
|
|
|
target = 1,
|
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",{
|
2013-02-25 20:15:40 +01:00
|
|
|
title = "Entering the mine",
|
2013-02-23 15:44:23 +01:00
|
|
|
description = "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",
|
|
|
|
target = 10,
|
2013-02-23 15:44:23 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Mini Miner
|
|
|
|
awards.register_achievement("award_mine2",{
|
|
|
|
title = "Mini Miner",
|
|
|
|
description = "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",
|
|
|
|
target = 100,
|
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",{
|
|
|
|
title = "Hardened Miner",
|
|
|
|
description = "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",
|
|
|
|
target = 1000,
|
2013-02-23 15:44:23 +01:00
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Master Miner
|
|
|
|
awards.register_achievement("award_mine4",{
|
|
|
|
title = "Master Miner",
|
|
|
|
description = "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",
|
|
|
|
target = 10000,
|
2013-02-23 13:02:02 +01:00
|
|
|
},
|
2013-02-23 16:13:21 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- First Death
|
|
|
|
awards.register_achievement("award_death1",{
|
|
|
|
title = "First Death",
|
2014-05-02 19:35:11 +02:00
|
|
|
description = "Oh well, it does not matter\nyou have more lives than a cat",
|
2014-05-02 19:42:25 +02:00
|
|
|
trigger = {
|
|
|
|
type = "death",
|
|
|
|
target = 1,
|
2013-02-23 16:13:21 +01:00
|
|
|
},
|
2013-02-23 18:04:20 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Burned to death
|
|
|
|
awards.register_achievement("award_burn",{
|
2014-05-02 19:40:08 +02:00
|
|
|
title = "You're a witch!",
|
2013-02-23 18:04:20 +01:00
|
|
|
description = "Burn to death in a fire",
|
|
|
|
})
|
|
|
|
|
|
|
|
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)
|