From cd95fc79771124a8c0e6bbd9cbabce3650fc75da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sun, 23 Oct 2016 16:57:22 +0200 Subject: Sets the right formspec when renting automatically --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 8b14c30..15050c5 100644 --- a/init.lua +++ b/init.lua @@ -944,6 +944,8 @@ minetest.register_on_newplayer(function(player) if (v.owner == '' and v.category == 'apartment') then if (apartment.rent( v.pos, player:get_player_name(), nil, player )) then player:moveto( v.pos, false); + local meta = minetest.get_meta( v.pos ); + meta:set_string( 'formspec', apartment.get_formspec( pos, player )); minetest.chat_send_player(player:get_player_name(),"Welcome to your new apartment. You can return here by saying '/aphome'") break end -- cgit v1.2.3