# OBSOLETO - OUTDATED

# Indicatore che simula le luci rosse per le auto in un PL senza barriere; va piazzato come
# avviso del segnale per il treno (rfi_prot_PL_s.tds), e poi spostato vicino alla strada.
#
# Aspetti: spento (open), acceso (closed)

# Special signal simulating the red lights for the cars in a level crossing with no gates; to be
# placed as a distant of the signal for the trains (rfi_prot_PL_s.tds) and then moved near the road.
#
# Aspects: off (open), on (closed)

# P.Rosati  1/12/2013

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

Aspect: closed
	IconE: PL_rb_X.xpm PL_br_X.xpm
	IconW: PL_rb_X.xpm PL_br_X.xpm
	IconN: PL_rb_X.xpm PL_br_X.xpm
	IconS: PL_rb_X.xpm PL_br_X.xpm
	Action: none

# initial aspect

OnInit:
	.aspect = open
end

# the player or a script cleared the signal

OnCleared:
	return
end

# this or another signal changed its aspect

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