Exemplo n.º 1
0
        private void LoadAssetConfigFile(string file)
        {
            // make an instance of the generic loader to determine which specific loader to use
            EntityConfig ec = EntityConfigHelper.Load(file);

            //ec.LoadFromFile(file);
            if (!AssetTypesByName.ContainsKey(ec.Type))
            {
                return;
            }

            int id = AssetTypesByName[ec.Type].Id;

            if (!ConfigByType.ContainsKey(id))
            {
                ConfigByType.Add(id, new List <EntityConfig>());
            }

            List <EntityConfig> configs = ConfigByType[id];

            configs.Add(ec);

            // run it through the more specific loader
            EntityType at = AssetTypesByName[ec.Type];

            at.LoadConfigFromFile(file);
            //assetConfigs.Add(ac.AssetName, ac);
        }
Exemplo n.º 2
0
        internal void LoadConfigFromFile(string file)
        {
            EntityConfig ec = EntityConfigHelper.Load(file);

            if (!PrototypeAssets.ContainsKey(ec.Name))
            {
                PrototypeAssets.Add(ec.Name, ec);
            }
        }
Exemplo n.º 3
0
 public virtual GenEntityConfigTypes.EntityConfig LoadConfig(string file)
 {
     config = EntityConfigHelper.Load(file);
     return(config);
 }