summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/HAFAS
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/HAFAS')
-rw-r--r--lib/Travel/Status/DE/HAFAS/Journey.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm
index 1c0962f..750d1e8 100644
--- a/lib/Travel/Status/DE/HAFAS/Journey.pm
+++ b/lib/Travel/Status/DE/HAFAS/Journey.pm
@@ -28,6 +28,7 @@ sub new {
my @prodL = @{ $opt{common}{prodL} // [] };
my @opL = @{ $opt{common}{opL} // [] };
my @icoL = @{ $opt{common}{icoL} // [] };
+ my @tcocL = @{ $opt{common}{tcocL} // [] };
my @remL = @{ $opt{common}{remL} // [] };
my @himL = @{ $opt{common}{himL} // [] };
@@ -120,6 +121,12 @@ sub new {
? ( $rt_dep->epoch - $sched_dep->epoch ) / 60
: undef;
+ my $tco = {};
+ for my $tco_id ( @{ $stop->{dTrnCmpSX}{tcocX} // [] } ) {
+ my $tco_kv = $tcocL[$tco_id];
+ $tco->{ $tco_kv->{c} } = $tco_kv->{r};
+ }
+
push(
@stops,
{
@@ -137,6 +144,7 @@ sub new {
dep_delay => $dep_delay,
delay => $dep_delay // $arr_delay,
direction => $stop->{dDirTxt},
+ load => $tco,
}
);
}