chore(scenery): added recognizing offline train rides as active in scenery's timetables

This commit is contained in:
2026-04-17 21:16:10 +02:00
parent 69c604f1e7
commit 2b16213531
+13 -5
View File
@@ -18,23 +18,31 @@ export function getTrainStopStatus(
return StopStatus.TERMINATED;
}
if (!stopInfo.terminatesHere && stopInfo.confirmed && currentStationName == sceneryName) {
if (
!stopInfo.terminatesHere &&
stopInfo.confirmed &&
currentStationName.startsWith(sceneryName)
) {
return StopStatus.DEPARTED;
}
if (!stopInfo.terminatesHere && stopInfo.confirmed && currentStationName != sceneryName) {
if (
!stopInfo.terminatesHere &&
stopInfo.confirmed &&
!currentStationName.startsWith(sceneryName)
) {
return StopStatus.DEPARTED_AWAY;
}
if (currentStationName == sceneryName && !stopInfo.stopped) {
if (currentStationName.startsWith(sceneryName) && !stopInfo.stopped) {
return StopStatus.ONLINE;
}
if (currentStationName == sceneryName && stopInfo.stopped) {
if (currentStationName.startsWith(sceneryName) && stopInfo.stopped) {
return StopStatus.STOPPED;
}
if (currentStationName != sceneryName) {
if (!currentStationName.startsWith(sceneryName)) {
return StopStatus.ARRIVING;
}