class FirstEquipSystem extends ScriptableSystem
{
	protected persistent var m_equipDataArray : array< EFirstEquipData >;

	public static function GetInstance( owner : GameObject ) : FirstEquipSystem
	{
		var FES : FirstEquipSystem;
		FES = ( ( FirstEquipSystem )( GameInstance.GetScriptableSystemsContainer( owner.GetGame() ).Get( 'FirstEquipSystem' ) ) );
		return FES;
	}

	public const function HasPlayedFirstEquip( weaponID : TweakDBID ) : Bool
	{
		var i : Int32;
		for( i = 0; i < m_equipDataArray.Size(); i += 1 )
		{
			if( m_equipDataArray[ i ].weaponID == weaponID )
			{
				return m_equipDataArray[ i ].hasPlayedFirstEquip;
			}
		}
		return false;
	}

	private export function OnCompletionOfFirstEquip( request : CompletionOfFirstEquipRequest )
	{
		var receivedWeaponData : EFirstEquipData;
		receivedWeaponData.weaponID = request.weaponID;
		receivedWeaponData.hasPlayedFirstEquip = true;
		m_equipDataArray.PushBack( receivedWeaponData );
	}

}

struct EFirstEquipData
{
	persistent var weaponID : TweakDBID;
	persistent var hasPlayedFirstEquip : Bool;
}

class CompletionOfFirstEquipRequest extends ScriptableSystemRequest
{
	var weaponID : TweakDBID;
}

