From 6a982c03be4e52001e0f9b472b05ea27d274e615 Mon Sep 17 00:00:00 2001 From: Rubenwardy Date: Fri, 22 Feb 2013 19:35:43 +0000 Subject: give achievement function --- triggers.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'triggers.lua') diff --git a/triggers.lua b/triggers.lua index 3971c21..6d458f8 100644 --- a/triggers.lua +++ b/triggers.lua @@ -49,14 +49,9 @@ minetest.register_on_dignode(function(pos, oldnode, digger) for i=1,# awards.onDig do local res=awards.onDig[i](player,data) - - if not data['unlocked'] then - data['unlocked']={} - end - if res~=nil and (not data['unlocked'][res] or data['unlocked'][res]~=res) then - data['unlocked'][res]=res - minetest.chat_send_player(playern, "Achievement Unlocked: "..res) + if res~=nil then + awards.give_achievement(playern,res) end end end -- cgit v1.2.3