# OBSOLETO - OUTDATED

# Segnale ripetitore (avviso) delle sbarre di un PL, da linkare come
# avviso del segnale di controllo vero e proprio (rfi_PL_i.tds).
#
# Aspetti: open (sbarre aperte), closed (sbarre chiuse)

# This special distant is just a repeater of the "real" gates position
# indicator (rfi_PL_i.tds), so you can have it on both sides of the track.
# See the instructions on how to use it to get the most realistic simu-
# lation of a level crossing (gates and signalling).
#
# Aspects of the gates: open, closed

# P.Rosati  1/12/2013

Aspect: open
	IconE: PL_I_X.xpm
	IconW: PL_I_X.xpm
	IconN: PL_I_X.xpm
	IconS: PL_I_X.xpm
	Action: none

Aspect: closed
	IconE: PL_-_X.xpm
	IconW: PL_-_X.xpm
	IconN: PL_-_X.xpm
	IconS: PL_-_X.xpm
	Action: none

# initial aspect

OnInit:
	.aspect = open
end

# the player or a script cleared the signal

OnCleared:
	return
end

# the player or a script cleared the signal for shunting

OnShunt:
	return
end

# this or another signal changed its aspect

OnUpdate:
	if next.aspect = red
		.aspect = open
	else
		.aspect = closed
	end
end
