package electrosphere.game.data;

import electrosphere.game.data.creature.type.model.CreatureTypeMap;
import electrosphere.game.data.foliage.type.model.FoliageTypeMap;
import electrosphere.game.data.item.type.model.ItemTypeMap;
import electrosphere.game.data.structure.type.model.StructureTypeMap;
import electrosphere.game.server.race.model.RaceMap;
import electrosphere.game.server.symbolism.model.SymbolMap;
import electrosphere.util.FileUtils;

/**
 *
 * @author amaterasu
 */
public class Config {
    
    CreatureTypeMap creatureMap;
    StructureTypeMap structureTypeMap;
    ItemTypeMap itemMap;
    FoliageTypeMap foliageMap;
    SymbolMap symbolMap;
    RaceMap raceMap;
    
    public static Config loadDefaultConfig(){
        Config config = new Config();
        config.creatureMap = FileUtils.loadObjectFromAssetPath("Data/creatures.json", CreatureTypeMap.class);
        config.itemMap = FileUtils.loadObjectFromAssetPath("Data/items.json", ItemTypeMap.class);
        config.structureTypeMap = FileUtils.loadObjectFromAssetPath("Data/structures.json", StructureTypeMap.class);
        config.foliageMap = FileUtils.loadObjectFromAssetPath("Data/foliage.json", FoliageTypeMap.class);
        config.symbolMap = FileUtils.loadObjectFromAssetPath("Data/symbolism.json", SymbolMap.class);
        config.raceMap = FileUtils.loadObjectFromAssetPath("Data/races.json", RaceMap.class);
        return config;
    }

    public CreatureTypeMap getCreatureMap() {
        return creatureMap;
    }

    public StructureTypeMap getStructureTypeMap() {
        return structureTypeMap;
    }

    public ItemTypeMap getItemMap() {
        return itemMap;
    }

    public FoliageTypeMap getFoliageMap() {
        return foliageMap;
    }
    
    public SymbolMap getSymbolMap() {
        return symbolMap;
    }
    
    public RaceMap getRaceMap() {
        return raceMap;
    }
    
}
