diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen/Controller/Wagenreihung.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm index 2279da3..986019b 100644 --- a/lib/DBInfoscreen/Controller/Wagenreihung.pm +++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm @@ -16,6 +16,17 @@ sub wagenreihung { train_number => $train, ); + if ( $wr->has_bad_wagons ) { + + # create fake positions as the correct ones are not available + my $pos = 0; + for my $wagon ( $wr->wagons ) { + $wagon->{position}{start_percent} = $pos; + $wagon->{position}{end_percent} = $pos + 4; + $pos += 4; + } + } + $self->render( 'wagenreihung', wr => $wr, |