From 481d3f9c20b7d4239b3b09499bec2c63e31bae93 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 25 Nov 2018 16:14:01 +0100 Subject: Add train classes --- bin/dbwagenreihung | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin/dbwagenreihung') 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"); } -- cgit v1.2.3