aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authorGabriel PĂ©rez-Cerezo <gabriel@gpcf.eu>2017-10-23 13:33:27 +0200
committerorwell96 <mono96.mml@gmail.com>2017-10-23 13:40:20 +0200
commit11d6a12ce7752c7640c3cb85e76814ebeb3f94ef (patch)
treed10962792b5597bf8a2b39d912beda4255c591fc /advtrains/wagons.lua
parentbe771d9413f3ddddaa5dcb4cbad9055a580499cb (diff)
downloadadvtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.gz
advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.bz2
advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.zip
Set wagon line number
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua7
1 files changed, 7 insertions, 0 deletions
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