# Segnale imperativo di Annuncio Treno, da collegare al punto di ingresso reale e
# da azionare con un pedale posto su un tratto fittizio prima dell'ingresso reale.
# Quando il treno aziona il pedale l'annuncio si accende e suona la leopolder, poi
# resta acceso finché il treno non lo supera.
#
# Aspetti: Acceso (on), Spento (red) 	versione piccola

# Train Announcement signal: it's a real signal that stops trains, to be linked just after
# a visible entry point and to be cleared by a pedal linked to a hidden track section pre-
# ceding the visible entry point. When a train triggers the pedal the indicator turns on
# and rings a typical bell (the "leopolder"), then it remains lit until the train passes it.
#
# Aspects: Lit (on), Unlit (red)		smaller version

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

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

Aspect: on
	IconE: ATsmall_on_X.xpm
	IconW: ATsmall_on_X.xpm
	IconN: ATsmall_on_X.xpm
	IconS: ATsmall_on_X.xpm
	Action: proceed

# initial aspect

OnInit:
	.aspect = red
end

# the player or a script cleared the signal

OnCleared:
	do play Leopolder
	.aspect = on
end

# the player or a script cleared the signal for shunting

OnShunt:
	.aspect = on
end

# this or another signal changed its aspect

OnUpdate:
	return
end

# a train passed the signal

OnCross:
	.aspect = red
end

# the player or a script uncleared the signal

OnUncleared:
	.aspect = red
end
