mirror of
https://github.com/minetest-mods/digilines.git
synced 2024-11-16 15:20:23 +01:00
Add a missing check for unknown nodes
This commit is contained in:
parent
1c4db4d675
commit
101a9bbbbe
|
@ -42,10 +42,12 @@ function digiline:update_autoconnect(pos, secondcall)
|
||||||
digiline:update_autoconnect(zmympos, true)
|
digiline:update_autoconnect(zmympos, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local digilinespec = minetest.registered_nodes[minetest.get_node(pos).name].digiline
|
local def = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||||
if not digilinespec then return nil end
|
local digilinespec = def and def.digiline
|
||||||
if not digilinespec.wire then return nil end
|
if not (digilinespec and digilinespec.wire and
|
||||||
if not digilinespec.wire.use_autoconnect then return nil end
|
digilinespec.wire.use_autoconnect) then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local zmg = digiline:rules_link_anydir(pos, zmpos)
|
local zmg = digiline:rules_link_anydir(pos, zmpos)
|
||||||
local zmymg = digiline:rules_link_anydir(pos, zmympos)
|
local zmymg = digiline:rules_link_anydir(pos, zmympos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user