@@ -7908,17 +7908,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
7908
7908
break;
7909
7909
7910
7910
case "callon":
7911
- if (thisStationStop != null) thisStationStop.CallOnAllowed = true;
7911
+ if (thisStationStop == null)
7912
+ {
7913
+ Trace.TraceInformation("Cannot set CALLON without station stop time : train " + Name + " ( " + Number + " )");
7914
+ }
7915
+ else
7916
+ {
7917
+ thisStationStop.CallOnAllowed = true;
7918
+ }
7912
7919
break;
7913
7920
7914
7921
case "hold":
7915
- if (thisStationStop != null)
7922
+ if (thisStationStop == null)
7923
+ {
7924
+ Trace.TraceInformation("Cannot set HOLD without station stop time : train " + Name + " ( " + Number + " )");
7925
+ }
7926
+ else
7927
+ {
7916
7928
thisStationStop.HoldSignal = thisStationStop.ExitSignal >= 0; // set holdstate only if exit signal is defined
7929
+ }
7917
7930
break;
7918
7931
7919
7932
case "nohold":
7920
- if (thisStationStop != null)
7933
+ if (thisStationStop == null)
7934
+ {
7935
+ Trace.TraceInformation("Cannot set NOHOLD without station stop time : train " + Name + " ( " + Number + " )");
7936
+ }
7937
+ else
7938
+ {
7921
7939
thisStationStop.HoldSignal = false;
7940
+ }
7922
7941
break;
7923
7942
7924
7943
case "forcehold":
@@ -8002,15 +8021,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
8002
8021
break;
8003
8022
8004
8023
case "nowaitsignal":
8005
- thisStationStop.NoWaitSignal = true;
8024
+ if (thisStationStop == null)
8025
+ {
8026
+ Trace.TraceInformation("Cannot set NOWAITSIGNAL without station stop time : train " + Name + " ( " + Number + " )");
8027
+ }
8028
+ else
8029
+ {
8030
+ thisStationStop.NoWaitSignal = true;
8031
+ }
8006
8032
break;
8007
8033
8008
8034
case "waitsignal":
8009
- thisStationStop.NoWaitSignal = false;
8035
+ if (thisStationStop == null)
8036
+ {
8037
+ Trace.TraceInformation("Cannot set WAITSIGNAL without station stop time : train " + Name + " ( " + Number + " )");
8038
+ }
8039
+ else
8040
+ {
8041
+ thisStationStop.NoWaitSignal = false;
8042
+ }
8010
8043
break;
8011
8044
8012
8045
case "noclaim":
8013
- thisStationStop.NoClaimAllowed = true;
8046
+ if (thisStationStop == null)
8047
+ {
8048
+ Trace.TraceInformation("Cannot set NOCLAIM without station stop time : train " + Name + " ( " + Number + " )");
8049
+ }
8050
+ else
8051
+ {
8052
+ thisStationStop.NoClaimAllowed = true;
8053
+ }
8014
8054
break;
8015
8055
8016
8056
// no action for terminal (processed in create station stop)
0 commit comments