SCRIPT HP_0_1_hidden

	extern float	block_state ();
	extern float	sig_feature ();
	extern float	state;
		
	if ( sig_feature ( SIGFEAT_USER3 ) )
	state = SIGASP_STOP;
	else
	if ( block_state () ==# BLOCK_CLEAR )
	state = SIGASP_CLEAR_1;
	else
	if ( sig_feature ( SIGFEAT_USER1 ) )
	state = SIGASP_STOP;
	else
	if ( sig_feature ( SIGFEAT_USER2 ) )	
	state = SIGASP_RESTRICTING;
	else 
	state = SIGASP_STOP;
	
SCRIPT HP_0_1_Normal

	extern float	block_state ();
	extern float	route_set ();
	extern float	def_draw_state ();
	extern float	sig_feature ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;

	if ( !enabled || block_state() !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
	if ( sig_feature ( SIGFEAT_USER4 ) )
	{	
		if ( route_set() )
		{
			if ( sig_feature ( SIGFEAT_USER1 ) )
			state = SIGASP_CLEAR_1;
			else
			state = SIGASP_STOP_AND_PROCEED;
		}
		else
		{
			if ( sig_feature ( SIGFEAT_USER2 ) )
			state = SIGASP_CLEAR_1;
			else
			state = SIGASP_STOP_AND_PROCEED;
		}
	}
	else
	{
		if ( sig_feature ( SIGFEAT_USER1 ) )
		state = SIGASP_CLEAR_1;
		else 
		if ( sig_feature ( SIGFEAT_USER2 ) )
		state = SIGASP_STOP_AND_PROCEED;
		else
		state = SIGASP_STOP;	
	}

	draw_state = def_draw_state (state);
	
SCRIPT HP_0_2_Normal

	extern float	block_state ();
	extern float	route_set ();
	extern float	def_draw_state ();
	extern float	next_sig_lr ();
	extern float	sig_feature ();
	extern float	state;
	extern float	draw_state;
	extern float	enabled;

	if ( !enabled || block_state() !=# BLOCK_CLEAR )
	state = SIGASP_STOP;
	else
	if ( !route_set() )
	state = SIGASP_APPROACH_1;
	else
	if ( sig_feature ( SIGFEAT_USER2 ) )
	state = SIGASP_STOP_AND_PROCEED;
	else
	if ( next_sig_lr (SIGFN_NORMAL) <=# SIGASP_RESTRICTING )
	state = SIGASP_APPROACH_1;	
	else	
	if ( sig_feature ( SIGFEAT_USER1 ) )
	state = SIGASP_CLEAR_1;
	else
	state = SIGASP_APPROACH_1;
		
	draw_state = def_draw_state (state);

SCRIPT HP_0_2_Info_Var

	extern float	def_draw_state ();
	extern float	dist_multi_sig_mr ();
	extern float	this_sig_lr ();
	extern float	state;
	extern float	draw_state;

	if ( this_sig_lr (SIGFN_NORMAL) ==# SIGASP_APPROACH_1 )
	state = SIGASP_APPROACH_1;
	else
	state = SIGASP_CLEAR_1;
	
	draw_state = def_draw_state (state);
	
SCRIPT VR_0_1_Distance

	extern float	def_draw_state ();
	extern float	block_state ();
	extern float	next_sig_lr ();
	extern float	state;
	extern float	draw_state;

	if ( next_sig_lr (SIGFN_NORMAL) <=# SIGASP_APPROACH_3 || block_state() !=# BLOCK_CLEAR )
	state = SIGASP_APPROACH_1;
	else
	state = SIGASP_CLEAR_1;
	
	draw_state = def_draw_state (state);
