@@ -7908,17 +7908,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
79087908 break;
79097909
79107910 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+ }
79127919 break;
79137920
79147921 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+ {
79167928 thisStationStop.HoldSignal = thisStationStop.ExitSignal >= 0; // set holdstate only if exit signal is defined
7929+ }
79177930 break;
79187931
79197932 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+ {
79217939 thisStationStop.HoldSignal = false;
7940+ }
79227941 break;
79237942
79247943 case "forcehold":
@@ -8002,15 +8021,36 @@ public void ProcessTimetableStopCommands(TTTrainCommands thisCommand, int subrou
80028021 break;
80038022
80048023 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+ }
80068032 break;
80078033
80088034 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+ }
80108043 break;
80118044
80128045 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+ }
80148054 break;
80158055
80168056 // no action for terminal (processed in create station stop)
0 commit comments