mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 15:20:32 +01:00
Add backwards compatibility
This commit is contained in:
parent
e675f86766
commit
31919e0194
|
@ -143,7 +143,7 @@ local function node_detector_make_formspec(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function node_detector_on_receive_fields(pos, fieldname, fields, sender)
|
local function node_detector_on_receive_fields(pos, fieldname, fields, sender)
|
||||||
if not fields.scanname or not fields.digiline_channel or not fields.distance then return end
|
if not fields.scanname or not fields.digiline_channel then return end
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
|
@ -152,7 +152,7 @@ local function node_detector_on_receive_fields(pos, fieldname, fields, sender)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
meta:set_string("scanname", fields.scanname)
|
meta:set_string("scanname", fields.scanname)
|
||||||
meta:set_string("distance", fields.distance)
|
meta:set_string("distance", fields.distance or "0")
|
||||||
meta:set_string("digiline_channel", fields.digiline_channel)
|
meta:set_string("digiline_channel", fields.digiline_channel)
|
||||||
node_detector_make_formspec(pos)
|
node_detector_make_formspec(pos)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user