| 124 | } |
| 125 | |
| 126 | WeatherType BiomeDatabase::weatherType(String const& name) const { |
| 127 | if (!m_weathers.contains(name)) |
| 128 | throw BiomeException(strf("No such weather type '{}'", name)); |
| 129 | |
| 130 | auto config = m_weathers.get(name); |
| 131 | |
| 132 | try { |
| 133 | return WeatherType(config.parameters, config.path); |
| 134 | } catch (MapException const& e) { |
| 135 | throw BiomeException(strf("Required key not found in weather config {}", config.path), e); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | BiomePtr BiomeDatabase::createBiome(String const& biomeName, uint64_t seed, float verticalMidPoint, float threatLevel) const { |
| 140 | if (!m_biomes.contains(biomeName)) |
no test coverage detected