diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/server/world/ServerUniverse.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/server/world/ServerUniverse.kt index 2cbb0457..78cad64b 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/server/world/ServerUniverse.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/server/world/ServerUniverse.kt @@ -152,7 +152,15 @@ class ServerUniverse private constructor(marker: Nothing?) : Universe(), Closeab val y = random.nextRange(baseInformation.xyCoordRange) val result = scanSystems(rect + Vector2i(x, y)) { - val children = children(it) + val children = ArrayList() + + for (planet in children(it)) { + children.add(planet) + + for (satellite in children(planet)) { + children.add(satellite) + } + } if (children.isEmpty()) return@scanSystems KOptional()