diff options
author | Wuzzy <almikes@aol.com> | 2016-08-01 17:57:37 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-01 17:57:37 +0200 |
commit | 0966a6585a7323aa4ede9c81e40cd5f4f096bce5 (patch) | |
tree | f3014362828190618b12c35adf94f1bf6cc16a1d /init.lua | |
parent | 1cd7d63b9d993b6524033ec0207a1133213d2ec3 (diff) |
Fix achievement unlock
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -704,7 +704,6 @@ if minetest.get_modpath("awards") ~= nil then description = "Read all help entries about blocks.", }) - -- TODO: Test this when the awards mod works again minetest.register_globalstep(function(dtime) -- Check awards every 30 seconds awardchecktime = awardchecktime + dtime @@ -712,9 +711,10 @@ if minetest.get_modpath("awards") ~= nil then awardchecktime = 30 - awardchecktime local players = minetest.get_connected_players() for p=1,#players do - local count = doc.get_viewed_count(players[p]:get_player_name(), "nodes") + local playername = players[p]:get_player_name() + local count = doc.get_viewed_count(playername, "nodes") if count ~= nil and count >= doc.get_entry_count("nodes") then - awards.unlock("doc_minetest_game_allnodes") + awards.unlock(playername, "doc_minetest_game_allnodes") end end end) |