local indicator = POS(-2080,6,826) local rc = (get_rc or "") local shunting_rc = {"ArcLoad_split","ArcLoad_around","ArcLoad_rejoin"} if type(rc) == "string" then rc = function() return "" end end if rc():match("ArcLoad_NOSHUNT") then return end if event.train and atc_arrow then if getstate(indicator) == "green" then F.remove_rc(shunting_rc,true) atc_send("S0WRD1A1S2D10SM") setstate(indicator,"red") set_rc(rc().." ArcLoad_exit") print("Arcload departing") else print("Arcload arrived") local o_text = atc_get_text_outside() or "" atc_set_text_outside("Waiting for Locomotive") split_off_locomotive("A0B0",1) atc_set_text_outside(o_text) set_rc(rc().." "..table.concat(shunting_rc," ")) setstate(indicator,"green") end print(get_rc()) end