@@ -7874,17 +7874,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
7874
7874
break;
7875
7875
7876
7876
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
+ }
7878
7885
break;
7879
7886
7880
7887
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
+ {
7882
7894
thisStationStop.HoldSignal = thisStationStop.ExitSignal >= 0; // set holdstate only if exit signal is defined
7895
+ }
7883
7896
break;
7884
7897
7885
7898
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
+ {
7887
7905
thisStationStop.HoldSignal = false;
7906
+ }
7888
7907
break;
7889
7908
7890
7909
case "forcehold":
@@ -7968,15 +7987,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
7968
7987
break;
7969
7988
7970
7989
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
+ }
7972
7998
break;
7973
7999
7974
8000
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
+ }
7976
8009
break;
7977
8010
7978
8011
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
+ }
7980
8020
break;
7981
8021
7982
8022
// no action for terminal (processed in create station stop)
0 commit comments