diff options
author | Gabriel PĂ©rez-Cerezo <gabriel@gpcf.eu> | 2017-10-23 13:33:27 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-10-23 13:40:20 +0200 |
commit | 11d6a12ce7752c7640c3cb85e76814ebeb3f94ef (patch) | |
tree | d10962792b5597bf8a2b39d912beda4255c591fc | |
parent | be771d9413f3ddddaa5dcb4cbad9055a580499cb (diff) | |
download | advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.gz advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.bz2 advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.zip |
Set wagon line number
12 files changed, 11 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
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index 3ec82c8..1fae28d 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -58,6 +58,10 @@ function r.fire_event(pos, evtdata) train.atc_arrow=atc_arrow return true end, + set_line = function(line) + train.line = line + return true + end, atc_reset = function(cmd) if not train_id then return false end assertt(cmd, "string") diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line1.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line1.png Binary files differnew file mode 100644 index 0000000..ad596df --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line1.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png Binary files differnew file mode 100644 index 0000000..c656d97 --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png Binary files differnew file mode 100644 index 0000000..7dbe679 --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png Binary files differnew file mode 100644 index 0000000..3ccb6fb --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png Binary files differnew file mode 100644 index 0000000..67d7def --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png Binary files differnew file mode 100644 index 0000000..1af9e9c --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png Binary files differnew file mode 100644 index 0000000..e48c6ed --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png Binary files differnew file mode 100644 index 0000000..8ed26e7 --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png Binary files differnew file mode 100644 index 0000000..4e19353 --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png Binary files differnew file mode 100644 index 0000000..a79d7a7 --- /dev/null +++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png |