aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-10-25 21:19:01 +0200
committerorwell96 <orwell@bleipb.de>2021-10-25 21:19:01 +0200
commit4e80866ca6156a9fa65e8c8539c0756ee5ae7a50 (patch)
treec1d8175e4482a203b9d2fe769c6f07686a659a9f
parent5f5d28af1b92218022eaa14f1fd801ac98c57805 (diff)
downloadadvtrains-4e80866ca6156a9fa65e8c8539c0756ee5ae7a50.tar.gz
advtrains-4e80866ca6156a9fa65e8c8539c0756ee5ae7a50.tar.bz2
advtrains-4e80866ca6156a9fa65e8c8539c0756ee5ae7a50.zip
Coupler types: Better output when there are no couplers on a wagon
-rw-r--r--advtrains/couple.lua2
-rw-r--r--advtrains/locale/advtrains.de.tr1
2 files changed, 3 insertions, 0 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua
index b812dec..c421f61 100644
--- a/advtrains/couple.lua
+++ b/advtrains/couple.lua
@@ -324,9 +324,11 @@ function advtrains.check_matching_coupler_types(t1, t1_front, t2, t2_front)
for typ,_ in pairs(t1_cplt) do
table.insert(t1_cplhr, advtrains.coupler_types[typ] or typ)
end
+ if #t1_cplhr==0 then t1_cplhr[1]=attrans("<none>") end
for typ,_ in pairs(t2_cplt) do
table.insert(t2_cplhr, advtrains.coupler_types[typ] or typ)
end
+ if #t2_cplhr==0 then t2_cplhr[1]=attrans("<none>") end
return false, attrans("Can not couple: The couplers of the trains do not match (@1 and @2).", table.concat(t1_cplhr, ","), table.concat(t2_cplhr, ","))
end
diff --git a/advtrains/locale/advtrains.de.tr b/advtrains/locale/advtrains.de.tr
index 7566aa4..6abbc12 100644
--- a/advtrains/locale/advtrains.de.tr
+++ b/advtrains/locale/advtrains.de.tr
@@ -74,3 +74,4 @@ Buffer and Chain Coupler=Schraubenkupplung
Scharfenberg Coupler=Scharfenbergkupplung
Japanese Train Inter-Wagon Connection=Waggonzwischenverbindung Japanischer Personenzug
Can not couple: The couplers of the trains do not match (@1 and @2).=Kann nicht ankuppeln: Die Kupplungen der Züge passen nicht zueinander (@1 und @2)
+<none>=<keine>