screwdriver bugfix

This commit is contained in:
Joachim Stolberg 2020-01-06 13:57:27 +01:00
parent adb1b266f1
commit b3bd38f6ff
2 changed files with 5 additions and 1 deletions

@ -29,7 +29,7 @@ Some technical aspects:
default
# License
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2018-2020 Joachim Stolberg
Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
Sound is taken from Hybrid Dog (TreeCapitator)
@ -39,4 +39,5 @@ v0.2 - 08/Apr/2018 - Priv 'lumberjack' added, digging of trees from the top only
v0.3 - 09/Apr/2018 - Harvesting points for placing saplings and destroying tree blocks added to reach lumberjack privs
v0.4 - 16/Apr/2018 - Stem steps added
v0.5 - 17/Apr/2018 - protection bug fixed, further improvements
v0.6 -07/Jan/2020 - screwdriver bugfix

@ -35,6 +35,9 @@ local lTrees = {} -- List of registered tree items
local function chopper_tool(digger)
if digger and digger:is_player() then
local tool = digger:get_wielded_item()
if tool:get_name() == "screwdriver:screwdriver" then
return true
end
if tool then
local caps = tool:get_tool_capabilities()
return caps.groupcaps and caps.groupcaps.choppy