Change field receipt handling to work properly with Minetest 0.4.8.

This commit is contained in:
Uberi
2013-12-18 14:54:46 -05:00
parent 85f2f3f742
commit e8d31c3e5a
4 changed files with 16 additions and 1 deletions

View File

@ -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"})