import class TimeSkipFinishedEvent extends Event
{
}

class TimeSkipCursorInitFinishedEvent extends Event
{
}

class TimeSkipPopupData extends inkGameNotificationData
{
}

class TimeSkipPopupCloseData extends inkGameNotificationData
{
	var timeChanged : Bool;
}

import class TimeskipGameController extends inkGameController
{
	private editable var m_currentTimeLabel : inkTextRef;
	private editable var m_tragetTimeLabel : inkTextRef;
	private editable var m_diffTimeLabel : inkTextRef;
	private editable var m_rootContainerRef : inkWidgetRef;
	private editable var m_currentTimePointerRef : inkWidgetRef;
	private editable var m_targetTimePointerRef : inkWidgetRef;
	private editable var m_timeBarRef : inkWidgetRef;
	private editable var m_circleGradientRef : inkWidgetRef;
	private editable var m_startCircleGradientRef : inkWidgetRef;
	private editable var m_mouseHitTestRef : inkWidgetRef;
	private editable var m_dayIconRef : inkWidgetRef;
	private editable var m_nightIconRef : inkWidgetRef;
	private editable var m_morningIconRef : inkWidgetRef;
	private editable var m_eveningIconRef : inkWidgetRef;
	private editable var m_weatherIcon : inkImageRef;
	private editable var m_intoAnimation : CName;
	default m_intoAnimation = 'intro';
	private editable var m_outroCancelAnimation : CName;
	default m_outroCancelAnimation = 'outro_cancel';
	private editable var m_outroFinishedAnimation : CName;
	default m_outroFinishedAnimation = 'outro_finish';
	private editable var m_progressAnimation : CName;
	default m_progressAnimation = 'progress';
	private editable var m_finishingAnimation : CName;
	default m_finishingAnimation = 'finishing';
	private editable var m_loopAnimationMarkerFrom : CName;
	default m_loopAnimationMarkerFrom = 'loop_from';
	private editable var m_loopAnimationMarkerTo : CName;
	default m_loopAnimationMarkerTo = 'loop_to';
	private editable var m_mouseHoverOverAnimation : CName;
	default m_mouseHoverOverAnimation = 'mouseHoverOver';
	private editable var m_mouseHoverOutAnimation : CName;
	default m_mouseHoverOutAnimation = 'mouseHoverOut';
	private editable var m_outroAnimDuration : Float;
	private var m_player : weak< GameObject >;
	private var m_data : TimeSkipPopupData;
	private var m_gameInstance : GameInstance;
	private var m_timeSystem : TimeSystem;
	private var m_currentTimeTextParams : inkTextParams;
	private var m_targetTimeTextParams : inkTextParams;
	private var m_diffTimeTextParams : inkTextParams;
	private var m_animProxy : inkAnimProxy;
	private var m_progressAnimProxy : inkAnimProxy;
	private var m_hoverAnimProxy : inkAnimProxy;
	private var m_currentTime : GameTime;
	private var m_hoursToSkip : Int32;
	default m_hoursToSkip = 1;
	private var m_currentTimeAngle : Float;
	private var m_targetTimeAngle : Float;
	private var m_axisInputCache : Vector2;
	private var m_inputEnabled : Bool;
	default m_inputEnabled = false;
	private var m_radius : Float;
	default m_radius = 310;
	private var m_axisInputThreshold : Float;
	default m_axisInputThreshold = 0.1;
	private var m_animationDurationMin : Float;
	default m_animationDurationMin = 3;
	private var m_animationDurationMax : Float;
	default m_animationDurationMax = 6;
	private var m_diff : Float;
	default m_diff = 0f;
	private var m_timeSkipped : Bool;
	private var m_mouseInputEnabled : Bool;
	private var scenarioEvt : TimeSkipFinishEvent;
	private var m_hoveredOver : Bool;
	default m_hoveredOver = false;

	protected event OnInitialize()
	{
		var cursorEvent : TimeSkipCursorInitFinishedEvent;
		var deadzoneConfig : ConfigVarFloat;
		m_player = GetPlayerControlledObject();
		m_player.RegisterInputListener( this, '__DEVICE_CHANGED__' );
		m_gameInstance = ( ( GameObject )( GetOwnerEntity() ) ).GetGame();
		m_timeSystem = GameInstance.GetTimeSystem( m_gameInstance );
		deadzoneConfig = ( ( ConfigVarFloat )( GameInstance.GetSettingsSystem( m_player.GetGame() ).GetVar( '/controls', 'Axis_DeadzoneInnerFix' ) ) );
		m_axisInputThreshold = deadzoneConfig.GetValue();
		m_data = ( ( TimeSkipPopupData )( GetRootWidget().GetUserData( 'TimeSkipPopupData' ) ) );
		RegisterToGlobalInputCallback( 'OnPostOnRelease', this, 'OnGlobalInput' );
		RegisterToGlobalInputCallback( 'OnPostOnRelative', this, 'OnMouseInput' );
		RegisterToGlobalInputCallback( 'OnPostOnAxis', this, 'OnGlobalAxisInput' );
		inkWidgetRef.RegisterToCallback( m_mouseHitTestRef, 'OnHoverOver', this, 'OnHoverOver' );
		inkWidgetRef.RegisterToCallback( m_mouseHitTestRef, 'OnHoverOut', this, 'OnHoverOut' );
		PlayAnimation( m_intoAnimation );
		m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnIntroFinished' );
		cursorEvent = new TimeSkipCursorInitFinishedEvent;
		QueueEvent( cursorEvent );
		GameInstance.GetTimeSystem( m_player.GetGame() ).SetTimeDilation( 'TimeSkip', 0.0 );
		GameInstance.GetGodModeSystem( m_player.GetGame() ).AddGodMode( m_player.GetEntityID(), gameGodModeType.Invulnerable, 'TimeSkip' );
		DisplayTimeCurrent();
		UpdateTargetTime( m_currentTimeAngle + ( 3.0 * ( ( 2.0 * Pi() ) / 24.0 ) ) );
	}

	protected event OnUninitialize()
	{
		GameInstance.GetTimeSystem( m_player.GetGame() ).UnsetTimeDilation( 'TimeSkip' );
		GameInstance.GetGodModeSystem( m_player.GetGame() ).RemoveGodMode( m_player.GetEntityID(), gameGodModeType.Invulnerable, 'TimeSkip' );
	}

	protected event OnIntroFinished( proxy : inkAnimProxy )
	{
		m_inputEnabled = true;
		if( m_hoveredOver )
		{
			m_mouseInputEnabled = true;
		}
	}

	protected event OnHoverOver( evt : inkPointerEvent )
	{
		m_hoveredOver = true;
		if( !( m_inputEnabled ) )
		{
			return false;
		}
		m_mouseInputEnabled = true;
		if( m_hoverAnimProxy )
		{
			m_hoverAnimProxy.Stop();
		}
		m_hoverAnimProxy = PlayLibraryAnimation( m_mouseHoverOverAnimation );
		inkWidgetRef.SetState( m_timeBarRef, ( ( m_mouseInputEnabled || !( m_player.PlayerLastUsedKBM() ) ) ? ( 'Active' ) : ( 'Default' ) ) );
	}

	protected event OnHoverOut( evt : inkPointerEvent )
	{
		m_hoveredOver = false;
		if( !( m_inputEnabled ) )
		{
			return false;
		}
		m_mouseInputEnabled = false;
		if( m_hoverAnimProxy )
		{
			m_hoverAnimProxy.Stop();
		}
		m_hoverAnimProxy = PlayLibraryAnimation( m_mouseHoverOutAnimation );
		inkWidgetRef.SetState( m_timeBarRef, ( ( m_mouseInputEnabled || !( m_player.PlayerLastUsedKBM() ) ) ? ( 'Active' ) : ( 'Default' ) ) );
	}

	protected event OnTimeSkipCursorInitFinishedEvent( e : TimeSkipCursorInitFinishedEvent )
	{
		if( !( m_player.PlayerLastUsedKBM() ) )
		{
			SetCursorContext( 'Hide' );
		}
	}

	protected event OnAction( action : ListenerAction, consumer : ListenerActionConsumer )
	{
		if( ListenerAction.IsAction( action, '__DEVICE_CHANGED__' ) )
		{
			if( m_player.PlayerLastUsedKBM() )
			{
				SetCursorContext( 'Show' );
				inkWidgetRef.SetState( m_timeBarRef, ( ( m_mouseInputEnabled ) ? ( 'Active' ) : ( 'Default' ) ) );
			}
			else
			{
				SetCursorContext( 'Hide' );
				inkWidgetRef.SetState( m_timeBarRef, 'Active' );
			}
		}
	}

	protected event OnMouseInput( e : inkPointerEvent )
	{
		if( m_mouseInputEnabled && ( e.IsAction( 'mouse_x' ) || e.IsAction( 'mouse_y' ) ) )
		{
			ProcessMouseInput( e.GetScreenSpacePosition() );
		}
	}

	protected event OnGlobalAxisInput( e : inkPointerEvent )
	{
		var value : Float;
		value = e.GetAxisData();
		if( e.IsAction( 'popup_axisX' ) || e.IsAction( 'popup_axisX_right' ) )
		{
			if( AbsF( value ) > m_axisInputThreshold )
			{
				m_axisInputCache.X = value;
			}
		}
		else if( e.IsAction( 'popup_axisY' ) || e.IsAction( 'popup_axisY_right' ) )
		{
			if( AbsF( value ) > m_axisInputThreshold )
			{
				m_axisInputCache.Y = value;
			}
		}
	}

	protected event OnGlobalInput( e : inkPointerEvent )
	{
		if( e.IsHandled() )
		{
			return false;
		}
		if( e.IsAction( 'click' ) || e.IsAction( 'one_click_confirm' ) )
		{
			PlayRumble( RumbleStrength.Light, RumbleType.Pulse, RumblePosition.Right );
			e.Handle();
			Apply();
		}
		else if( e.IsAction( 'cancel' ) )
		{
			e.Handle();
			Cancel();
		}
		else if( e.IsAction( 'right_button' ) && m_inputEnabled )
		{
			UpdateTargetTime( Pi() * 2.0 );
		}
		else if( e.IsAction( 'left_button' ) && m_inputEnabled )
		{
			UpdateTargetTime( Pi() );
		}
		else if( e.IsAction( 'up_button' ) && m_inputEnabled )
		{
			UpdateTargetTime( ( Pi() * 3.0 ) / 2.0 );
		}
		else if( e.IsAction( 'down_button' ) && m_inputEnabled )
		{
			UpdateTargetTime( Pi() / 2.0 );
		}
		else if( e.IsAction( 'time_skip_increase' ) && m_inputEnabled )
		{
			UpdateTargetTime( m_targetTimeAngle + ( ( Pi() * 2.0 ) / 24.0 ) );
		}
		else if( e.IsAction( 'time_skip_decrease' ) && m_inputEnabled )
		{
			UpdateTargetTime( m_targetTimeAngle - ( ( Pi() * 2.0 ) / 24.0 ) );
		}
	}

	private function Apply()
	{
		var playbackOptions : inkAnimOptions;
		var currentTime : GameTime;
		var hours : Int32;
		if( !( m_inputEnabled ) )
		{
			return;
		}
		m_inputEnabled = false;
		if( m_hoursToSkip > 0 )
		{
			currentTime = m_timeSystem.GetGameTime();
			hours = GameTime.Hours( currentTime ) + m_hoursToSkip;
			m_timeSystem.SetGameTimeByHMS( hours, GameTime.Minutes( currentTime ), GameTime.Seconds( currentTime ), 'ui_menu_timeskip' );
			GameTimeUtils.FastForwardPlayerState( GetPlayerControlledObject() );
			PlayTictocAnimation();
			playbackOptions.toMarker = m_loopAnimationMarkerFrom;
			PlayAnimation( m_progressAnimation, playbackOptions );
			m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnStartProgressionLoop' );
		}
		GameInstance.GetAudioSystem( m_gameInstance ).Play( 'ui_menu_map_timeskip' );
	}

	protected event OnStartProgressionLoop( proxy : inkAnimProxy )
	{
		var playbackOptions : inkAnimOptions;
		playbackOptions.toMarker = m_loopAnimationMarkerTo;
		playbackOptions.fromMarker = m_loopAnimationMarkerFrom;
		playbackOptions.loopInfinite = true;
		playbackOptions.loopType = inkanimLoopType.PingPong;
		PlayAnimation( m_progressAnimation, playbackOptions );
	}

	private function PlayTictocAnimation()
	{
		var animEffectDef : inkAnimDef;
		var animEffectInterp : inkAnimEffect;
		var animRotDef : inkAnimDef;
		var animRotInterp : inkAnimRotation;
		var animationDuration : Float;
		animationDuration = ( ( ( m_hoursToSkip > 4 ) ) ? ( m_animationDurationMax ) : ( m_animationDurationMin ) ) - m_outroAnimDuration;
		animEffectDef = new inkAnimDef;
		animEffectInterp = new inkAnimEffect;
		animEffectInterp.SetStartDelay( 0.0 );
		animEffectInterp.SetEffectType( inkEffectType.RadialWipe );
		animEffectInterp.SetEffectName( 'RadialWipe' );
		animEffectInterp.SetParamName( 'transition' );
		animEffectInterp.SetDirection( inkanimInterpolationDirection.To );
		animEffectInterp.SetEndValue( 0.0 );
		animEffectInterp.SetDuration( animationDuration );
		animEffectDef.AddInterpolator( animEffectInterp );
		inkWidgetRef.PlayAnimation( m_timeBarRef, animEffectDef );
		animRotDef = new inkAnimDef;
		animRotInterp = new inkAnimRotation;
		animRotInterp.SetStartDelay( 0.0 );
		animRotInterp.SetStartRotation( 0.0 );
		animRotInterp.SetEndRotation( m_diff );
		animRotInterp.SetDuration( animationDuration );
		animRotInterp.SetIsAdditive( true );
		animRotInterp.SetGoShortPath( false );
		animRotDef.AddInterpolator( animRotInterp );
		m_progressAnimProxy = inkWidgetRef.PlayAnimation( m_currentTimePointerRef, animRotDef );
		m_progressAnimProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnProgressAnimationFinished' );
	}

	protected event OnProgressAnimationFinished( proxy : inkAnimProxy )
	{
		var playbackOptions : inkAnimOptions;
		m_progressAnimProxy = NULL;
		if( m_timeSkipped )
		{
			PlayAnimation( m_outroFinishedAnimation );
			m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnCloseAfterFinishing' );
			GameInstance.GetAudioSystem( m_gameInstance ).Play( 'ui_menu_map_timeskip_stop' );
		}
		else
		{
			playbackOptions.toMarker = m_loopAnimationMarkerFrom;
			PlayAnimation( m_finishingAnimation, playbackOptions );
			m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnStartFinishingLoop' );
			GameInstance.GetAudioSystem( m_gameInstance ).Play( 'ui_menu_map_timeskip_stop' );
			PlayRumble( RumbleStrength.SuperLight, RumbleType.Pulse, RumblePosition.Both );
			inkImageRef.SetTexturePart( m_weatherIcon, GetWeatherIcon() );
			m_progressAnimProxy = NULL;
		}
	}

	protected event OnStartFinishingLoop( proxy : inkAnimProxy )
	{
		var playbackOptions : inkAnimOptions;
		playbackOptions.fromMarker = m_loopAnimationMarkerFrom;
		playbackOptions.toMarker = m_loopAnimationMarkerTo;
		playbackOptions.loopInfinite = true;
		playbackOptions.loopType = inkanimLoopType.PingPong;
		PlayAnimation( m_finishingAnimation, playbackOptions );
	}

	protected event OnTimeSkipFinishedEvent( e : TimeSkipFinishedEvent )
	{
		m_timeSkipped = true;
		if( !( m_progressAnimProxy ) || !( m_progressAnimProxy.IsPlaying() ) )
		{
			PlayAnimation( m_outroFinishedAnimation );
			m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnCloseAfterFinishing' );
		}
	}

	private function Cancel()
	{
		if( !( m_inputEnabled ) )
		{
			return;
		}
		m_inputEnabled = false;
		GameInstance.GetAudioSystem( m_gameInstance ).Play( 'ui_menu_onpress' );
		PlayAnimation( m_outroCancelAnimation );
		m_animProxy.RegisterToCallback( inkanimEventType.OnFinish, this, 'OnCloseAfterCanceling' );
	}

	protected event OnCloseAfterCanceling( proxy : inkAnimProxy )
	{
		var data : TimeSkipPopupCloseData;
		data = new TimeSkipPopupCloseData;
		m_data.token.TriggerCallback( data );
		scenarioEvt = new TimeSkipFinishEvent;
		QueueBroadcastEvent( scenarioEvt );
	}

	protected event OnCloseAfterFinishing( proxy : inkAnimProxy )
	{
		var evt : ForceCloseHubMenuEvent;
		evt = new ForceCloseHubMenuEvent;
		QueueBroadcastEvent( evt );
		scenarioEvt = new TimeSkipFinishEvent;
		QueueBroadcastEvent( scenarioEvt );
	}

	protected event OnUpdate( timeDelta : Float )
	{
		var angle : Float;
		var diff : Float;
		var h : Int32;
		if( !( m_inputEnabled ) )
		{
			if( m_progressAnimProxy && m_progressAnimProxy.IsPlaying() )
			{
				angle = Deg2Rad( inkWidgetRef.GetRotation( m_currentTimePointerRef ) );
				if( angle > m_targetTimeAngle )
				{
					diff = Rad2Deg( ( ( Pi() * 2.0 ) - angle ) + m_targetTimeAngle );
				}
				else
				{
					diff = Rad2Deg( m_targetTimeAngle - angle );
				}
				UpdateIconStates( angle, m_targetTimeAngle );
				h = RoundF( ( diff / 360.0 ) * 24.0 );
				SetTimeSkipText( m_diffTimeLabel, m_diffTimeTextParams, h );
				GameTimeUtils.SetGameTimeText( m_currentTimeLabel, m_currentTimeTextParams, m_currentTime + ( ( m_hoursToSkip - h ) * 3600 ) );
			}
		}
		else if( ( AbsF( m_axisInputCache.Y ) > m_axisInputThreshold ) || ( AbsF( m_axisInputCache.X ) > m_axisInputThreshold ) )
		{
			angle = AtanF( m_axisInputCache.X, m_axisInputCache.Y ) - ( Pi() / 2.0 );
			UpdateTargetTime( angle );
		}
		m_axisInputCache.Y = 0.0;
		m_axisInputCache.X = 0.0;
	}

	private function DisplayTimeCurrent()
	{
		var hourse : Int32;
		var minutes : Int32;
		var a : Float;
		GameTimeUtils.UpdateGameTimeText( m_timeSystem, m_currentTimeLabel, m_currentTimeTextParams );
		m_currentTime = m_timeSystem.GetGameTime();
		hourse = GameTime.Hours( m_currentTime );
		minutes = GameTime.Minutes( m_currentTime );
		a = ( ( ( ( Float )( hourse ) ) / 24.0 ) + ( ( ( Float )( minutes ) ) / 1440.0 ) ) * 360.0;
		m_currentTimeAngle = Deg2Rad( a ) + ( Pi() / 2.0 );
		m_currentTimeAngle = m_currentTimeAngle % ( Pi() * 2.0 );
		inkWidgetRef.SetRotation( m_currentTimePointerRef, Rad2Deg( m_currentTimeAngle ) );
		inkWidgetRef.SetRotation( m_circleGradientRef, Rad2Deg( m_currentTimeAngle + ( Pi() / 2.0 ) ) );
		inkWidgetRef.SetRotation( m_startCircleGradientRef, Rad2Deg( m_currentTimeAngle + ( Pi() / 2.0 ) ) );
	}

	private function ProcessMouseInput( mousePos : Vector2 )
	{
		var angle : Float;
		var rootWidget : weak< inkWidget >;
		var rootSize : Vector2;
		var localPos : Vector2;
		if( m_inputEnabled )
		{
			rootWidget = GetRootWidget();
			localPos = WidgetUtils.GlobalToLocal( inkWidgetRef.Get( m_rootContainerRef ), mousePos );
			rootSize = rootWidget.GetSize();
			angle = AtanF( localPos.Y - ( rootSize.Y / 2.0 ), localPos.X - ( rootSize.X / 2.0 ) );
			UpdateTargetTime( angle );
		}
	}

	private function UpdateTargetTime( angle : Float )
	{
		var barWidget : weak< inkWidget >;
		var dx, dy : Float;
		var hoursToSkip : Int32;
		m_targetTimeAngle = ( angle + ( 2.0 * Pi() ) ) % ( 2.0 * Pi() );
		if( m_currentTimeAngle > m_targetTimeAngle )
		{
			m_diff = Rad2Deg( ( ( Pi() * 2.0 ) - m_currentTimeAngle ) + m_targetTimeAngle );
		}
		else
		{
			m_diff = Rad2Deg( m_targetTimeAngle - m_currentTimeAngle );
		}
		hoursToSkip = FloorF( ( m_diff / 360.0 ) * 24.0 ) + 1;
		if( hoursToSkip != m_hoursToSkip )
		{
			m_hoursToSkip = hoursToSkip;
			PlayRumble( RumbleStrength.SuperLight, RumbleType.Pulse, RumblePosition.Left );
		}
		dx = CosF( m_targetTimeAngle ) * m_radius;
		dy = SinF( m_targetTimeAngle ) * m_radius;
		inkWidgetRef.SetMargin( m_targetTimePointerRef, dx, dy, 0.0, 0.0 );
		GameTimeUtils.UpdateGameTimeText( m_timeSystem, m_tragetTimeLabel, m_targetTimeTextParams, m_hoursToSkip * 3600 );
		SetTimeSkipText( m_diffTimeLabel, m_diffTimeTextParams, m_hoursToSkip );
		barWidget = inkWidgetRef.Get( m_timeBarRef );
		barWidget.SetEffectParamValue( inkEffectType.RadialWipe, 'RadialWipe', 'startAngle', Rad2Deg( ( Pi() * 2.0 ) - m_targetTimeAngle ) );
		barWidget.SetEffectParamValue( inkEffectType.RadialWipe, 'RadialWipe', 'transition', m_diff / 360.0 );
		inkWidgetRef.SetOpacity( m_startCircleGradientRef, ( ( Float )( m_hoursToSkip ) ) / 24.0 );
		UpdateIconStates( m_currentTimeAngle, m_targetTimeAngle );
	}

	private function PlayAnimation( animationName : CName, optional playbackOptions : inkAnimOptions )
	{
		if( m_animProxy && m_animProxy.IsPlaying() )
		{
			m_animProxy.Stop( true );
		}
		m_animProxy = PlayLibraryAnimation( animationName, playbackOptions );
	}

	private function UpdateIconStates( startAngle : Float, finishAngle : Float )
	{
		inkWidgetRef.SetState( m_dayIconRef, ( ( IsBetween( startAngle, finishAngle, ( Pi() * 3.0 ) / 2.0 ) ) ? ( 'Passed' ) : ( 'Default' ) ) );
		inkWidgetRef.SetState( m_nightIconRef, ( ( IsBetween( startAngle, finishAngle, Pi() / 2.0 ) ) ? ( 'Passed' ) : ( 'Default' ) ) );
		inkWidgetRef.SetState( m_morningIconRef, ( ( IsBetween( startAngle, finishAngle, Pi() ) ) ? ( 'Passed' ) : ( 'Default' ) ) );
		inkWidgetRef.SetState( m_eveningIconRef, ( ( IsBetween( startAngle, finishAngle, Pi() * 2.0 ) ) ? ( 'Passed' ) : ( 'Default' ) ) );
	}

	private function IsBetween( start : Float, end : Float, mid : Float ) : Bool
	{
		end = ( ( ( end - start ) < 0.0 ) ? ( ( end - start ) + 360.0 ) : ( end - start ) );
		mid = ( ( ( mid - start ) < 0.0 ) ? ( ( mid - start ) + 360.0 ) : ( mid - start ) );
		return mid < end;
	}

	private function SetTimeSkipText( textWidgetRef : inkTextRef, textParamsRef : inkTextParams, hours : Int32 )
	{
		if( textParamsRef == NULL )
		{
			textParamsRef = new inkTextParams;
			textParamsRef.AddNumber( "value", hours );
			inkTextRef.SetLocalizedText( textWidgetRef, 'UI-Time-WaitHours', textParamsRef );
		}
		else
		{
			textParamsRef.UpdateNumber( "value", hours );
		}
	}

	private function GetWeatherIcon() : CName
	{
		var iconName : CName;
		var rainIntensity : worldRainIntensity;
		rainIntensity = GameInstance.GetWeatherSystem( m_gameInstance ).GetRainIntensityType();
		switch( rainIntensity )
		{
			case worldRainIntensity.HeavyRain:
				iconName = 'icon_weather_heavyRain';
			break;
			case worldRainIntensity.LightRain:
				iconName = 'icon_weather_lightRain';
			break;
			case worldRainIntensity.NoRain:
				iconName = 'icon_weather_cloudy';
			break;
		}
		return iconName;
	}

}

