Merge pull request #6 from wsor4035/main

fix mod crash and luacheck warnings
This commit is contained in:
minefaco 2020-11-06 19:30:32 -05:00 committed by GitHub
commit a6b1b9488d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,11 +63,13 @@ for _, axe_name in ipairs(axe_types) do
local old_node = minetest.get_node(pos)
minetest.swap_node(pos, {name = "default:stripped_"..n, param2 = old_node.param2})
itemstack:add_wear(65535 / 299) -- 300 uses
return itemstack
--if not minetest.check_player_privs(user, {creative=true}) then --(It works, but i think that this is not the better way for some reason)
--(It works, but i think that this is not the better way for some reason)
--if not minetest.check_player_privs(user, {creative=true}) then
local inv = user:get_inventory()
inv:add_item("main", {name="default:tree_bark"})
--end
return itemstack
end
end