summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-12-26 19:22:31 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-12-26 19:22:31 +0100
commitf021c6b2a22d414edb9d34f1b388367ac3094645 (patch)
treecee6fe8dab40ca2d60367f82667eeffac2b0190a
parent6c55049dd4506a28a289abce679ef9451c8698bf (diff)
distinguish between ICE 3 403 series 1/2 and ICE T 411 series 1/2
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm28
1 files changed, 21 insertions, 7 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index dad137d..bcf5c85 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -311,10 +311,13 @@ sub train_subtype {
my %ml = (
'ICE 1' => 0,
'ICE 2' => 0,
- 'ICE 3' => 0,
+ 'ICE 3 403.1' => 0,
+ 'ICE 3 403.2' => 0,
+ 'ICE 3 406' => 0,
'ICE 3 Velaro' => 0,
'ICE 4' => 0,
- 'ICE T 411' => 0,
+ 'ICE T 411.1' => 0,
+ 'ICE T 411.2' => 0,
'ICE T 415' => 0,
'IC2 Twindexx' => 0,
'IC2 KISS' => 0,
@@ -337,8 +340,15 @@ sub train_subtype {
{
$ml{'ICE 2'}++;
}
- elsif ( $wagon->model == 403 or $wagon->model == 406 ) {
- $ml{'ICE 3'}++;
+ elsif ( $wagon->model == 403 and substr( $wagon->uic_id, 9, 2 ) <= 37 )
+ {
+ $ml{'ICE 3 403.1'}++;
+ }
+ elsif ( $wagon->model == 403 and substr( $wagon->uic_id, 9, 2 ) > 37 ) {
+ $ml{'ICE 3 403.2'}++;
+ }
+ elsif ( $wagon->model == 406 ) {
+ $ml{'ICE 3 406'}++;
}
elsif ( $wagon->model == 407 ) {
$ml{'ICE 3 Velaro'}++;
@@ -346,8 +356,12 @@ sub train_subtype {
elsif ( $wagon->model == 412 or $wagon->model == 812 ) {
$ml{'ICE 4'}++;
}
- elsif ( $wagon->model == 411 ) {
- $ml{'ICE T 411'}++;
+ elsif ( $wagon->model == 411 and substr( $wagon->uic_id, 9, 2 ) <= 32 )
+ {
+ $ml{'ICE T 411.1'}++;
+ }
+ elsif ( $wagon->model == 411 and substr( $wagon->uic_id, 9, 2 ) > 32 ) {
+ $ml{'ICE T 411.2'}++;
}
elsif ( $wagon->model == 415 ) {
$ml{'ICE T 415'}++;
@@ -373,7 +387,7 @@ sub train_subtype {
$self->{train_subtype} = $likelihood[0];
- if ( $self->{train_subtype} eq 'ICE 3' and $with_restaurant ) {
+ if ( $self->{train_subtype} =~ m{ICE 3 4} and $with_restaurant ) {
$self->{train_subtype} = 'ICE 3 Redesign';
}
return $self->{train_subtype};