From 11d6a12ce7752c7640c3cb85e76814ebeb3f94ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Mon, 23 Oct 2017 13:33:27 +0200 Subject: Set wagon line number --- advtrains/wagons.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'advtrains') diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 567b560..715f501 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -291,6 +291,13 @@ function wagon:on_step(dtime) local gp=self:train() local fct=self.wagon_flipped and -1 or 1 + --set line number + if self.name == "advtrains:subway_wagon" and gp.line then + self.object:set_properties({ + textures={"advtrains_subway_wagon.png^advtrains_subway_wagon_line"..gp.line..".png"}, + visual_size = text_scale, + }) + end --door animation if self.doors then if (self.door_anim_timer or 0)<=0 then -- cgit v1.2.3