diff --git a/docs/img/previews/ar_controller.png b/docs/img/previews/ar_controller.png deleted file mode 100644 index bfe42da1..00000000 Binary files a/docs/img/previews/ar_controller.png and /dev/null differ diff --git a/docs/img/previews/ar_goggles.png b/docs/img/previews/ar_goggles.png deleted file mode 100644 index 2fe13a32..00000000 Binary files a/docs/img/previews/ar_goggles.png and /dev/null differ diff --git a/docs/integrations/ae2/cable_p2p_tunnel.md b/docs/integrations/ae2/cable_p2p_tunnel.md new file mode 100644 index 00000000..5d58deb3 --- /dev/null +++ b/docs/integrations/ae2/cable_p2p_tunnel.md @@ -0,0 +1,12 @@ +--- +comments: true +--- + +# Cable P2P Tunnel + +!!! picture inline end + ![!Images of Cable P2P Tunnel](../img/previews/cable_p2p_tunnel.png){ align=right } + +Cable P2P Tunnel is created by right clicking a P2P tunnel with CC: Tweaked's cable or wired modems. +It allows you control peripherals wirely across dimensions. +The in and out direction does not matter when connecting. diff --git a/docs/items/ar_goggles.md b/docs/items/ar_goggles.md deleted file mode 100644 index 3144567e..00000000 --- a/docs/items/ar_goggles.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -comments: true ---- - -# AR Goggles - -!!! picture inline end - ![!Image of the AR Goggles item](../img/previews/ar_goggles.png){ align=right } - -The AR Goggles can be used in combination with the AR Controller to have a customizable overlay wherever you go. Fun! -See the documenation for the [AR Controller](../peripherals/ar_controller.md) to learn more. - -!!! hint - To link your goggles to an AR Controller, right click it with them in your hand. Multiple Goggles can be linked to one Controller. - -!!! bug - The AR Goggles are slightly buggy in 1.18x and completely disabled in 1.19x. We work on a rework of the AR Goggles system with a bunch of new features for 0.8/1.0 - ---- - -## Changelog/Trivia - -**0.5b** -Added the AR Controller and AR Goggles, made by Olfi01#6413 diff --git a/docs/items/smart_glasses.md b/docs/items/smart_glasses.md new file mode 100644 index 00000000..7e7f4b9a --- /dev/null +++ b/docs/items/smart_glasses.md @@ -0,0 +1,23 @@ +--- +comments: true +--- + +# Smart Glasses + +!!! picture inline end + ![!Image of the Smart Glasses item](../img/previews/smart_glasses.png){ align=right } + +The Smart Glasses can be used as an advanced pocket computer worn on the head, +equipped with most peripherials and various [modules](../modules)! + +You can access Smart Glasses worn on the head via a [Smart Glasses Interface](./smart_glasses_interface.md). + +--- + +## Changelog/Trivia + +**0.8** +Completely reworked AR Goggles and renamed it to Smart Glasses + +**0.5b** +Added the AR Controller and AR Goggles, made by Olfi01#6413 diff --git a/docs/items/smart_glasses_interface.md b/docs/items/smart_glasses_interface.md new file mode 100644 index 00000000..d2142f09 --- /dev/null +++ b/docs/items/smart_glasses_interface.md @@ -0,0 +1,17 @@ +--- +comments: true +--- + +# Smart Glasses Interface + +!!! picture inline end + ![!Image of the Smart Glasses Interface item](../img/previews/smart_glasses_interface.png){ align=right } + +The Smart Glasses Interface let you access wearing [Smart Glasses](./smart_glasses.md) by righting the item. + +--- + +## Changelog/Trivia + +**0.8** +Completely reworked AR Goggles and renamed it to Smart Glasses diff --git a/docs/modules/hotkey.md b/docs/modules/hotkey.md new file mode 100644 index 00000000..7d30b463 --- /dev/null +++ b/docs/modules/hotkey.md @@ -0,0 +1,34 @@ +--- +comments: true +--- + +# Hotkey Module + +!!! picture inline end + ![!Image of the Hotkey Module item](../img/previews/modules/hotkey_module.png){ align=right } + +The Hotkey Module can listen to the hotkey that players bound in their client. +Hotkey is configurable at player's client. + +--- + +## Events + +### glasses_key_pressed + +Fires when the player pressed the hotkey. +**Values:** +1. `keyBind: string` The hotkey the player bound to. +2. `keyPressDuration: number` The duration the hotkey was held down, in milliseconds. + +```lua linenums="1" +local event, keyBind, keyPressDuration = os.pullEvent("glasses_key_pressed") +print("The hotkey " .. keyBind .. " pressed for " .. keyPressDuration .. "ms") +``` + +--- + +## Changelog/Trivia + +**0.8** +Added Hotkey Module diff --git a/docs/modules/night_vision.md b/docs/modules/night_vision.md new file mode 100644 index 00000000..8626959b --- /dev/null +++ b/docs/modules/night_vision.md @@ -0,0 +1,40 @@ +--- +comments: true +--- + +# Night Vision Module + +!!! picture inline end + ![!Image of the Night Vision Module item](../img/previews/modules/night_vision_module.png){ align=right } + +The Night Vision Module can provide an infinite night vision effect to the wearer. +The night vision effect will be enabled by default. + +While Night Vision Module is disabled, night vision potion does not take any effect. + +--- + +## Functions + +### isNightVisionEnabled +``` +isNightVisionEnabled() -> boolean +``` + +Returns if the night vision effect is enabled. + +--- + +### enableNightVision +``` +enableNightVision(enable: boolean) -> nil +``` + +If passed value is `true`, it will start applying night vision effect, `false` to start clearing any night vision effect. + +--- + +## Changelog/Trivia + +**0.8** +Added Night Vision Module diff --git a/docs/modules/overlay.md b/docs/modules/overlay.md new file mode 100644 index 00000000..b260ef95 --- /dev/null +++ b/docs/modules/overlay.md @@ -0,0 +1,310 @@ +--- +comments: true +--- + +# Overlay Module + +!!! picture inline end + ![!Image of the Overlay Module item](../img/previews/modules/overlay_module.png){ align=right } + +The Overlay Module allows scripts render stuff on player's GUI. + +--- + +## Objects + +### OverlayObject + +#### getId +``` +getId() -> number +``` + +returns the object's integer ID. + +#### setEnabled +``` +setEnabled(enable: boolean) -> nil +``` + +set whether or not to render the object. + +#### isEnabled +``` +isEnabled() -> boolean +``` + +returns whether or not the object is rendering. + +--- + +### RenderableObject + +Based on [OverlayObject](#OverlayObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `opacity` | `number` | `1` | A decimal number that determines the transparency of the object, in range of \[0.0, 1.0\] | +| `color` | `number` | `0xffffff` | An integer that determines the color of the object, in format of 0xRRGGBB | +| `x` | `number` | `0` | Integer of object's X position, in range of \[-32767, 32767\] | +| `y` | `number` | `0` | Integer of object's Y position, in range of \[-32767, 32767\] | +| `z` | `number` | `0` | Integer of object's Z position, in range of \[-32767, 32767\] | +| `maxX` | `number` | `0` | Integer of object's maximum X position, in range of \[-32767, 32767\] | +| `maxY` | `number` | `0` | Integer of object's maximum Y position, in range of \[-32767, 32767\] | +| `maxZ` | `number` | `0` | Integer of object's maximum Z position, in range of \[-32767, 32767\] | + +--- + +### RectangleObject + +Based on [RenderableObject](#RenderableObject) + +--- + +### CircleObject + +Based on [RenderableObject](#RenderableObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `radius` | `number` | `0` | Integer of the circle's radius, in range of \[-32767, 32767\] | + +--- + +### TextObject + +Based on [RenderableObject](#RenderableObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `content` | `string` | `""` | The text to render | +| `fontSize` | `number` | `1` | A decimal number represents the text's font size, in range of \[0.0, 128.0\] | +| `shadow` | `boolean` | `false` | Whether or not render a shadow for the text | + +--- + +### ItemObject + +Based on [RenderableObject](#RenderableObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `id` | `string` | `"minecraft:air"` | The registry ID of the item to render | + +--- + +### ThreeDimensionalObject + +Based on [RenderableObject](#RenderableObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `disableDepthTest` | `boolean` | `false` | If `true`, the block will not hidden behind other objects, `false` otherwise | +| `disableCulling` | `boolean` | `false` | If `true`, the block will not hidden faces cannot be seen, `false` otherwise | +| `xRot` | `number` | `0` | A decimal number determine the degrees the block rotates on the X-axis, in range of \[0, 360\] | +| `yRot` | `number` | `0` | A decimal number determine the degrees the block rotates on the Y-axis, in range of \[0, 360\] | +| `zRot` | `number` | `0` | A decimal number determine the degrees the block rotates on the Z-axis, in range of \[0, 360\] | + +--- + +### BlockObject + +Based on [ThreeDimensionalObject](#ThreeDimensionalObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `block` | `string` | `"minecraft:air"` | The registry ID of the block to render | + +--- + +### BoxObject + +Based on [ThreeDimensionalObject](#ThreeDimensionalObject) + +--- + +### SphereObject + +Based on [ThreeDimensionalObject](#ThreeDimensionalObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `sectors` | `number` | `16` | An integer in range of \[1, 1024\] | +| `stacks` | `number` | `16` | An integer in range of \[1, 1024\] | +| `radius` | `number` | `1` | A decimal number of the sphere's radius, in range of \(0, 128\] | + +--- + +### TorusObject + +Based on [ThreeDimensionalObject](#ThreeDimensionalObject) + +| Field | Type | Default Value | Description | +| ----- | ---- | ------------- | ----------- | +| `sides` | `number` | `32` | An integer in range of \[1, 1024\] | +| `rings` | `number` | `16` | An integer in range of \[1, 1024\] | +| `minorRadius` | `number` | `0.1` | A decimal number of inner radius of the ring, in range of \(0, 128\] | +| `majorRadius` | `number` | `0.5` | A decimal number of outer radius of the ring, in range of \(0, 128\] | + +--- + +## Functions + +### createRectangle +``` +createRectangle(object: table) -> table, "SUCCESS" +``` + +`object` is a [RectangleObject](#RectangleObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createCircle +``` +createCircle(object: table) -> table, "SUCCESS" +``` + +`object` is a [CircleObject](#CircleObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createText +``` +createText(object: table) -> table, "SUCCESS" +``` + +`object` is a [TextObject](#TextObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createItem +``` +createItem(object: table) -> table, "SUCCESS" +``` + +`object` is a [ItemObject](#ItemObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createBlock +``` +createBlock(object: table) -> table, "SUCCESS" +``` + +`object` is a [BlockObject](#BlockObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createBox +``` +createBox(object: table) -> table, "SUCCESS" +``` + +`object` is a [BoxObject](#BoxObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createSphere +``` +createSphere(object: table) -> table, "SUCCESS" +``` + +`object` is a [SphereObject](#SphereObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### createTorus +``` +createTorus(object: table) -> table, "SUCCESS" +``` + +`object` is a [TorusObject](#TorusObject) + +returns a copy of the `object` with getters & setters to change its properties. + +--- + +### getObject +``` +getObject(id: number) -> table | nil +``` + +returns a [RenderableObject](#RenderableObject) by the object's ID, or `nil` if the ID not exists. + +--- + +### clear +``` +clear() -> number +``` + +remove all objects, returns the number of removed object. + +--- + +### getObjectsSize +``` +getObjectsSize() -> number +``` + +returns the number of all objects. + +--- + +### getSize +``` +getSize() -> number, number +``` + +returns the client's width and height + +--- + +### getCoords +``` +getCoords() -> number, number, number +``` + +returns the player's eye position + +--- + +### update +``` +update() -> number +``` + +update objects, returns the number of updated object. + +--- + +### autoUpdate +``` +autoUpdate(value: boolean | nil) -> boolean +``` + +set auto update and returns if the objects will be auto updated. + +If the value is a boolean, the auto update flag will set to that value. +If the value is not presented (aka `nil`), the auto update flag will stay unchanged + +--- + +## Changelog/Trivia + +**0.8** +Added Overlay Module diff --git a/docs/peripherals/ar_controller.md b/docs/peripherals/ar_controller.md deleted file mode 100644 index b019fd60..00000000 --- a/docs/peripherals/ar_controller.md +++ /dev/null @@ -1,312 +0,0 @@ ---- -comments: true ---- - -# AR Controller - -!!! picture inline end - ![!Image of the AR Controller block](../img/previews/ar_controller.png){ align=right } - -The AR Controller is used to control your [AR Goggles](../items/ar_goggles.md) wirelessly. You can draw anything you wish into an overlay that will be visible as long as you're wearing the goggles. - -!!! hint - To link your goggles to an AR Controller, right click it with them in your hand. Multiple Goggles can be linked to one Controller. - -!!! bug - The AR Goggles are currently slightly buggy. Sometimes, they just don't do what they should do. We will rework the AR System in 0.8r/1.0r - ---- - -
- -| Peripheral Name | Interfaces with | Has events | Introduced in | -| --------------- | --------------- | ---------- | ------------- | -| arController | AR Goggles | No | 0.5b | - -
- ---- - -While the Controller is in relative mode, it interprets all coordinates as if they were on a virtual screen of the size you specified, and then scales them according to your screen size. - -All color values are hexadecimal color codes (for example `0xff00ff`) - -Everything that is painted onto the canvas remains there until `clear()` or if the element is removed using `clearElement(id)`, however, it might be repositioned if relative mode is toggled on or off. - -## Functions - -### clear -``` -clear() -> void -``` - -Clears the entire canvas. - ---- - -### clearElement -``` -clearElement(id: string) -> void -``` - -Clears the element with the given `id`. - ---- - -### horizontalLine -``` -horizontalLine(minX: number, maxX: number, y: number, color: number) -> void -``` - -Draws a horizontal line in the given color from minX to maxX at vertical y. - ---- - -### horizontalLineWithId -``` -horizontalLineWithId(id: string, minX: number, maxX: number, y: number, color: number) -> void -``` - -The same as [`horizontalLine()`](#horizontalline), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### verticalLine -``` -verticalLine(x: number, minY: number, maxY: number, color: number) -> void -``` - -Draws a vertical line in the given color from minY to maxY at horizontal x. - ---- - -### verticalLineWithId -``` -verticalLineWithId(id: string, x: number, minY: number, maxY: number, color: number) -> void -``` - -The same as [`verticalLine()`](#verticalline), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### drawString -``` -drawString(text: string, x: number, y: number, color: number) -> void -``` - -Draws the given string to the specified position with the specified text color. - ---- - -### drawStringWithId -``` -drawStringWithId(id: string, text: string, x: number, y: number, color: number) -> void -``` - -The same as [`drawString()`](#drawstring), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### drawCenteredString -``` -drawCenteredString(text: string, x: number, y: number, color: number) -> void -``` - -The same as [`drawString()`](#drawstring), but centers the string horizontally around the specified position. - ---- - -### drawCenteredStringWithId -``` -drawCenteredStringWithId(id: string, text: string, x: number, y: number, color: number) -> void -``` - -The same as [`drawCenteredString()`](#drawcenteredstring), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### drawRightboundString -``` -drawRightboundString(text: string, x: number, y: number, color: number) -> void -``` - -The same as [`drawString()`](#drawstring), but the string is positioned with its right end at the specified position. - ---- - -### drawRightboundStringWithId -``` -drawRightboundStringWithId(id: string, text: string, x: number, y: number, color: number) -> void -``` - -The same as [`drawRightboundString()`](#drawrightboundstring), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### drawItemIcon -``` -drawItemIcon(itemId: string, x: number, y: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -Draws the given item to the specified position. - ---- - -### drawItemIconWithId -``` -drawItemIconWithId(id: string, itemId: string, x: number, y: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -The same as [`drawItemIcon()`](#drawitemicon), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### drawCircle -``` -drawCircle(x: number, y: number, radius: number, color: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -Draws a circle without filling it. - ---- - -### drawCircleWithId -``` -drawCircleWithId(id: string, x: number, y: number, radius: number, color: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -The same as [`drawCircle()`](#drawcircle), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### fill -``` -fill(minX: number, minY: number, maxX: number, maxY: number, color: number) -``` - -Fills a rectangle with the given color from the corner minX, minY to maxX, maxY. - ---- - -### fillWithId -``` -fill(id: string, minX: number, minY: number, maxX: number, maxY: number, color: number) -``` - -The same as [`fill()`](#fill), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### fillCircle -``` -fillCircle(x: number, y: number, radius: number, color: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -Draws a full circle. - ---- - -### fillCircleWithId -``` -fillCircleWithId(id: string, x: number, y: number, radius: number, color: number) -> void -``` - -!!! success "Added in version 0.5.2b" - -The same as [`fillCircle()`](#fillcircle), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### fillGradient -``` -fillGradient(minX: number, minY: number, maxX: number, maxY: number, colorFrom: number, colorTo: number) -> void -``` - -Draws a rectangular gradient from colorFrom to colorTo with the given corners. - ---- - -### fillGradientWithId -``` -fillGradientWithId(id: string, minX: number, minY: number, maxX: number, maxY: number, colorFrom: number, colorTo: number) -> void -``` - -The same as [`fillGradient()`](#fillgradient), but has an id so it can be overridden later on or can be completely cleared. - ---- - -### isRelativeMode -``` -isRelativeMode(): true, number, number | false -``` - -Returns true and the size of the virtual screen if relative mode is active, or just false if it isn't. - ---- - -### setRelativeMode -``` -setRelativeMode(enabled: boolean, virtualScreenWidth?: number, virtualScreenHeight?: number) -> void -``` - -Activates or deactivates relative mode. Requires virtual screen width and height if it is being enabled. - ---- - -!!! hint - Use negative coordinates to specify an x value from the right end of the screen or a y value from the bottom! - -## Examples - -### Example 1 - -Olfi01 made a simple script that shows the current date and time in the top right corner of the screen and updates every second. - -```lua linenums="1" -local controller = peripheral.find("arController") -- Finds the peripheral if one is connected - -if controller == nil then error("arController not found") end - -controller.setRelativeMode(true, 1600, 900) -- Convenient Aspect ratio for most screens -while true do - local timer = os.startTimer(1) - local event, id - repeat - event, id = os.pullEvent("timer") - until id == timer - controller.clear() -- If you don't do this, the texts will draw over each other - controller.drawRightboundString(os.date(), -10, 10, 0xffffff) -end -``` - -### Example 2 - -Olfi01 made another script to draw .nfp files, which you can draw with the paint program, in cc in your HUD. - -First, we have a script with more adaptability. You can define x, y, width and height. - -Script 1: [Github](https://gist.github.com/Seniorendi/ce4971245b20fb031ca9b65ec4fcb4d0) - -And we have another script which depends on the script above, but is simpler to use. - -Script 2: [Github](https://gist.github.com/Seniorendi/954e9888fac01efe8f23e82d0ae06e92) - ---- - -## Changelog/Trivia - -**0.5.2b** -Added `fillCircle`, `drawCircle` and `drawItemIcon`. - -**0.5b** -Added the AR Controller and Goggles, made by Olfi01#6413 diff --git a/docs/peripherals/environment_detector.md b/docs/peripherals/environment_detector.md index c72274ba..b5bb04a7 100644 --- a/docs/peripherals/environment_detector.md +++ b/docs/peripherals/environment_detector.md @@ -264,8 +264,8 @@ Returns a table with all of the registered dimensions for the current world, thi scanEntities(range: number) -> table ``` -Returns a table with all entities in the given range -Coordinates are relativ and not absolute +Returns a table with all entities in the given range. +Coordinates are relative and not absolute. !!! example Example output for an entity: @@ -288,9 +288,40 @@ Coordinates are relativ and not absolute } ``` +--- + +### scanShips + +``` +scanShips(range: number) -> table +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Returns a table with all ships in the given range. +Coordinates are relative and not absolute. + +--- + +### scanShipCost + +``` +scanShipCost(range: number) -> number +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Returns the estimated cost to scan ships in the given range. + +--- ## Changelog/Trivia +**0.8** +Added vs2 integration `scanShips`, `scanShipCost`. + **0.6.5b** Added `getRadiationRaw` diff --git a/docs/turtles/metaphysics/end_automata.md b/docs/turtles/metaphysics/end_automata.md index 3102eeba..96e4e440 100644 --- a/docs/turtles/metaphysics/end_automata.md +++ b/docs/turtles/metaphysics/end_automata.md @@ -72,6 +72,15 @@ Returns true if the location is successfully saved, or nil and an error message. --- +### deletePoint +``` +deletePoint(name: string) -> true | nil, string +``` +Delete a saved warp point with the given `name`. +Returns true if the warp point exists and is successfully removed, or nil and an error message. + +--- + ### distanceToPoint ``` distanceToPoint(name: string) -> number | nil, string @@ -105,7 +114,38 @@ Returns true if the turtle is successfully teleported or nil and an error messag --- +### portalShipPrepare +``` +portalShipPrepare(direction: string | nil) -> table | nil, string +``` +Prepare to cross a portal. +Direction includes `up`, `top`, `down`, `bottom`, and `front` (default). +If a portal is detected, a table with target dimension's information will be returns. Or nil and an error message. + +| Field | Type | Description | +| ---------- | --------- | ----------- | +| `name` | `string` | Target dimension's ID | +| `pos` | `string` | Position after teleport | +| `facing` | `string` | Facing direction after teleport | +| `costs` | `number` | Costs to active teleport | +| `canSpawn` | `boolean` | `true` if the destination is not blocked so turtle can perform the teleport, `false` otherwise. | +| `shipId` | `string` | The teleport id, uses in `portalShipActive` | + +--- + +### portalShipActive +``` +portalShipActive(shipId: string) -> true | nil, string +``` +Active a portal and teleport through it. +Can only be invoked in a short period after `portalShipPrepare` returns the `shipId`. + +--- + ## Changelog/Trivia +**0.8** +Added cross portal ability to end automata. + **0.7r** Added the End Automata diff --git a/docs/turtles/metaphysics/weak_automata.md b/docs/turtles/metaphysics/weak_automata.md index 23e839d8..de455c7f 100644 --- a/docs/turtles/metaphysics/weak_automata.md +++ b/docs/turtles/metaphysics/weak_automata.md @@ -215,8 +215,60 @@ Returns true if it successfully placed block or nil and an error message. --- +### isOnShip +``` +isOnShip() -> boolean +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Returns `true` if turtle is on an assembled ship, `false` otherwise. + +--- + +### getCurrentShip +``` +getCurrentShip() -> table | nil +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Returns a table contains current ship's information, or `nil` if the turtle is not on a ship. + +--- + +### canMountToShip +``` +canMountToShip() -> table | nil +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Returns a table contains mountable ships' slugs, or `nil` if no ship is found. + +--- + +### mountToShip +``` +mountToShip(slug: string | nil) -> true | false, string +``` + +!!! warning "Requirement" + Requires Valkyrien Skies to be installed. + +Mount to a ship with given slug. Or chose a random one if no slug is provided. +Returns `true` if mount is succeed. Or `false` and an error message. + +--- + ## Changelog/Trivia +**0.8** +Added vs2 integration `isOnShip`, `getCurrentShip`, `canMountToShip`, and `mountToShip`. + **0.7.36r** Added `placeBlock` method for accure placement. diff --git a/mkdocs.yml b/mkdocs.yml index 98e997c2..ef45eb2b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,7 +19,6 @@ nav: - 'Block Reader': 'peripherals/block_reader.md' - 'Geo Scanner': 'peripherals/geo_scanner.md' - 'Redstone Integrator': 'peripherals/redstone_integrator.md' - - 'AR Controller': 'peripherals/ar_controller.md' - 'ME Bridge': 'peripherals/me_bridge.md' - 'RS Bridge': 'peripherals/rs_bridge.md' - 'Colony Integrator': 'peripherals/colony_integrator.md' @@ -35,17 +34,24 @@ nav: - 'Husbandry Automata': 'turtles/metaphysics/husbandry_automata.md' - 'End Automata': 'turtles/metaphysics/end_automata.md' - 'Overpowered Automata': 'turtles/metaphysics/overpowered_automata.md' + - 'Modules': + - 'Hotkey Module': 'modules/hotkey.md' + - 'Night Vision Module': 'modules/night_vision.md' + - 'Overlay Module': 'modules/overlay.md' - 'Items': - - 'AR Goggles': 'items/ar_goggles.md' - 'Chunk Controller': 'items/chunk_controller.md' - 'Computer Tool': 'items/computer_tool.md' - 'Memory Card': 'items/memory_card.md' - 'Pocket Computers': 'items/pocket_computer.md' + - 'Smart Glasses': 'items/smart_glasses.md' + - 'Smart Glasses Interface': 'items/smart_glasses_interface.md' - 'Mod Integrations': - 'integrations/index.md' - 'Minecraft': - 'Beacon': 'integrations/minecraft/beacon.md' - 'Note Block': 'integrations/minecraft/noteblock.md' + - 'Applied Energistics': + - 'Cable P2P Tunnel': 'integrations/ae2/cable_p2p_tunnel.md' - 'Botania': - 'Flowers': 'integrations/botania/flowers.md' - 'Mana Pool': 'integrations/botania/pool.md' @@ -56,15 +62,6 @@ nav: - 'Fluid Tank': 'integrations/create/fluidtank.md' - 'Mechanical Mixer': 'integrations/create/mechanicalmixer.md' - 'Blocks with Scroll Behaviour': 'integrations/create/scrollbehaviour.md' - - 'Draconic Evolution': - - 'integrations/draconic_evolution/index.md' - - 'Immersive Engineering': - - 'Redstone Wire Connector': 'integrations/immersive_engineering/connector.md' - - 'Redstone Probe': 'integrations/immersive_engineering/probe.md' - - 'Integrated Dynamics': - - 'Variable Store': 'integrations/integrated_dynamics/variable_store.md' - - 'Mekanism': - - 'integrations/mekanism/index.md' - 'Powah': - 'Energy cell': 'integrations/powah/energy_cell.md' - 'Furnator': 'integrations/powah/furnator.md' @@ -72,8 +69,6 @@ nav: - 'Reactor': 'integrations/powah/reactor.md' - 'Solar panel': 'integrations/powah/solar_panel.md' - 'Thermo generator': 'integrations/powah/thermo_generator.md' - - 'Storage Drawers': - - 'Drawer': 'integrations/storage_drawers/drawer.md' - 'Changelogs': - 'Changelog 0.7.24r': 'changelogs/0.7.24r.md' - 'Changelog 0.7r': 'changelogs/0.7r.md'