| 1178 | } |
| 1179 | |
| 1180 | void WorldServer::expandBiomeRegion(Vec2I const& position, int newWidth) { |
| 1181 | newWidth = std::min(newWidth, (int)m_worldTemplate->size()[0]); |
| 1182 | |
| 1183 | auto regions = m_worldTemplate->previewExpandBiomeRegion(position, newWidth); |
| 1184 | |
| 1185 | if (regions.empty()) { |
| 1186 | Logger::info("Aborting expandBiomeRegion as it would have no result!"); |
| 1187 | return; |
| 1188 | } |
| 1189 | |
| 1190 | for (auto region : regions) { |
| 1191 | for (auto sector : m_worldStorage->sectorsForRegion(region)) |
| 1192 | m_worldStorage->triggerTerraformSector(sector); |
| 1193 | } |
| 1194 | |
| 1195 | m_worldTemplate->expandBiomeRegion(position, newWidth); |
| 1196 | } |
| 1197 | |
| 1198 | bool WorldServer::pregenerateAddBiome(Vec2I const& position, int width) { |
| 1199 | auto regions = m_worldTemplate->previewAddBiomeRegion(position, width); |
nothing calls this directly
no test coverage detected