aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-11-22 17:15:22 +0100
committerZeno- <kde.psych@gmail.com>2016-11-23 02:15:22 +1000
commit0d1c9598a0d2a4f21dc57de32efca2dc52b6b146 (patch)
treeea7280a8407472128ae90e1e4bb5ed3155392b19 /builtin
parentdbeb322f62bfdd431365622a6f5ddfae062c0d31 (diff)
downloadminetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.tar.gz
minetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.tar.bz2
minetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.zip
Make supplying empty formspec strings close the formspec (#4737)
This will only happen if the formname matches or if formname is "".
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/misc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua
index 1333a75ba..040016333 100644
--- a/builtin/game/misc.lua
+++ b/builtin/game/misc.lua
@@ -239,3 +239,7 @@ else
end
+function core.close_formspec(player_name, formname)
+ return minetest.show_formspec(player_name, formname, "")
+end
+