if event.train then if get_rc() ~= "mainline_running_code" then set_rc("mainline_running_code") atc_set_text_inside("mainline_running_code") atc_send("S0WRS3") return end return end if event.digiline then if event.msg=="switch_ends" then if not atc_id then return end if atc_speed > 0 then return end atc_send("S0") interrupt(1,"braking delay") return end return end if event.int then if event.message=="braking delay" then split_at_index(2,"") set_route(POS(-802,4,1864),"to wye") interrupt(1,"split delay") return end if event.message=="split delay" then atc_set_text_inside("engine") atc_send("S3") return end return end