* Returns the info about a specific map data file. * @param name Datafile name. * @return Rules for the datafile. */
| 804 | * @return Rules for the datafile. |
| 805 | */ |
| 806 | MapDataSet *Ruleset::getMapDataSet(const std::string &name) |
| 807 | { |
| 808 | std::map<std::string, MapDataSet*>::iterator map = _mapDataSets.find(name); |
| 809 | if (map == _mapDataSets.end()) |
| 810 | { |
| 811 | MapDataSet *set = new MapDataSet(name); |
| 812 | _mapDataSets[name] = set; |
| 813 | return set; |
| 814 | } |
| 815 | else |
| 816 | { |
| 817 | return map->second; |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | /** |
| 822 | * Returns the info about a specific unit. |