forked from Mirrorlandia_minetest/digistuff
Fix crash when clicking air with a card
This commit is contained in:
parent
3c7e4a4f82
commit
d9fd360882
@ -19,6 +19,7 @@ minetest.register_craftitem("digistuff:card",{
|
|||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
on_use = function(stack,_,pointed)
|
on_use = function(stack,_,pointed)
|
||||||
local pos = pointed.under
|
local pos = pointed.under
|
||||||
|
if not pos then return end
|
||||||
if minetest.get_node(pos).name ~= "digistuff:card_reader" then return end
|
if minetest.get_node(pos).name ~= "digistuff:card_reader" then return end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local channel = meta:get_string("channel")
|
local channel = meta:get_string("channel")
|
||||||
|
Loading…
Reference in New Issue
Block a user