diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-12-21 19:47:55 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-12-21 19:47:55 +0100 |
commit | a75843f56d6e23cc9a1156dfb09b6fe6d81ff3f6 (patch) | |
tree | dbc2c7626a14a6ec3043e4956152e4e8ab8cd0ac | |
parent | 8a8fb37507d9a1922d8412e88441baaac8f0d2e3 (diff) |
wagon: +train_no, uic_id
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung.pm | 3 | ||||
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung/Wagon.pm | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm index 8f639f9..e4f1d6c 100644 --- a/lib/Travel/Status/DE/DBWagenreihung.pm +++ b/lib/Travel/Status/DE/DBWagenreihung.pm @@ -349,7 +349,8 @@ sub wagons { for my $group ( @{ $self->{data}{istformation}{allFahrzeuggruppe} } ) { for my $wagon ( @{ $group->{allFahrzeug} } ) { my $wagon_object - = Travel::Status::DE::DBWagenreihung::Wagon->new( %{$wagon} ); + = Travel::Status::DE::DBWagenreihung::Wagon->new( %{$wagon}, + train_no => $group->{verkehrlichezugnummer} ); push( @{ $self->{wagons} }, $wagon_object ); if ( not $wagon_object->{position}{valid} ) { $self->{has_bad_wagons} = 1; diff --git a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm index 3f14f14..bda654b 100644 --- a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm +++ b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm @@ -13,7 +13,7 @@ Travel::Status::DE::DBWagenreihung::Wagon->mk_ro_accessors( qw(attributes class_type has_ac has_accessibility has_bahn_comfort has_bike_storage has_bistro has_compartments has_family_area has_phone_area has_quiet_area is_dosto is_interregio is_locomotive - is_powercar number model multipurpose section type) + is_powercar number model multipurpose section train_no type uic_id) ); our %type_attributes = ( @@ -73,8 +73,10 @@ sub new { $ref->{has_bistro} = 0; $ref->{is_locomotive} = 0; $ref->{is_powercar} = 0; + $ref->{train_no} = $opt{train_no}; $ref->{number} = $opt{wagenordnungsnummer}; $ref->{model} = $opt{fahrzeugnummer}; + $ref->{uic_id} = $opt{fahrzeugnummer}; $ref->{section} = $opt{fahrzeugsektor}; $ref->{type} = $opt{fahrzeugtyp}; |