local yard_id = "CAN" if event.train then if F.has_rc(yard_id.."_LIGHT_EXIT") or F.has_rc(yard_id.."_REENTER_YARD") then F.remove_rc(yard_id.."_LIGHT_EXIT") atc_set_ars_disable(false) atc_send("SM") return end end F.headshunt_exit(yard_id,true)