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

Method worldRadialPosition

source/game/StarCelestialGraphics.cpp:219–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219int CelestialGraphics::worldRadialPosition(CelestialParameters const& parameters) {
220 if (parameters.coordinate().isPlanetaryBody())
221 return staticRandomU32(parameters.seed(), "RadialNumber") % planetRadialPositions();
222 if (parameters.coordinate().isSatelliteBody())
223 return staticRandomU32(parameters.seed(), "RadialNumber") % satelliteRadialPositions();
224 return 0;
225}
226
227int CelestialGraphics::planetRadialPositions() {
228 return Root::singleton().assets()->json("/celestial.config:planetRadialSlots").toInt();

Callers

nothing calls this directly

Calls 7

staticRandomU32Function · 0.85
isPlanetaryBodyMethod · 0.80
coordinateMethod · 0.80
isSatelliteBodyMethod · 0.80
seedMethod · 0.45
parametersMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected