aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 5a2fffb..87fb7e7 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -11,6 +11,8 @@ advtrains.wagons = {}
advtrains.wagon_prototypes = {}
advtrains.wagon_objects = {}
+local setting_show_ids = minetest.settings:get_bool("advtrains_show_ids")
+
--
function advtrains.create_wagon(wtype, owner)
local new_id=advtrains.random_id()
@@ -285,6 +287,9 @@ function wagon:on_step(dtime)
--check infotext
local outside=self:train().text_outside or ""
+ if setting_show_ids then
+ outside = outside .. "\nT:" .. data.train_id .. " W:" .. self.id
+ end
local train=self:train()
--show off-track information in outside text instead of notifying the whole server about this