summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubenwardy <anjayward@gmail.com>2013-02-22 19:14:31 +0000
committerRubenwardy <anjayward@gmail.com>2013-02-22 19:14:31 +0000
commitd2ba1d7c0f7fc2b57b52f52970d94f3677daaab8 (patch)
tree6e4f5c963478ac8ffbfa1874855ff3a5797c5356
parent369b4d147575a1525ba81dd691394dad08ea34d6 (diff)
list awards command
-rw-r--r--init.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index f6cddfe..3af1ca4 100644
--- a/init.lua
+++ b/init.lua
@@ -25,6 +25,20 @@ function awards.register_onDig(func)
table.insert(awards.onDig,func);
end
+-- List a player's achievements
+minetest.register_chatcommand("list_awards", {
+ params = "",
+ description = "list_awards: list your awards",
+ func = function(name, param)
+ minetest.chat_send_player(name, "Your awards:");
+
+ for i=1,# player_data[name]['unlocked'] do
+ print(player_data[name]['unlocked'][i])
+ minetest.chat_send_player(name, ">> "..player_data[name]['unlocked'][i]);
+ end
+ end,
+})
+
-- Example Achievements
awards.register_achievement("award_mesefind",{