From e8d31c3e5a425e031ce9f2c8b60ccdeaf79f2f79 Mon Sep 17 00:00:00 2001 From: Uberi Date: Wed, 18 Dec 2013 14:54:46 -0500 Subject: Change field receipt handling to work properly with Minetest 0.4.8. --- mesecons_detector/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mesecons_detector/init.lua') diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua index 2600597..7bb516b 100644 --- a/mesecons_detector/init.lua +++ b/mesecons_detector/init.lua @@ -9,7 +9,10 @@ local object_detector_make_formspec = function (pos) "field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]") end -local object_detector_on_receive_fields = function (pos, formname, fields) +local object_detector_on_receive_fields = function(pos, formname, fields) + if fields.quit then + return + end local meta = minetest.get_meta(pos) meta:set_string("scanname", fields.scanname) meta:set_string("digiline_channel", fields.digiline_channel) -- cgit v1.2.3