@@ -7874,17 +7874,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
78747874 break;
78757875
78767876 case "callon":
7877- if (thisStationStop != null) thisStationStop.CallOnAllowed = true;
7877+ if (thisStationStop == null)
7878+ {
7879+ Trace.TraceInformation("Cannot set CALLON without station stop time : train " + Name + " ( " + Number + " )");
7880+ }
7881+ else
7882+ {
7883+ thisStationStop.CallOnAllowed = true;
7884+ }
78787885 break;
78797886
78807887 case "hold":
7881- if (thisStationStop != null)
7888+ if (thisStationStop == null)
7889+ {
7890+ Trace.TraceInformation("Cannot set HOLD without station stop time : train " + Name + " ( " + Number + " )");
7891+ }
7892+ else
7893+ {
78827894 thisStationStop.HoldSignal = thisStationStop.ExitSignal >= 0; // set holdstate only if exit signal is defined
7895+ }
78837896 break;
78847897
78857898 case "nohold":
7886- if (thisStationStop != null)
7899+ if (thisStationStop == null)
7900+ {
7901+ Trace.TraceInformation("Cannot set NOHOLD without station stop time : train " + Name + " ( " + Number + " )");
7902+ }
7903+ else
7904+ {
78877905 thisStationStop.HoldSignal = false;
7906+ }
78887907 break;
78897908
78907909 case "forcehold":
@@ -7968,15 +7987,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
79687987 break;
79697988
79707989 case "nowaitsignal":
7971- thisStationStop.NoWaitSignal = true;
7990+ if (thisStationStop == null)
7991+ {
7992+ Trace.TraceInformation("Cannot set NOWAITSIGNAL without station stop time : train " + Name + " ( " + Number + " )");
7993+ }
7994+ else
7995+ {
7996+ thisStationStop.NoWaitSignal = true;
7997+ }
79727998 break;
79737999
79748000 case "waitsignal":
7975- thisStationStop.NoWaitSignal = false;
8001+ if (thisStationStop == null)
8002+ {
8003+ Trace.TraceInformation("Cannot set WAITSIGNAL without station stop time : train " + Name + " ( " + Number + " )");
8004+ }
8005+ else
8006+ {
8007+ thisStationStop.NoWaitSignal = false;
8008+ }
79768009 break;
79778010
79788011 case "noclaim":
7979- thisStationStop.NoClaimAllowed = true;
8012+ if (thisStationStop == null)
8013+ {
8014+ Trace.TraceInformation("Cannot set NOCLAIM without station stop time : train " + Name + " ( " + Number + " )");
8015+ }
8016+ else
8017+ {
8018+ thisStationStop.NoClaimAllowed = true;
8019+ }
79808020 break;
79818021
79828022 // no action for terminal (processed in create station stop)
0 commit comments