local cmd = { "TREES_RUNAROUND", "SHUNT_MAINLINE_REV", } __approach_callback_mode = 1 if event.approach and not event.has_entered then atc_set_ars_disable(true) atc_set_lzb_tsr(1) return end if event.train and atc_arrow then if not F.has_rc("BYARD_NOID_SHUTTLE") then return end -- not our train, disregard if not F.has_rc("TREES_RUNAROUND") then -- train has arrived from yard, split and runaround split_off_locomotive("A0B0") --disable ARS to stop the rest of the train engaging the signal F.add_rc(cmd) --add RC commands tomake the train runaround atc_send("S3A1") --send the loco on its way to make the runaround return end --else loco has returned from runaround F.remove_rc(cmd) -- remove runaround RCs atc_send("S0WRS1") --reverse the train and creep towards the other departure signal return end