示例#1
0
        /// <summary>
        /// This function will parse and check the virtual file system for the game files
        /// </summary>
        public override void DiscoverLayout()
        {
            // Clear possibly old data.
            Packages.Clear();
            Superbundles.Clear();
            FileSystems.Clear();
            AuthoritativePackage = null;
            Layout = null;

            // Try to find a Data directory
            if (!FileSystem.DirectoryExists("/game/Data"))
#if DEBUG
            { throw new Exception("Failed to find the Data directory. Content mounting failed."); }
#else
            { return; }
#endif

            // Discover any packages that might exist.
            if (FileSystem.DirectoryExists("/game/Update"))
            {
                DiscoverPackages();
            }

            // Parse the base Layout file.
            ParseLayout();

            // Discover available superbundles.
            DiscoverSuperbundles();

            // Discover filesystems.
            DiscoverFileSystems();
        }