Fixed bug with bare hand

master
Ilya Zhuravlev 2012-01-19 01:03:40 +04:00
parent 2014724660
commit f4b5ac4552
1 changed files with 6 additions and 1 deletions

View File

@ -42,7 +42,12 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
end
local tools = item.tools
local good_tool = false
local player_tool = digger:get_wielded_item().name
local player_tool = digger:get_wielded_item()
if player_tool == nil then
player_tool = ""
else
player_tool = player_tool.name
end
if tools ~= nil then
for _, tool in ipairs(tools) do
if tool:sub(1, 1) == '~' then