Applies the specified part's transformation on the given point.
Applies the specified part's transformation on the given poly.
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)
celestial.skyFlying
.Returns the warp action world ID for the specified object.
Returns the orbit of the specified object, if any.
Returns the position of the specified object, if any.
Returns the configuration of the specified object type.
Spawns an object of typeName at position. Optionally with the specified UUID and parameters.
If no position is specified, one is automatically chosen in a spawnable range.
Returns definitively whether the coordinate has orbiting children. nil
return means the coordinate is not loaded.
Returns the child orbits for the specified celestial coordinate.
Returns a list of systems in the given region. If includedTypes is specified, this will return only systems whose typeName parameter is included in the set. This scans for systems asynchronously, meaning it may not return all systems if they have not been generated or sent to the client. Use scanRegionFullyLoaded
to see if this is the case.
includedTypes
.Returns the value assigned to the specified generic player property. If there is no value set, returns default.
Sets a generic player property to the specified value.
Adds the specified object to the player's scanned objects.
Removes the specified object from the player's scanned objects.
Returns true
if the player has accepted a quest (which may be active, completed, or failed) with the specified quest id and false
otherwise.
Returns true
if the player has a currently active quest with the specified quest id and false
otherwise.
If the player's currently tracked quest has an associated world, returns the id of that world.
Returns a list of world ids for worlds relevant to the player's current quests, along with a boolean indicating whether that quest is tracked.
If the player's currently tracked quest has an associated location (CelestialCoordinate, system orbit, UUID, or system position) returns that location.
Returns a list of locations for worlds relevant to the player's current quests, along with a boolean indicating whether that quest is tracked.
Returns whether the player has completed the specified mission.
Lists all of the player's teleport bookmarks.
Returns the parameters for a monster type.
Returns the configured base movement parameters for the specified monster type.
Creates a new child widget with the specified config and adds it to the specified widget, optionally with the specified name.
Removes all child widgets of the specified widget.
Removes the specified child widget from the specified widget.
Tuple<Maybe<Vec2F>, Maybe<Vec2F>>
world.lineCollision(Vec2F
startPoint, Vec2F
endPoint, [CollisionSet
collisionKinds]) If the line between the specified points overlaps any generated collision geometry of the specified collision kinds, returns the point at which the line collides, or nil
if the line does not collide. If intersecting a side of the poly, also returns the normal of the intersected side as a second return.
Returns the surface layer base height.
bool
world.damageTiles(List<Vec2I>
positions, String
layerName, Vec2F
sourcePosition, String
damageType, float
damageAmount, [unsigned
harvestLevel], [EntityId
sourceEntity]) Damages all tiles in the specified layer and positions by the specified amount. The source position of the damage determines the initial direction of the damage particles. Damage types are: "plantish", "blockish", "beamish", "explosive", "fire", "tilling". Harvest level determines whether destroyed materials or mods will drop as items. Returns true
if any damage was done and false
otherwise.
sourceEntity
.bool
world.damageTileArea(Vec2F
center, float
radius, String
layerName, Vec2F
sourcePosition, String
damageType, float
damageAmount, [unsigned
harvestLevel, [EntityId
sourceEntity) Identical to world.damageTiles but applies to tiles in a circular radius around the specified center point.
sourceEntity
.Returns a list of existing tiles within radius
of the given position, on the specified tile layer.
Returns the meta bound box of the entity, if any.
Returns the list of biome specific blocks that can place in the biome at the specified position.
Returns the value of the specified NPC's variant script config parameter, or defaultValue or nil
if the parameter is not set or the entity is not an NPC.
Enqueues a biome distribution config for placement through world generation. The returned promise is fulfilled with the position of the placement, once it has been placed.
Generates the specified dungeon in the world at the specified position. Does not ignore anchoring rules, will fail if the dungeon can't be placed. If a dungeon id is specified, it will be assigned to the dungeon.