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!
|
|
|
|
awards.register_achievement("award_woodplace",{
|
|
|
|
title = "Foundations",
|
|
|
|
description = "First Wood Placed!",
|
|
|
|
})
|
|
|
|
|
2013-02-22 21:38:01 +01:00
|
|
|
awards.register_onPlace(function(player,data)
|
2013-02-22 21:45:24 +01:00
|
|
|
if not data['place']['default'] or not data['place']['default']['wood'] then
|
2013-02-22 21:38:01 +01:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2013-02-22 21:43:40 +01:00
|
|
|
if data['place']['default']['wood'] > 0 then
|
|
|
|
return "award_woodplace"
|
2013-02-22 21:38:01 +01:00
|
|
|
end
|
2013-02-22 19:38:09 +01:00
|
|
|
end)
|