summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesecons_commandblock/init.lua3
-rw-r--r--mesecons_detector/init.lua5
-rw-r--r--mesecons_luacontroller/init.lua6
-rw-r--r--mesecons_microcontroller/init.lua3
4 files changed, 16 insertions, 1 deletions
diff --git a/mesecons_commandblock/init.lua b/mesecons_commandblock/init.lua
index dc29f4e..af7034d 100644
--- a/mesecons_commandblock/init.lua
+++ b/mesecons_commandblock/init.lua
@@ -92,6 +92,9 @@ local after_place = function(pos, placer)
end
local receive_fields = function(pos, formname, fields, sender)
+ if fields.quit then
+ return
+ end
local meta = minetest.get_meta(pos)
if fields.nearest then
initialize_data(meta, "@nearest", fields.command, fields.param)
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)
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 1b36574..acbf023 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -488,6 +488,9 @@ minetest.register_node(nodename, {
node_box = nodebox,
on_construct = reset_meta,
on_receive_fields = function(pos, formname, fields)
+ if fields.quit then
+ return
+ end
reset(pos)
reset_meta(pos, fields.code)
local err = lc_update(pos, {type="program"})
@@ -531,6 +534,9 @@ minetest.register_node(BASENAME .. "_burnt", {
node_box = nodebox,
on_construct = reset_meta,
on_receive_fields = function(pos, formname, fields)
+ if fields.quit then
+ return
+ end
reset(pos)
reset_meta(pos, fields.code)
local err = lc_update(pos, {type="program"})
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index 249afd3..55faa5c 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -98,6 +98,9 @@ minetest.register_node(nodename, {
meta:set_string("eeprom", r)
end,
on_receive_fields = function(pos, formanme, fields, sender)
+ if fields.quit then
+ return
+ end
local meta = minetest.get_meta(pos)
if fields.band then
fields.code = "sbi(C, A&B) :A and B are inputs, C is output"