awards/init.lua

40 lines
987 B
Lua
Raw Normal View History

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-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-22 19:38:09 +01:00
awards.register_onDig(function(player,data)
if not data['count']['default'] or not data['count']['default']['mese'] then
return
end
2013-02-22 18:53:42 +01:00
2013-02-22 19:38:09 +01:00
if data['count']['default']['mese'] > 0 then
return "award_mesefind"
2013-02-22 18:53:42 +01:00
end
2013-02-22 21:38:01 +01:00
end)
2013-02-22 21:43:40 +01:00
-- First Wood Placed!
2013-02-23 10:30:50 +01:00
awards.register_achievement("award_foundations",{
2013-02-22 21:43:40 +01:00
title = "Foundations",
2013-02-23 10:30:50 +01:00
description = "Every house starts from its foundations!",
2013-02-22 21:43:40 +01:00
})
2013-02-22 21:38:01 +01:00
awards.register_onPlace(function(player,data)
2013-02-23 10:30:50 +01:00
if not data['place']['default'] or not data['place']['default']['brick'] then
2013-02-22 21:38:01 +01:00
return
end
2013-02-23 10:30:50 +01:00
if data['place']['default']['brick'] > 0 then
return "award_foundations"
2013-02-22 21:38:01 +01:00
end
2013-02-22 19:38:09 +01:00
end)