Пример #1
0
        private static void loadTextureSets()
        {
            ConfigNode[] setNodes = GameDatabase.Instance.GetConfigNodes("KSP_TEXTURE_SET");
            TextureSet[] sets     = TextureSet.parse(setNodes);
            int          len      = sets.Length;

            for (int i = 0; i < len; i++)
            {
                loadedTextureSets.Add(sets[i].name, sets[i]);
            }
        }
Пример #2
0
        private static void loadTextureSets()
        {
            loadedTextureSets.Clear();
            ConfigNode[] setNodes = GameDatabase.Instance.GetConfigNodes("KSP_TEXTURE_SET");
            TextureSet[] sets     = TextureSet.parse(setNodes, "create");
            int          len      = sets.Length;

            for (int i = 0; i < len; i++)
            {
                if (loadedTextureSets.ContainsKey(sets[i].name))
                {
                    Log.exception("ERROR: Duplicate texture set definition found for name: " + sets[i].name +
                                  "  This is a major configuration error that should be corrected.  Correct operation cannot be ensured.");
                }
                else
                {
                    loadedTextureSets.Add(sets[i].name, sets[i]);
                }
            }
        }