mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-01-27 08:40:16 +01:00
Type check the port
This commit is contained in:
parent
96086f6627
commit
4f2e9fd4f6
@ -729,7 +729,7 @@ mesecon.queue:add_function("lc_digiline_relay", function (pos, channel, luac_id,
|
|||||||
if (minetest.get_meta(pos):get_int("luac_id") ~= luac_id) then return end
|
if (minetest.get_meta(pos):get_int("luac_id") ~= luac_id) then return end
|
||||||
if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then return end
|
if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then return end
|
||||||
-- The actual work
|
-- The actual work
|
||||||
local send_rules = (port and digiline_port_rules[string.lower(port)]) or digilines.rules.default
|
local send_rules = (port and type(port) == 'string' and digiline_port_rules[string.lower(port)]) or digilines.rules.default
|
||||||
digiline:receptor_send(pos, send_rules, channel, msg)
|
digiline:receptor_send(pos, send_rules, channel, msg)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user