public TSOAvatarContentProvider(Content contentManager, IContentCodec <T> codec, Regex farRegex, Regex fileRegex) : base()
        {
            FAR              = new FAR3Provider <T>(contentManager, codec, farRegex);
            Files            = new FileProvider <T>(contentManager, codec, fileRegex);
            Files.UseContent = true;
            Files.FAR3IDs    = true;
            Runtime          = new RuntimeProvider <T>();

            var fileFolder = fileRegex.ToString();
            var lastSlash  = fileFolder.LastIndexOf('/');

            if (lastSlash != -1)
            {
                fileFolder = fileFolder.Substring(0, lastSlash + 1);
            }
            FileFolder = Path.Combine("Content/", fileFolder);

            SetProviders(new List <IContentProvider <T> > {
                FAR,
                Files,
                Runtime
            });
        }
Ejemplo n.º 2
0
        private bool TS1; //temporary testing var for hybrid content system

        public FAR1Provider(Content contentManager, IContentCodec <T> codec, Regex farFilePattern, bool ts1) : this(contentManager, codec, farFilePattern)
        {
            TS1 = ts1;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new instance of FAR1Provider.
 /// </summary>
 /// <param name="contentManager">A Content instance.</param>
 /// <param name="codec">The codec of the type of file in the FAR1 archive for which to provide access.</param>
 /// <param name="farFilePattern">A regular expression of FAR1 archives with files of the specified codec.</param>
 public FAR1Provider(Content contentManager, IContentCodec <T> codec, Regex farFilePattern)
 {
     this.ContentManager = contentManager;
     this.Codec          = codec;
     this.FarFilePattern = farFilePattern;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance of FAR1Provider.
 /// </summary>
 /// <param name="contentManager">A Content instance.</param>
 /// <param name="codec">The codec of the type of file in the FAR1 archive for which to provide access.</param>
 /// <param name="farFiles">A list of FAR1 archives with files of the specified codec.</param>
 public FAR1Provider(Content contentManager, IContentCodec <T> codec, params string[] farFiles)
 {
     this.ContentManager = contentManager;
     this.Codec          = codec;
     this.FarFiles       = farFiles;
 }
 /// <summary>
 /// Creates a new instance of PackingSlipProvider.
 /// </summary>
 /// <param name="contentManager">A Content instance.</param>
 /// <param name="packingslip">The name of a packingslip (xml) file.</param>
 /// <param name="codec">The codec of the file for which to provide access.</param>
 public PackingslipProvider(Content contentManager, string packingslip, IContentCodec <T> codec)
 {
     this.ContentManager  = contentManager;
     this.PackingSlipFile = packingslip;
     this.Codec           = codec;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new FAR3Provider.
 /// </summary>
 /// <param name="ContentManager">A Content instance.</param>
 /// <param name="Codec">A content codec.</param>
 /// <param name="FarFilePattern">Which FAR file types to use.</param>
 public FAR3Provider(Content ContentManager, IContentCodec <T> Codec, Regex FarFilePattern)
 {
     this.ContentManager = ContentManager;
     this.Codec          = Codec;
     this.FarFilePattern = FarFilePattern;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates a new FAR3Provider.
 /// </summary>
 /// <param name="ContentManager">A Content instance.</param>
 /// <param name="Codec">A content codec.</param>
 /// <param name="FarFiles">A list of FAR3 filenames.</param>
 public FAR3Provider(Content ContentManager, IContentCodec <T> Codec, params string[] FarFiles)
 {
     this.ContentManager = ContentManager;
     this.Codec          = Codec;
     this.m_FarFiles     = FarFiles;
 }
Ejemplo n.º 8
0
 public FileProvider(Content contentManager, IContentCodec <T> codec, string[] files)
 {
     this.ContentManager = contentManager;
     this.Codec          = codec;
     this.Files          = files;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a new instance of FileProvider.
 /// </summary>
 /// <param name="contentManager">A Content instance.</param>
 /// <param name="codec">The codec of the filetype of which to provide access.</param>
 /// <param name="filePattern">Filepattern used to search for files of this type.</param>
 public FileProvider(GameContent contentManager, IContentCodec <T> codec, Regex filePattern)
 {
     this.ContentManager = contentManager;
     this.Codec          = codec;
     this.FilePattern    = filePattern;
 }