From d111080b7f55cc14a4ac2ffba1ed5c85db9c1d50 Mon Sep 17 00:00:00 2001 From: Michal Cieslakiewicz Date: Mon, 15 Oct 2018 10:12:24 +0200 Subject: [PATCH] minertools: add click to window close via ESC. fields.quit is now recognized as well and causes formspec closing to emit click sound. Signed-off-by: Michal Cieslakiewicz --- minertools/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minertools/init.lua b/minertools/init.lua index 17f3649..0bad938 100644 --- a/minertools/init.lua +++ b/minertools/init.lua @@ -197,7 +197,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local tool_meta = tool:get_meta() local tool_upd = false local play_snd = true - if fields and fields.ok then + if fields and (fields.ok or fields.quit) then play_click(player_name) play_snd = false end