# OBSOLETO - OUTDATED

# Segnale automatico di Annuncio Treno, da collegare al punto di ingresso in un
# tratto fittizio prima dell'ingresso reale; si accende non appena il treno lo
# supera e resta acceso fino a che il treno supera il primo segnale visibile.
# Funziona solo per binari monodirezionali in ingresso.
#
# Aspetti: Acceso (red), Spento (off) 	versione grande

# Automatic Train Announcement signal, to be linked to a hidden track
# section before a visible entry point; it turns on when a train passes
# the signal, and remains lit until the train passes the next signal.
# Works only on unidirectional tracks for trains entering the layout.
#
# Aspects: Lit (red), Unlit (off)		bigger version

# P.Rosati  21/01/2021 (Versione 5.1)

Aspect: red
	IconE: AT_on_X.xpm
	IconW: AT_on_X.xpm
	IconN: AT_on_X.xpm
	IconS: AT_on_X.xpm
	Action: stop

Aspect: off
	IconE: AT_off_X.xpm
	IconW: AT_off_X.xpm
	IconN: AT_off_X.xpm
	IconS: AT_off_X.xpm
	Action: proceed

# initial aspect

OnInit:
	.auto = 1
	.enabled = 1
	.aspect = red
end

# the player or a script cleared the signal

OnCleared:
	.aspect = off
end

# the player or a script cleared the signal for shunting

OnShunt:
	.aspect = off
end

# this or another signal changed its aspect

OnUpdate:
	return
end

# a train passed the signal

OnCross:
	do play leopolder
	.aspect = red
end

# the player or a script uncleared the signal

OnUncleared:
	.aspect = red
end
