mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-09 18:22:15 +01:00
Merge pull request #167 from pwarszawski/whois-station-ahead
whois: add lookahead mode for the timetable entry after the next stop
This commit is contained in:
@@ -77,6 +77,15 @@ bool TTrainParameters::IsLastStop() const {
|
||||
return StationIndex >= StationCount;
|
||||
}
|
||||
|
||||
TMTableLine const &TTrainParameters::TimeTableEntryAhead( int Offset ) const
|
||||
{ // wpis rozkladu Offset pozycji za aktualnym (bez pomijania przelotow);
|
||||
// poza zakresem 1..StationCount zwraca techniczny wpis zerowy
|
||||
int const idx { StationIndex + Offset };
|
||||
if( ( idx < 1 ) || ( idx > StationCount ) )
|
||||
return TimeTable[0];
|
||||
return TimeTable[idx];
|
||||
}
|
||||
|
||||
|
||||
bool TTrainParameters::IsMaintenance() const {
|
||||
if( StationIndex <= StationCount )
|
||||
|
||||
Reference in New Issue
Block a user