forked from minetest-mods/MoreMesecons
Luacontroller tool: crashfix
The crash happened when the player uses the luacontroller tool without pointing any node.
This commit is contained in:
parent
03ae5c0ac0
commit
d35966f082
@ -142,6 +142,9 @@ end
|
|||||||
|
|
||||||
-- tests if the node is a luacontroller
|
-- tests if the node is a luacontroller
|
||||||
local function is_luacontroller(pos)
|
local function is_luacontroller(pos)
|
||||||
|
if not pos then
|
||||||
|
return false
|
||||||
|
end
|
||||||
return string.match(minetest.get_node(pos).name, "mesecons_luacontroller:luacontroller%d%d%d%d")
|
return string.match(minetest.get_node(pos).name, "mesecons_luacontroller:luacontroller%d%d%d%d")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user