mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(scenery): added recognizing offline train rides as active in scenery's timetables
This commit is contained in:
@@ -18,23 +18,31 @@ export function getTrainStopStatus(
|
|||||||
return StopStatus.TERMINATED;
|
return StopStatus.TERMINATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stopInfo.terminatesHere && stopInfo.confirmed && currentStationName == sceneryName) {
|
if (
|
||||||
|
!stopInfo.terminatesHere &&
|
||||||
|
stopInfo.confirmed &&
|
||||||
|
currentStationName.startsWith(sceneryName)
|
||||||
|
) {
|
||||||
return StopStatus.DEPARTED;
|
return StopStatus.DEPARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stopInfo.terminatesHere && stopInfo.confirmed && currentStationName != sceneryName) {
|
if (
|
||||||
|
!stopInfo.terminatesHere &&
|
||||||
|
stopInfo.confirmed &&
|
||||||
|
!currentStationName.startsWith(sceneryName)
|
||||||
|
) {
|
||||||
return StopStatus.DEPARTED_AWAY;
|
return StopStatus.DEPARTED_AWAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentStationName == sceneryName && !stopInfo.stopped) {
|
if (currentStationName.startsWith(sceneryName) && !stopInfo.stopped) {
|
||||||
return StopStatus.ONLINE;
|
return StopStatus.ONLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentStationName == sceneryName && stopInfo.stopped) {
|
if (currentStationName.startsWith(sceneryName) && stopInfo.stopped) {
|
||||||
return StopStatus.STOPPED;
|
return StopStatus.STOPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentStationName != sceneryName) {
|
if (!currentStationName.startsWith(sceneryName)) {
|
||||||
return StopStatus.ARRIVING;
|
return StopStatus.ARRIVING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user