# Segnale basso (marmotta) ininfluente per il binario alla sua destra,
# da accoppiare come avviso al segnale successivo; si apre quando il suc-
# cessivo è aperto e lampeggia se il segnale successivo al suo è spento.
#
# Aspetti: _ (stop), | (on), |x (flashing), spento (off)

# Irrelevant repeater dwarf commanding to the right, it's actually a repeater
# of the main signal that follows. This signal is clear when the next signal
# can be passed, and flashes if the signal next to its own is disabled.
#
# Aspects: _ (stop), | (on), |x (flashing), off

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

Aspect: stop
	IconE: MA_-_E.xpm
	IconW: MA_-_W.xpm
	IconN: MA_-_N.xpm
	IconS: MA_-_S.xpm
	Action: none

Aspect: on
	IconE: MA_I_E.xpm
	IconW: MA_I_W.xpm
	IconN: MA_I_N.xpm
	IconS: MA_I_S.xpm
	Action: none

Aspect: flashing
	IconE: MA_I_E.xpm MA___E.xpm
	IconW: MA_I_W.xpm MA___W.xpm
	IconN: MA_I_N.xpm MA___N.xpm
	IconS: MA_I_S.xpm MA___S.xpm
	Action: none

Aspect: off
	IconE: MA___E.xpm
	IconW: MA___W.xpm
	IconN: MA___N.xpm
	IconS: MA___S.xpm
	Action: none

# initial aspect

OnInit:
	.aspect = stop
end

# the player or a script cleared the signal

OnCleared:
	return
end

# this or another signal changed its aspect

OnUpdate:
	if next.aspect = off or next.aspect = disabled or next.aspect = fault
		.aspect = off
		return
	end
	if next.aspect = red
		.aspect = stop
		return
	end
end

# a train passed the signal

OnCross:
	return
end
