fixed bug with newer MT: aborting input with ESC works again

This commit is contained in:
Sokomine 2013-12-17 03:08:09 +01:00
parent f050587a11
commit 1c4a406a93
2 changed files with 10 additions and 1 deletions

View File

@ -21,9 +21,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
--]]
-- 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;

View File

@ -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