summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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};