From 65741d697277e3b5e2f4d8c2d77d06316ec6948c Mon Sep 17 00:00:00 2001 From: SilverSokolova <80606782+SilverSokolova@users.noreply.github.com> Date: Tue, 10 Dec 2024 23:35:51 -0600 Subject: [PATCH 1/2] Update player.md --- doc/lua/player.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/lua/player.md b/doc/lua/player.md index f281bad..fd8ebd4 100644 --- a/doc/lua/player.md +++ b/doc/lua/player.md @@ -527,9 +527,3 @@ Returns uuid, type, and orbits for all system objects in the specified system; #### `List` player.collectables(`String` collectionName) Returns a list of names of the collectables the player has unlocked in the specified collection. - ---- - -#### `List` player.teamMembers() - -Returns an array, each entry being a table with `name`, `uuid`, `entity`, `healthPercentage` and `energyPercentage` From 341a9a3556cf47c21a6d1776d66f0708b873de01 Mon Sep 17 00:00:00 2001 From: SilverSokolova <80606782+SilverSokolova@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:18:08 -0600 Subject: [PATCH 2/2] Update openstarbound.md --- doc/lua/openstarbound.md | 80 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/doc/lua/openstarbound.md b/doc/lua/openstarbound.md index d520705..4d948bf 100644 --- a/doc/lua/openstarbound.md +++ b/doc/lua/openstarbound.md @@ -78,9 +78,11 @@ With metadata: Returns a table, key/value being source path/metadata. #### `Image` root.assetImage(`String` image) -#### `Json` root.assetFrames(`String` path) +Returns an image. -*TODO* +#### `Json` root.assetFrames(`String` imagePath) + +Returns an array containing a `file` (the frames file used for the image) and `frames` (the frame data of the image). #### `JsonArray` root.assetPatches(`String` asset) @@ -132,7 +134,7 @@ Sets the HUD's visibility. Returns the HUD's visibility. #### `PaneId` interface.bindRegisteredPane(`string` paneName) -Binds a registered pane (defined in `/source/frontend/StarMainInterfaceTypes`) to a Lua value, which can then call functions on that pane. +Binds a registered pane (defined in `/source/frontend/StarMainInterfaceTypes`) to a Lua value, which can then call widget functions on that pane.
Panes EscapeDialog
Inventory
@@ -171,6 +173,74 @@ TODO Returns the scale used for interfaces. +--- + +# World + +The world table now contains extra bindings. + +--- + +#### `bool` world.isServer() + +Returns whether the script is running on the server or client. + +--- + +#### `bool` world.isClient() + +Returns whether the script is running on the server or client. + +--- + +The following additional world bindings are available only for scripts running on the client. + +--- + +#### `entityId` world.mainPlayer() + +Returns the entity ID of the player hosting the world. + +--- + +#### `Vec2F` world.entityAimPosition(`entityId` entityId) + +Returns the current cursor aim position of the specified entity. + +--- + +#### `bool` world.inWorld() + +Returns whether any players are in the world. + +--- + +The following additional world bindings are available only for scripts running on the server. + +--- + +#### `void` world.setExpiryTime(`float` expiryTime) + +Sets the amount of time to persist a ephemeral world when it is inactive. + +--- + +#### `string` world.id() + +Returns a `String` representation of the world's id. + +--- + +#### `?` world.callScriptContext(`?` ?) + +TODO + +--- + +#### `?` world.sendPacket(`?` ?) + +? + --- # Player @@ -490,3 +560,7 @@ teleportIn
teleportOut
--- + +#### `List` player.teamMembers() + +Returns an array, each entry being a table with `name`, `uuid`, `entity`, `healthPercentage` and `energyPercentage`