Commit a75843f5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

wagon: +train_no, uic_id

parent 8a8fb375
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
+3 −1
Original line number Diff line number Diff line
@@ -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};