SCRIPT STOP extern float state; extern float draw_state; state = 0; draw_state = 0; SCRIPT NAV6A extern float this_sig_lr (); extern float sig_feature (); extern float state; extern float draw_state; float this_nor; float this_dis; this_nor = this_sig_lr (SIGFN_NORMAL); this_dis = this_sig_lr (SIGFN_DISTANCE); state = this_nor; if ( this_nor ==# 0 ) { draw_state = 0; } else if ( this_nor ==# 1 ) { if ( !sig_feature (SIGFEAT_USER4) ) draw_state = 1; else draw_state = 2; } SCRIPT PRED6/10 extern float this_sig_lr (); extern float draw_state; float this_dis; this_dis = this_sig_lr (SIGFN_DISTANCE); if ( this_dis ==# 6 ) draw_state = 0; else if ( this_dis ==# 4 ) draw_state = 1; else draw_state = 2; else if ( this_nor ==# 2 ) { draw_state = 12; } else if ( this_nor ==# 3 ) { if ( this_dis !=# -1 ) draw_state = 3; else draw_state = 4; } else if ( this_nor ==# 4 ) { if ( this_dis !=# -1 ) draw_state = 5; else draw_state = 6; } else if ( this_nor ==# 5 ) { if ( this_dis !=# -1 ) draw_state = 7; else draw_state = 8; } else if ( this_nor ==# 6 ) { if ( this_dis !=# -1 ) draw_state = 9; else draw_state = 10; } else if ( this_nor ==# 7 ) { if ( this_dis ==# -1 ) draw_state = 11; else draw_state = 12; } else { state = 8; draw_state = 12; } SCRIPT N160 extern float enabled; extern float route_set (); extern float next_sig_lr (); extern float this_sig_lr (); extern float block_state (); extern float sig_feature (); extern float state; extern float draw_state; extern float def_draw_state (); float next_nor; float this_dis; float this_rep; next_nor = next_sig_lr (SIGFN_NORMAL); this_dis = this_sig_lr (SIGFN_DISTANCE); this_rep = this_sig_lr (SIGFN_REPEATER); if ( !enabled || !route_set () || block_state () !=# 0 || ( sig_feature (SIGFEAT_GRADIENT_PLATE) && next_nor ==# 0 ) ) state = 0; else if ( sig_feature (SIGFEAT_USER1) && next_nor ==# 1 ) state = 1; else if ( this_rep !=# -1 && ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) ) state = 3; else if ( sig_feature (SIGFEAT_USER2) || ( ( this_dis !=# -1 && next_nor !=# 7 ) && next_nor !=# 2 ) || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) state = 2; else state = 7; draw_state = def_draw_state (state); SCRIPT N40 extern float enabled; extern float route_set (); extern float next_sig_lr (); extern float block_state (); extern float sig_feature (); extern float state; extern float draw_state; extern float def_draw_state (); float next_nor; next_nor = next_sig_lr (SIGFN_NORMAL); if ( !enabled || !route_set () || block_state () !=# 0 || ( sig_feature (SIGFEAT_GRADIENT_PLATE) && next_nor ==# 0 ) ) state = 0; else if ( sig_feature (SIGFEAT_USER1) && next_nor ==# 1 ) state = 1; else state = 3; draw_state = def_draw_state (state); SCRIPT NV40 extern float enabled; extern float route_set (); extern float next_sig_lr (); extern float block_state (); extern float sig_feature (); extern float state; extern float draw_state; extern float def_draw_state (); float next_nor; next_nor = next_sig_lr (SIGFN_NORMAL); if ( !enabled || !route_set () || block_state () !=# 0 || ( sig_feature (SIGFEAT_GRADIENT_PLATE) && next_nor ==# 0 ) ) state = 0; else if ( sig_feature (SIGFEAT_USER1) && next_nor ==# 1 ) state = 1; else if ( next_nor ==# 0 ) state = 2; else state = 3; draw_state = def_draw_state (state); SCRIPT NPP extern float enabled; extern float route_set (); extern float block_state (); extern float sig_feature (); extern float next_sig_lr (); extern float state; extern float draw_state; extern float def_draw_state (); float next_nor; next_nor = next_sig_lr (SIGFN_NORMAL); if ( !enabled || !route_set () || block_state () !=# 0 || ( sig_feature (SIGFEAT_GRADIENT_PLATE) && sig_feature (SIGFEAT_USER4) && next_nor ==# 0 ) ) state = 0; else state = 1; draw_state = def_draw_state (state); SCRIPT PREDOP6 extern float state; extern float draw_state; state = 2; draw_state = 0 SCRIPT PRED4/8 extern float this_sig_lr (); extern float next_sig_lr (); extern float sig_feature (); extern float state; extern float draw_state; float this_nor; float this_rep; float next_nor; this_nor = this_sig_lr (SIGFN_NORMAL); this_rep = this_sig_lr (SIGFN_REPEATER); next_nor = next_sig_lr (SIGFN_NORMAL); state = next_nor; if ( this_nor ==# 0 || this_nor ==# 1 ) { state = 0; draw_state = 35; } else if ( !sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ==# 7 ) ) { state = 7; draw_state = 0; } //BEZ REP else if ( this_rep ==# -1 || next_nor >= this_nor ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 18; } else if ( next_nor ==# 3 ) draw_state = 9; else if ( next_nor ==# 5 ) draw_state = 1; else draw_state = 35; } //REP else if ( this_rep ==# 0 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; if ( sig_feature (SIGFEAT_USER3) ) draw_state = 19; else draw_state = 20; } else if ( next_nor ==# 3 ) { if ( sig_feature (SIGFEAT_USER3) ) draw_state = 10; else draw_state = 11; } else if ( next_nor ==# 5 ) { draw_state = 2; } else { if ( sig_feature (SIGFEAT_USER3) ) draw_state = 27; else draw_state = 28; } } //REP 4R else if ( this_rep ==# 1 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; if ( sig_feature (SIGFEAT_USER3) ) draw_state = 19; else draw_state = 21; } else if ( next_nor ==# 3 ) { if ( sig_feature (SIGFEAT_USER3) ) draw_state = 10; else draw_state = 12; } else if ( next_nor ==# 5 ) { draw_state = 3; } else { if ( sig_feature (SIGFEAT_USER3) ) draw_state = 27; else draw_state = 29; } } //REP 6A else if ( this_rep ==# 2 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 22; } else if ( next_nor ==# 3 ) draw_state = 13; else if ( next_nor ==# 5 ) draw_state = 4; else draw_state = 30; } //REP 5T else if ( this_rep ==# 3 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 23; } else if ( next_nor ==# 3 ) draw_state = 14; else if ( next_nor ==# 5 ) draw_state = 5; else draw_state = 31; } //REP 5Z else if ( this_rep ==# 4 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 24; } else if ( next_nor ==# 3 ) draw_state = 15; else if ( next_nor ==# 5 ) draw_state = 6; else draw_state = 32; } //REP BLV else if ( this_rep ==# 5 ) { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 25; } else if ( next_nor ==# 3 ) draw_state = 16; else if ( next_nor ==# 5 ) draw_state = 7; else draw_state = 33; } //REP 2_2 else { if ( next_nor ==# 0 || next_nor ==# 1 || ( sig_feature (SIGFEAT_USER3) && ( next_nor ==# 2 || next_nor ># 4 ) ) ) { state = 2; draw_state = 26; } else if ( next_nor ==# 3 ) draw_state = 17; else if ( next_nor ==# 5 ) draw_state = 8; else draw_state = 34; } SCRIPT PRED6/10 extern float this_sig_lr (); extern float draw_state; float this_dis; this_dis = this_sig_lr (SIGFN_DISTANCE); if ( this_dis ==# 6 ) draw_state = 0; else if ( this_dis ==# 4 ) draw_state = 1; else draw_state = 2;