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

Method childOrbits

source/game/StarCelestialDatabase.cpp:277–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277List<int> CelestialMasterDatabase::childOrbits(CelestialCoordinate const& coordinate) {
278 RecursiveMutexLocker locker(m_mutex);
279
280 if (!coordinateValid(coordinate))
281 throw CelestialException("CelestialMasterDatabase::childOrbits called on invalid coordinate");
282
283 auto const& systemObjects = getChunk(chunkIndexFor(coordinate)).systemObjects.get(coordinate.location());
284
285 if (coordinate.isSystem())
286 return systemObjects.keys();
287
288 if (coordinate.isPlanetaryBody())
289 return systemObjects.get(coordinate.orbitNumber()).satelliteParameters.keys();
290
291 throw CelestialException("CelestialMasterDatabase::childOrbits called on improper type!");
292}
293
294List<CelestialCoordinate> CelestialMasterDatabase::scanSystems(RectI const& region, Maybe<StringSet> const& includedTypes) {
295 RecursiveMutexLocker locker(m_mutex);

Callers 5

clusterSizeMethod · 0.80
planetSizeMethod · 0.80
addObjectMethod · 0.80

Calls 8

isSystemMethod · 0.80
isPlanetaryBodyMethod · 0.80
orbitNumberMethod · 0.80
isSatelliteBodyMethod · 0.80
getMethod · 0.45
locationMethod · 0.45
keysMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected