aboutsummaryrefslogtreecommitdiff
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
parentbe771d9413f3ddddaa5dcb4cbad9055a580499cb (diff)
downloadadvtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.gz
advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.tar.bz2
advtrains-11d6a12ce7752c7640c3cb85e76814ebeb3f94ef.zip
Set wagon line number
-rw-r--r--advtrains/wagons.lua7
-rw-r--r--advtrains_luaautomation/atc_rail.lua4
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line1.pngbin0 -> 1203 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line10.pngbin0 -> 1224 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line2.pngbin0 -> 1230 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line3.pngbin0 -> 1230 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line4.pngbin0 -> 1226 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line5.pngbin0 -> 1231 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line6.pngbin0 -> 1227 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line7.pngbin0 -> 1226 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line8.pngbin0 -> 1233 bytes
-rw-r--r--advtrains_train_subway/textures/advtrains_subway_wagon_line9.pngbin0 -> 1235 bytes
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
new file mode 100644
index 0000000..ad596df
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line1.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png
new file mode 100644
index 0000000..c656d97
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line10.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png
new file mode 100644
index 0000000..7dbe679
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line2.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png
new file mode 100644
index 0000000..3ccb6fb
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line3.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png
new file mode 100644
index 0000000..67d7def
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line4.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png
new file mode 100644
index 0000000..1af9e9c
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line5.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png
new file mode 100644
index 0000000..e48c6ed
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line6.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png
new file mode 100644
index 0000000..8ed26e7
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line7.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png
new file mode 100644
index 0000000..4e19353
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line8.png
Binary files differ
diff --git a/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png b/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png
new file mode 100644
index 0000000..a79d7a7
--- /dev/null
+++ b/advtrains_train_subway/textures/advtrains_subway_wagon_line9.png
Binary files differ