InitializeFromManifest() публичный Метод

public InitializeFromManifest ( ) : void
Результат void
Пример #1
0
        public void Load()
        {
            // Parse Manifests
            string[] modFolders = Directory.GetDirectories(mModsDirectoryPath);
            if (modFolders == null)
            {
                return;
            }

            foreach (string modPath in modFolders)
            {
                string formatted = JsonHelper.NormalizeSystemPath(modPath);
                Module module    = new Module(formatted);
                module.InitializeFromManifest();
                mModules.Add(module.Name, module);
            }

            foreach (Module module in mModules.Values)
            {
                module.LoadFiles();
            }

            foreach (Module module in mModules.Values)
            {
                module.PostLoadFixup();
            }
        }
        public void Load()
        {
            // Parse Manifests
            string[] modFolders = Directory.GetDirectories(mModsDirectoryPath);
            if (modFolders == null)
            {
                return;
            }

            foreach (string modPath in modFolders)
            {
                string formatted = JsonHelper.NormalizeSystemPath(modPath);
                if (!mModules.Keys.Contains(formatted))
                {
                    Module module = new Module(formatted);
                    module.InitializeFromManifest();
                    mModules.Add(module.Name, module);
                }
            }

            // Append modules from the additional folder (e.g. steam_uploads) at the end of the list
            if (SteamUploadsDirectoryPathExists())
            {
                string[] customModsFolders = Directory.GetDirectories(mSteamUploadsDirectoryPath);
                foreach (string customModPath in customModsFolders)
                {
                    string formatted = JsonHelper.NormalizeSystemPath(customModPath);
                    if (!mModules.Keys.Contains(formatted))
                    {
                        Module module = new Module(formatted);
                        module.InitializeFromManifest();
                        mModules.Add(module.Name, module);
                    }
                }
            }

            foreach (Module module in mModules.Values)
            {
                module.LoadFiles();
            }

            foreach (Module module in mModules.Values)
            {
                module.PostLoadFixup();
            }
        }
        public void Load()
        {
            // Parse Manifests
            string[] modFolders = Directory.GetDirectories(mModsDirectoryPath);
            if (modFolders == null)
            {
                return;
            }

            foreach (string modPath in modFolders)
            {
                string formatted = JsonHelper.NormalizeSystemPath(modPath);
                Module module = new Module(formatted);
                module.InitializeFromManifest();
                mModules.Add(module.Name, module);
            }

            foreach (Module module in mModules.Values)
            {
                module.LoadFiles();
            }

            foreach (Module module in mModules.Values)
            {
                module.PostLoadFixup();
            }
        }