mirror of
https://bitbucket.org/kingarthursteam/cannons.git
synced 2025-01-10 13:27:29 +01:00
fix crash during incorrect call of on_dig
without 2nd 3rd argument
This commit is contained in:
parent
cfb60f04ef
commit
b84ed21fac
@ -177,6 +177,12 @@ cannons.stand_on_rightclick = function(pos, node, player, itemstack, pointed_thi
|
|||||||
end
|
end
|
||||||
|
|
||||||
cannons.dug = function(pos, node, digger)
|
cannons.dug = function(pos, node, digger)
|
||||||
|
if not node or not type(node)=="table" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not digger or not digger:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
local cannons = minetest.registered_nodes[node.name].cannons
|
local cannons = minetest.registered_nodes[node.name].cannons
|
||||||
if cannons and cannons.stand and cannons.cannon then --node dug
|
if cannons and cannons.stand and cannons.cannon then --node dug
|
||||||
node.name = cannons.stand
|
node.name = cannons.stand
|
||||||
|
Loading…
Reference in New Issue
Block a user