summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-23 18:46:25 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-23 18:46:25 +0200
commit590b27f2ca5573828f362b034a8182b79114391e (patch)
treea5b7f9d6411c1fb16e3aa3c491543c7d836c94f1 /lib
parent16c441e4333c205235a3e13fd914b087a1ad6a66 (diff)
also show exit direction for regional trains at select stations
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index d6a4899..afeb880 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -2259,9 +2259,15 @@ sub startup {
my @route = @{ $in_transit->{route} // [] };
my @route_after;
+ my $stop_before_dest;
my $is_after = 0;
for my $station (@route) {
+ if ( $in_transit->{arr_name}
+ and $station->[0] eq $in_transit->{arr_name} )
+ {
+ $stop_before_dest = $route_after[-1][0];
+ }
if ($is_after) {
push( @route_after, $station );
}
@@ -2376,6 +2382,14 @@ sub startup {
if ( $platform_info->{kopfgleis} ) {
$ret->{arr_direction} = $platform_info->{direction};
}
+ elsif ( $stop_before_dest
+ and exists $platform_info->{direction_from}
+ {$stop_before_dest} )
+ {
+ $ret->{arr_direction}
+ = $platform_info->{direction_from}
+ {$stop_before_dest};
+ }
elsif ( $in_transit->{data}{wagonorder_arr} ) {
my $wr;
eval {