| 201 | } |
| 202 | |
| 203 | List<RectI> WorldTemplate::previewAddBiomeRegion(Vec2I const& position, int width) { |
| 204 | if (auto terrestrialParameters = as<TerrestrialWorldParameters>(m_worldParameters)) { |
| 205 | auto regionRects = m_layout->previewAddBiomeRegion(position, width); |
| 206 | regionRects.transform([terrestrialParameters](RectI const& rect) { |
| 207 | return rect.padded(ceil(terrestrialParameters->blendSize)); |
| 208 | }); |
| 209 | return regionRects; |
| 210 | } else { |
| 211 | Logger::error("Cannot add biome region to non-terrestrial world!"); |
| 212 | // throw StarException("Cannot add biome region to non-terrestrial world!"); |
| 213 | return List<RectI>(); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | List<RectI> WorldTemplate::previewExpandBiomeRegion(Vec2I const& position, int newWidth) { |
| 218 | if (auto terrestrialParameters = as<TerrestrialWorldParameters>(m_worldParameters)) { |