Skip to content

Commit d870f6b

Browse files
committed
Allow depart early
1 parent 4104e5f commit d870f6b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10722,7 +10722,14 @@ public override void CheckStationTask()
1072210722
if (!StationStops[0].EndStop)
1072310723
{
1072410724
if (!DriverOnlyOperation) Simulator.SoundNotify = Event.PermissionToDepart; // sound departure if not doo
10725-
DisplayMessage = Simulator.Catalog.GetString("Passenger boarding completed. You may depart now.");
10725+
if (StationStops[0].AllowDepartEarly)
10726+
{
10727+
DisplayMessage = Simulator.Catalog.GetString("Passenger boarding completed. Early departure allowed.");
10728+
}
10729+
else
10730+
{
10731+
DisplayMessage = Simulator.Catalog.GetString("Passenger boarding completed. You may depart now.");
10732+
}
1072610733
}
1072710734
}
1072810735
}

Source/RunActivity/Viewer3D/Popups/NextStationWindow.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
270270
StationPreviousArriveActual.Color = actArrDT < playerTimetableTrain.PreviousStop.arrivalDT ? Color.LightGreen : Color.LightSalmon;
271271
DateTime actDepDT = new DateTime((long)(Math.Pow(10, 7) * playerTimetableTrain.PreviousStop.ActualDepart));
272272
StationPreviousDepartActual.Text = actDepDT.ToString("HH:mm:ss");
273+
if (playerTimetableTrain.PreviousStop.AllowDepartEarly)
274+
{
275+
StationPreviousDepartActual.Text = actDepDT.ToString("HH*mm:ss");
276+
}
273277
StationPreviousDepartActual.Color = actDepDT > playerTimetableTrain.PreviousStop.arrivalDT ? Color.LightGreen : Color.LightSalmon;
274278
}
275279
else
@@ -314,6 +318,10 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
314318
StationCurrentArriveActual.Text = "";
315319
}
316320
StationCurrentDepartScheduled.Text = playerTimetableTrain.StationStops[0].departureDT.ToString("HH:mm:ss");
321+
if (playerTimetableTrain.StationStops[0].AllowDepartEarly)
322+
{
323+
StationCurrentDepartScheduled.Text = playerTimetableTrain.StationStops[0].departureDT.ToString("HH*mm:ss");
324+
}
317325
StationCurrentDistance.Text = FormatStrings.FormatDistanceDisplay(playerTimetableTrain.StationStops[0].DistanceToTrainM, metric);
318326
Message.Text = playerTimetableTrain.DisplayMessage;
319327
Message.Color = playerTimetableTrain.DisplayColor;
@@ -323,6 +331,10 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
323331
StationNextName.Text = playerTimetableTrain.StationStops[1].PlatformItem.Name;
324332
StationNextArriveScheduled.Text = playerTimetableTrain.StationStops[1].arrivalDT.ToString("HH:mm:ss");
325333
StationNextDepartScheduled.Text = playerTimetableTrain.StationStops[1].departureDT.ToString("HH:mm:ss");
334+
if (playerTimetableTrain.StationStops[1].AllowDepartEarly)
335+
{
336+
StationNextDepartScheduled.Text = playerTimetableTrain.StationStops[1].departureDT.ToString("HH*mm:ss");
337+
}
326338
StationNextDistance.Text = "";
327339
}
328340
else

0 commit comments

Comments
 (0)