From d1c1863f51802f564b84e068e3c5752482a42684 Mon Sep 17 00:00:00 2001 From: Olivier Samyn Date: Sat, 28 Nov 2015 00:16:20 +0100 Subject: [PATCH] Report the number of missing extensions --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index e4c1176..8cb07d6 100644 --- a/init.lua +++ b/init.lua @@ -147,6 +147,9 @@ local function extender_place(placepos, placer, itemstack, pointed_thing) if dist <= C.beacon_range + extended then -- upgrade :-) minetest.swap_node(pos, { name = "telemosaic:beacon" }) + else + local count = math.ceil(dist - (C.beacon_range + extended)) + minetest.chat_send_player(placer:get_player_name(), "You still need to add extensions for "..count.." nodes" ) end end end