class DetectorModuleComponent extends ScriptableComponent
{

	protected event OnSenseVisibilityEvent( evt : SenseVisibilityEvent )
	{
		var revealEvent : RevealObjectEvent;
		revealEvent = new RevealObjectEvent;
		revealEvent.reason.reason = 'FlatheadThreatSharing';
		if( GameInstance.GetStatsSystem( GetOwner().GetGame() ).GetStatBoolValue( GetOwner().GetEntityID(), gamedataStatType.CanShareThreatsWithPlayer ) )
		{
			if( ( evt.isVisible && ( ( ScriptedPuppet )( evt.target ) ) ) && ScriptedPuppet.IsAlive( evt.target ) )
			{
				revealEvent.reveal = true;
				evt.target.QueueEvent( revealEvent );
			}
			if( !( evt.isVisible ) && ( ( ScriptedPuppet )( evt.target ) ) )
			{
				revealEvent.reveal = false;
				evt.target.QueueEvent( revealEvent );
			}
		}
	}

}

