From fdb67779d4c87aa3e99402f66f63047becdaa18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Fri, 26 Jan 2018 14:54:58 +0100 Subject: Added screenshot and allow signs to be rotated by screwdriver --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 88148de..368c445 100644 --- a/init.lua +++ b/init.lua @@ -83,7 +83,7 @@ local function get_formspec(pos,player) "label[2.5,0;Real estate for sale]" .. "label[0.5,0.5;Your account balance: $".. atm.balance[player:get_player_name()].. "]" .. "label[0.5,1.5;Area Number: "..id.."]" .. - "label[0.5,2;Area Name: "..areas.areas[id].name.."]" .. + "label[0.5,2;Area Name: "..minetest.formspec_escape(areas.areas[id].name).."]" .. "label[0.5,2.5;Area Price: "..price.."]" .. "label[0.5,3;Surface Area: "..realestate.area(id).." m²]" .. "button_exit[0.2,5;1,1;Quit;Quit]" .. @@ -93,8 +93,10 @@ local function get_formspec(pos,player) end, formspec) end realestate.transfer = function (transfer) + -- callback called from atm mod after transfer arrives. areas.areas[transfer.id].owner = transfer.from minetest.set_node(transfer.pos,{name="air"}) + minetest.chat_send_player(transfer.from,"The area has been transfered to you") end minetest.register_on_player_receive_fields(function(player, form, pressed) if form == "realestate.sell" then @@ -167,6 +169,7 @@ minetest.register_node("realestate:sign", { } }, after_place_node=after_place_node, + paramtype2="facedir", groups = {snappy = 3}, on_rightclick = function(pos, node, player, itemstack, pointed_thing) get_formspec(pos,player) -- cgit v1.2.3