summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-25 16:14:01 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-25 16:14:01 +0100
commit481d3f9c20b7d4239b3b09499bec2c63e31bae93 (patch)
tree363ff13b6e05222d6b825b5bc3ff26b92905c763 /bin
parentacaf6fec0ea994e2901ebffbdd4bd3f5b46c77d6 (diff)
Add train classes
Diffstat (limited to 'bin')
-rw-r--r--bin/dbwagenreihung10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/dbwagenreihung b/bin/dbwagenreihung
index 0c5b2fe..1d842fa 100644
--- a/bin/dbwagenreihung
+++ b/bin/dbwagenreihung
@@ -27,10 +27,16 @@ if (@trains != 1) {
my $wr = Travel::Status::DE::DBWagenreihung->new(
departure => $trains[0]->sched_departure,
- developer_mode => 1,
train_number => $train_number,
);
for my $wagon ($wr->wagons) {
- printf("%s %s\n", $wagon->number, $wagon->section);
+ printf("%s %2s", $wagon->section, $wagon->number || 'X');
+ if ($wagon->class_type == 12) {
+ print(" 1/2");
+ }
+ elsif ($wagon->class_type) {
+ printf(" %d", $wagon->class_type);
+ }
+ print("\n");
}