mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-17 07:50:29 +01:00
Checked one more field before indexing it in infotools
This commit is contained in:
parent
7e74cf549e
commit
7de6860654
|
@ -10,7 +10,7 @@ minetest.register_craftitem("default:infotool", {
|
||||||
on_use = function(_, user, pt)
|
on_use = function(_, user, pt)
|
||||||
if pt.type ~= "node" then return end
|
if pt.type ~= "node" then return end
|
||||||
local nn = minetest.get_node(pt.under).name
|
local nn = minetest.get_node(pt.under).name
|
||||||
if minetest.registered_items[nn] == nil or type(minetest.registered_items[nn].tiles[1]) ~= "string" then return end
|
if minetest.registered_items[nn] == nil or minetest.registerred_items[nn].tiles == nil or type(minetest.registered_items[nn].tiles[1]) ~= "string" then return end
|
||||||
local def = minetest.registered_nodes[nn]
|
local def = minetest.registered_nodes[nn]
|
||||||
if not def then return end
|
if not def then return end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user