MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / expandBiomeRegion

Method expandBiomeRegion

source/game/StarWorldServer.cpp:1180–1196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180void 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
1198bool WorldServer::pregenerateAddBiome(Vec2I const& position, int width) {
1199 auto regions = m_worldTemplate->previewAddBiomeRegion(position, width);

Callers

nothing calls this directly

Calls 5

sectorsForRegionMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected