The celestial table contains functions that relate to the client sky, flying the player ship, system positions for planets, system objects, and the celestial database. It is available in the following contexts:
bool
celestial.skyFlying()String
celestial.skyFlyingType()String
celestial.skyWarpPhase()float
celestial.skyWarpProgress()bool
celestial.skyInHyperspace()flyShip
celestial.skyFlying(Vec3I
system, SystemLocation
destination)Flies the player ship to the specified SystemLocation in the specified system.
SystemLocation is either of the following types: Null, CelestialCoordinate, Object, Vec2F
The locations are specified as a pair of type and value
local system = celestial.currentSystem().location
local location = nil -- Null
location = {"coordinate", {location = system, planet = 1, satellite = 0}} -- CelestialCoordinate
location = {"object", "11112222333344445555666677778888"} -- Object (UUID)
location = {0.0, 0.0} -- Vec2F (position in space)
celestial.flyShip(system, location)
bool
celestial.flying()Vec2F
celestial.shipSystemPosition()SystemLocation
celestial.shipDestination()SystemLocation
celestial.shipLocation()CelestialCoordinate
celestial.currentSystem()float
celestial.planetSize(CelestialCoordinate
planet)Vec2F
celestial.planetPosition(CelestialCoordinate
planet)CelestialParameters
celestial.planetParameters(CelestialCoordinate
planet)VisitableParameters
celestial.visitableParameters(CelestialCoordinate
planet)String
celestial.planetName(CelestialCoordinate
planet)uint64_t
celestial.planetSeed(CelestialCoordinate
planet)float
celestial.clusterSize(CelestialCoordinate
planet)List<String>
celestial.planetOres(CelestialCoordinate
planet)Vec2F
celestial.systemPosition(SystemLocation
location)Vec2F
celestial.orbitPosition(Orbit
orbit)Returns the calculated position of the provided orbit.
local orbit = {
target = planet, -- the orbit target
direction = 1, -- orbit direction
enterTime = 0, -- time the orbit was entered, universe epoch time
enterPosition = {1, 0} -- the position that the orbit was entered at, relative to the target
}
List<Uuid>
celestial.systemObjects()String
celestial.objectType(Uuid
uuid)Json
celestial.objectParameters(Uuid
uuid)Uuid
celestial.systemSpawnObject(String
typeName, Vec2F
position, [Uuid
uuid], [Json
parameters])Spawns an object of typeName at position. Optionally with the specified UUID and parameters.
/systemworld.config:clientSpawnObjectPadding
from any planet surface (including moons), star surface, planetary orbit (including moons), or permanent objects orbits, and at most within clientSpawnObjectPadding
from the outermost orbit.List<Uuid>
celestial.playerShips()playerShipPosition
celestial.playerShipPosition(Uuid
uuid)List<CelestialCoordinate>
celestial.objectParameters(CelestialCoordinate
coordinate)List<CelestialCoordinate>
celestial.scanSystems(RectI
region)scanRegionFullyLoaded
to see if this is the case.List<pair<Vec2I, Vec2I>>
celestial.scanConstellationLines(RectI
region)bool
celestial.scanRegionFullyLoaded(RectI
region)List<pair<String, float>>
celestial.centralBodyImages(CelestialCoordinate
system)List<pair<String, float>>
celestial.planetaryObjectImages(CelestialCoordinate
coordinate)List<pair<String, float>>
celestial.worldImages(CelestialCoordinate
coordinate)List<pair<String, float>>
celestial.starImages(CelestialCoordinate
system, float
twinkleTime)Returns the star image for the specified system. Requires a twinkle time to provide the correct image frame.