Infinite tools in creative mode
This commit is contained in:
parent
4bbb78a99b
commit
90b095aa54
@ -330,10 +330,12 @@ function minetest.node_dig(pos, node, digger)
|
|||||||
local drops = minetest.get_node_drops(node.name, wielded:get_name())
|
local drops = minetest.get_node_drops(node.name, wielded:get_name())
|
||||||
|
|
||||||
-- Wear out tool
|
-- Wear out tool
|
||||||
local tp = wielded:get_tool_capabilities()
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
local dp = minetest.get_dig_params(def.groups, tp)
|
local tp = wielded:get_tool_capabilities()
|
||||||
wielded:add_wear(dp.wear)
|
local dp = minetest.get_dig_params(def.groups, tp)
|
||||||
digger:set_wielded_item(wielded)
|
wielded:add_wear(dp.wear)
|
||||||
|
digger:set_wielded_item(wielded)
|
||||||
|
end
|
||||||
|
|
||||||
-- Handle drops
|
-- Handle drops
|
||||||
minetest.handle_node_drops(pos, drops, digger)
|
minetest.handle_node_drops(pos, drops, digger)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user