summaryrefslogtreecommitdiff
path: root/advtrains_train_subway/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-02-05 10:32:08 +0100
committerorwell96 <orwell@bleipb.de>2019-02-05 10:32:08 +0100
commit223d2e1a5f746c452a4214127655c0f03226c79a (patch)
treeeeec767314e9bb04c744c16d56c8c7d31c0707a3 /advtrains_train_subway/init.lua
parent8d098205179db4d5b2111e6a823831ba44db1464 (diff)
downloadbasic_trains-223d2e1a5f746c452a4214127655c0f03226c79a.tar.gz
basic_trains-223d2e1a5f746c452a4214127655c0f03226c79a.tar.bz2
basic_trains-223d2e1a5f746c452a4214127655c0f03226c79a.zip
Add "X" line symbol for subway trains terminating/service trips
Diffstat (limited to 'advtrains_train_subway/init.lua')
-rw-r--r--advtrains_train_subway/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_train_subway/init.lua b/advtrains_train_subway/init.lua
index a63b5b5..864fa2f 100644
--- a/advtrains_train_subway/init.lua
+++ b/advtrains_train_subway/init.lua
@@ -105,7 +105,9 @@ advtrains.register_wagon("subway_wagon", {
--set line number
local line = nil
if train.line then
- line = tonumber(string.sub(train.line, 1, 1))
+ local lint = string.sub(train.line, 1, 1)
+ line = tonumber(lint)
+ if lint=="X" then line="X" end
end
if line and line~=self.line_cache then
local new_line_tex="advtrains_subway_wagon.png^advtrains_subway_wagon_line"..line..".png"