From 606c129f5796eb56e9abd1049954cf1ca0b8f410 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 30 Mar 2017 21:51:45 +0200 Subject: Add support to display text to passengers and on the outside of the train Outside is currently displayed as infotext. TODO: signs-like draw it on the wagon FIXME: When object properties are set, for some reason the animation restarts --- advtrains/advtrains_luaautomation/atc_rail.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'advtrains/advtrains_luaautomation/atc_rail.lua') diff --git a/advtrains/advtrains_luaautomation/atc_rail.lua b/advtrains/advtrains_luaautomation/atc_rail.lua index 78ef8f0..141f119 100644 --- a/advtrains/advtrains_luaautomation/atc_rail.lua +++ b/advtrains/advtrains_luaautomation/atc_rail.lua @@ -61,6 +61,16 @@ function r.fire_event(pos, evtdata) atc_arrow = atc_arrow, atc_id = train_id, atc_speed = tvel, + atc_set_text_outside = function(text) + if not train_id then return false end + advtrains.trains[train_id].text_outside=text + return true + end, + atc_set_text_inside = function(text) + if not train_id then return false end + advtrains.trains[train_id].text_inside=text + return true + end, } atlatc.active.run_in_env(pos, evtdata, customfct) -- cgit v1.2.3