diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-19 11:26:22 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-19 11:26:22 +0200 |
commit | 596f6deb1adef4200ddb3df4f02e6e98525a33a6 (patch) | |
tree | 51d1867ff00857feb5b9511d777b6c97b63bca4f /lib/DBInfoscreen/Controller | |
parent | ec5737ed4121ebd23c2a8667822fe557109f9b86 (diff) |
show wagon order even if exact positions on platform are unknown2.0.4
Diffstat (limited to 'lib/DBInfoscreen/Controller')
-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, |