summaryrefslogtreecommitdiff
path: root/durt/nodes/(-1516,11,-2590).lua
blob: 735203230ed7c78a62fb420d5c435c216120fd3b (plain)
1
if event.train and atc_arrow then
	if S.yards.S27.shunt_type == false then
	--reverse around loop. player not present to supervise autocouple operation
		local rc = get_rc() or ""
		
		local action = 0
		local rc_list = {}
		for token in rc:gmatch("[^%s]+") do
			if token=="S27_LOOP" then
				action = 1
			else
				table.insert(rc_list,token)
			end
		end
		
		if action == 0 then
			rc = rc.." S27_LOOP"
		else
			rc = table.concat(rc_list," ").." S27_EXIT"
		end
		set_rc(rc)
		atc_set_ars_disable(false)
		atc_send("B0WRD1S3")
		return
	end
end