summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-19 11:26:22 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-19 11:26:22 +0200
commit596f6deb1adef4200ddb3df4f02e6e98525a33a6 (patch)
tree51d1867ff00857feb5b9511d777b6c97b63bca4f /lib/DBInfoscreen
parentec5737ed4121ebd23c2a8667822fe557109f9b86 (diff)
show wagon order even if exact positions on platform are unknown2.0.4
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Wagenreihung.pm11
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,