From 20169eb86af4390d140b12d5cc5030f042c2dc01 Mon Sep 17 00:00:00 2001 From: jp Date: Thu, 13 Aug 2015 22:02:26 +0200 Subject: [PATCH] Specify the mailbox's owner in the insert formspec --- mailbox.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailbox.lua b/mailbox.lua index 9dd3040..f6473b4 100644 --- a/mailbox.lua +++ b/mailbox.lua @@ -26,7 +26,7 @@ xdecor.register("mailbox", { minetest.show_formspec(player, "default:chest_locked", xdecor.get_mailbox_formspec(pos)) else minetest.show_formspec(player, "default:chest_locked", - xdecor.get_mailbox_insert_formspec(pos)) + xdecor.get_mailbox_insert_formspec(pos, owner)) end end, can_dig = function(pos, player) @@ -67,11 +67,11 @@ function xdecor.get_mailbox_formspec(pos) return formspec end -function xdecor.get_mailbox_insert_formspec(pos) +function xdecor.get_mailbox_insert_formspec(pos, owner) local spos = pos.x..","..pos.y..","..pos.z local formspec = "size[8,5]"..xdecor.fancy_gui.. - "label[0,0;Send your goods...]".. + "label[0.5,0;Send your goods\nto "..owner.." :]".. "list[nodemeta:"..spos..";drop;3.5,0;1,1;]".. "list[current_player;main;0,1.25;8,4;]" return formspec