From 1e50644487cf8143690ca3af61d9e0a5f79a8e95 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 29 Jan 2015 19:04:20 +0100 Subject: add infotexts to the teleportation tube this should also debunk the myth of some players, that they are the only ones seeing the channel --- teleport_tube.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/teleport_tube.lua b/teleport_tube.lua index 1118f97..a8d9edb 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -153,6 +153,7 @@ pipeworks.register_tube("pipeworks:teleport_tube","Teleporting Pneumatic Tube Se on_construct = function(pos) local meta = minetest.get_meta(pos) update_meta(meta, true) + meta:set_string("infotext", "unconfigured Teleportation Tube") end, on_receive_fields = function(pos,formname,fields,sender) if not fields.channel then @@ -206,9 +207,12 @@ pipeworks.register_tube("pipeworks:teleport_tube","Teleporting Pneumatic Tube Se if dirty then if channel ~= "" then set_tube(pos, channel, can_receive) + local cr_description = (can_receive == 1) and "sending and receiving" or "sending" + meta:set_string("infotext", string.format("Teleportation Tube %s on '%s'", cr_description, channel)) else -- remove empty channel tubes, to not have to search through them remove_tube(pos) + meta:set_string("infotext", "unconfigured Teleportation Tube") end end end, -- cgit v1.2.3