diff --git a/init.lua b/init.lua index 99bbb59..15135b4 100644 --- a/init.lua +++ b/init.lua @@ -21,9 +21,10 @@ along with this program. If not, see . --]] --- Version 1.15 +-- Version 1.16 -- Changelog: +-- 17.12.2013 * aborting input with ESC is possible again -- 01.09.2013 * fixed bug in input sanitization -- 31.08.2013 * changed receipe for key to avoid crafting conflickt with screwdriver -- 10.07.2013 * removed a potential bug (now uses string:gmatch) @@ -287,6 +288,7 @@ function locks:lock_handle_input( pos, formname, fields, player ) -- is this input the lock is supposed to handle? if( not( fields.locks_sent_lock_command ) + or (fields.quit and fields.quit==true) -- or not( fields.locks_sent_input ) or fields.locks_sent_lock_command == "" ) then return; diff --git a/shared_locked_sign_wall.lua b/shared_locked_sign_wall.lua index 1b87616..5329d30 100644 --- a/shared_locked_sign_wall.lua +++ b/shared_locked_sign_wall.lua @@ -1,4 +1,6 @@ +-- allow aborting with ESC in newer Versions of MT again + -- a sign minetest.register_node("locks:shared_locked_sign_wall", { description = "Shared locked sign", @@ -40,6 +42,11 @@ minetest.register_node("locks:shared_locked_sign_wall", { end, on_receive_fields = function(pos, formname, fields, sender) + + -- abort if no input has been sent + if( fields.quit ) then + return; + end -- if the user already has the right to use this and did input text if( fields.text