mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-12 11:00:25 +01:00
Added security in invtweak in case node breakers dig nodes
This commit is contained in:
parent
4b2944e11b
commit
eafe217291
@ -272,7 +272,7 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
|||||||
local new = item:get_wear()
|
local new = item:get_wear()
|
||||||
|
|
||||||
if old ~= new then
|
if old ~= new then
|
||||||
if old > 0 and new == 0 then
|
if old and old > 0 and new == 0 then
|
||||||
wielded.wear[name] = new
|
wielded.wear[name] = new
|
||||||
minetest.sound_play("invtweak_tool_break", {
|
minetest.sound_play("invtweak_tool_break", {
|
||||||
pos = digger:getpos(),
|
pos = digger:getpos(),
|
||||||
|
Loading…
Reference in New Issue
Block a user