diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-06 18:03:32 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-03-06 18:03:32 +0100 |
commit | cbe7bc257ac2eb70fa6dc0d6f002abddb56c1feb (patch) | |
tree | 83f1f407b05bd18bd7c0a4be193fb5ad4beec89a /lib/Travel/Status/DE/DBWagenreihung.pm | |
parent | 74bec419b8b09cc6bf9b79a27525283f794bed63 (diff) |
Wagon: add group_index accessor
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm')
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm index 1accece..6f9440c 100644 --- a/lib/Travel/Status/DE/DBWagenreihung.pm +++ b/lib/Travel/Status/DE/DBWagenreihung.pm @@ -694,11 +694,12 @@ sub wagons { } @{ $self->{wagons} }; } - for my $group (@wagon_groups) { - my $tt = $self->wagongroup_subtype( @{$group} ); + for my $i ( 0 .. $#wagon_groups ) { + my $group = $wagon_groups[$i]; + my $tt = $self->wagongroup_subtype( @{$group} ); if ($tt) { for my $wagon ( @{$group} ) { - $wagon->set_traintype($tt); + $wagon->set_traintype( $i, $tt ); } } } |