Report the number of missing extensions

This commit is contained in:
Olivier Samyn 2015-11-28 00:16:20 +01:00
parent b5e429b6ab
commit d1c1863f51

View File

@ -147,6 +147,9 @@ local function extender_place(placepos, placer, itemstack, pointed_thing)
if dist <= C.beacon_range + extended then if dist <= C.beacon_range + extended then
-- upgrade :-) -- upgrade :-)
minetest.swap_node(pos, { name = "telemosaic:beacon" }) 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 end
end end