mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-26 09:13:55 +01:00
Fix bug with getting player data, and release 2.1.1
This commit is contained in:
parent
48ae012210
commit
c79f13a4a3
2
mod.conf
2
mod.conf
@ -4,4 +4,4 @@ author = rubenwardy
|
||||
description = Adds achievements to Minetest, and an API to register new ones.
|
||||
license = LGPL 2.1 or later
|
||||
forum = https://forum.minetest.net/viewtopic.php?t=4870
|
||||
version = 2.1
|
||||
version = 2.1.1
|
||||
|
@ -78,7 +78,8 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
if not digger or not pos or not oldnode then
|
||||
return
|
||||
end
|
||||
local data = awards.players[playern]
|
||||
|
||||
local data = awards.players[digger:get_player_name()]
|
||||
if not awards.increment_item_counter(data, "count", oldnode.name) then
|
||||
return
|
||||
end
|
||||
@ -100,7 +101,7 @@ minetest.register_on_placenode(function(pos, node, digger)
|
||||
if not digger or not pos or not node or not digger:get_player_name() or digger:get_player_name()=="" then
|
||||
return
|
||||
end
|
||||
local data = awards.players[playern]
|
||||
local data = awards.players[digger:get_player_name()]
|
||||
if not awards.increment_item_counter(data, "place", node.name) then
|
||||
return
|
||||
end
|
||||
@ -124,7 +125,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
|
||||
return
|
||||
end
|
||||
|
||||
local data = awards.players[playern]
|
||||
local data = awards.players[player:get_player_name()]
|
||||
if not awards.increment_item_counter(data, "craft", itemstack:get_name()) then
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user