From 6dd60ae94e8c96bbacc98b5345d22184c5cc2021 Mon Sep 17 00:00:00 2001 From: scmcgowen Date: Fri, 17 Jan 2025 20:22:51 -0800 Subject: [PATCH 1/4] Add updateBlock to Weak Automata --- docs/turtles/metaphysics/weak_automata.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/turtles/metaphysics/weak_automata.md b/docs/turtles/metaphysics/weak_automata.md index 68aeb9f5..2acd9148 100644 --- a/docs/turtles/metaphysics/weak_automata.md +++ b/docs/turtles/metaphysics/weak_automata.md @@ -111,7 +111,7 @@ Returns a table containing information about the entity infront of the turtle or ### digBlock ``` -digBlock(options: table | nil) -> true | nil, string +digBlock(options: table | nil) -> boolean, string ``` Tries to dig the block that the turtle is looking at with the current item. It returns true if it successfully mines the block or nil and an error message. @@ -127,7 +127,7 @@ Tries to dig the block that the turtle is looking at with the current item. It r ### useOnBlock ``` -useOnBlock(options: table | nil) -> true | nil, string +useOnBlock(options: table | nil) -> boolean, string ``` Tries to interact with the block that the turtle is looking at with the current item. It returns true if it successfully interacts with the block or nil and an error message. @@ -141,6 +141,22 @@ Tries to interact with the block that the turtle is looking at with the current --- +### updateBlock +``` +updateBlock(options: table) -> boolean, string +``` +Tries to update the text of the sign that the turtle is looking at with the `options.text` property + +#### `options` properties + +| name | type | Description | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | +| text | `string` | The text to apply to the sign | + +--- + ### scanItems ``` scanItems() -> table | nil, string From 09c023afd68d9440be9daf720dd2eb384486c31f Mon Sep 17 00:00:00 2001 From: scmcgowen Date: Fri, 17 Jan 2025 20:24:10 -0800 Subject: [PATCH 2/4] Add options for the look at methods --- docs/turtles/metaphysics/weak_automata.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/turtles/metaphysics/weak_automata.md b/docs/turtles/metaphysics/weak_automata.md index 2acd9148..ebde1f30 100644 --- a/docs/turtles/metaphysics/weak_automata.md +++ b/docs/turtles/metaphysics/weak_automata.md @@ -95,18 +95,33 @@ Returns the configuration values for this automata. ### lookAtBlock ``` -lookAtBlock() -> table | nil, string +lookAtBlock(options: table) -> table | nil, string ``` Returns a table containing information about the block infront of the turtle or if the operation fails it will return nil and an error message. +#### `options` properties + +| name | type | Description | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | + --- ### lookAtEntity ``` -lookAtEntity() -> table | nil, string +lookAtEntity(options: table) -> table | nil, string ``` Returns a table containing information about the entity infront of the turtle or if the operation fails it will return nil and an error message. + +#### `options` properties + +| name | type | Description | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | + --- ### digBlock From 364b12c424f27130300ec647f430b8508c0acbf6 Mon Sep 17 00:00:00 2001 From: scmcgowen Date: Fri, 17 Jan 2025 20:33:16 -0800 Subject: [PATCH 3/4] Make options show as optional --- docs/turtles/metaphysics/weak_automata.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/turtles/metaphysics/weak_automata.md b/docs/turtles/metaphysics/weak_automata.md index ebde1f30..9ca577aa 100644 --- a/docs/turtles/metaphysics/weak_automata.md +++ b/docs/turtles/metaphysics/weak_automata.md @@ -95,7 +95,7 @@ Returns the configuration values for this automata. ### lookAtBlock ``` -lookAtBlock(options: table) -> table | nil, string +lookAtBlock(options: table | nil) -> table | nil, string ``` Returns a table containing information about the block infront of the turtle or if the operation fails it will return nil and an error message. @@ -110,7 +110,7 @@ Returns a table containing information about the block infront of the turtle or ### lookAtEntity ``` -lookAtEntity(options: table) -> table | nil, string +lookAtEntity(options: table | nil) -> table | nil, string ``` Returns a table containing information about the entity infront of the turtle or if the operation fails it will return nil and an error message. From 84579c7ba75b0eba76baea3b2c37cdd04dfe6ece Mon Sep 17 00:00:00 2001 From: scmcgowen Date: Fri, 17 Jan 2025 20:42:46 -0800 Subject: [PATCH 4/4] Add Default column --- docs/turtles/metaphysics/weak_automata.md | 66 +++++++++++------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/turtles/metaphysics/weak_automata.md b/docs/turtles/metaphysics/weak_automata.md index 9ca577aa..eda9339c 100644 --- a/docs/turtles/metaphysics/weak_automata.md +++ b/docs/turtles/metaphysics/weak_automata.md @@ -101,10 +101,10 @@ Returns a table containing information about the block infront of the turtle or #### `options` properties -| name | type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------ | -| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | -| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | +| name | type | Description | Default | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` | --- @@ -117,10 +117,10 @@ Returns a table containing information about the entity infront of the turtle or #### `options` properties -| name | type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------ | -| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | -| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | +| name | type | Description | Default | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` | --- @@ -132,11 +132,11 @@ Tries to dig the block that the turtle is looking at with the current item. It r #### `options` properties -| name | type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------ | -| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | -| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | -| sneak | `boolean | nil` | Sneak while digging (default `false`) | +| name | type | Description | Default | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` | +| sneak | `boolean | nil` | Sneak while digging (default `false`) | `false` | --- @@ -148,11 +148,11 @@ Tries to interact with the block that the turtle is looking at with the current #### `options` properties -| name | type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------ | -| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | -| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | -| sneak | `boolean | nil` | Sneak while using (default `false`) | +| name | type | Description | Default | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` | +| sneak | `boolean | nil` | Sneak while using (default `false`) | `false` | --- @@ -164,11 +164,11 @@ Tries to update the text of the sign that the turtle is looking at with the `opt #### `options` properties -| name | type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------ | -| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) | -| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) | -| text | `string` | The text to apply to the sign | +| name | type | Description | Default | +| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- | +| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` | +| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` | +| text | `string` | The text to apply to the sign | | --- @@ -229,16 +229,16 @@ Returns true if it successfully placed block or nil and an error message. #### `options` properties -| name | type | Description | -| -------- | -------------- | ----------------------------------------------------------------- | -| x | `number | nil` | The x offset relative to the turtle (default: `0`) | -| y | `number | nil` | The y offset relative to the turtle (default: `0`) | -| z | `number | nil` | The z offset relative to the turtle (default: `0`) | -| anchor | `string | nil` | The direction the block should anchor (default: turtle's forward) | -| front | `string | nil` | The direction the block should facing (default: same as `anchor`) | -| top | `string | nil` | The direction the top of block should facing (default: `"up"`) | -| text | `string | nil` | the text going to write on the sign's front side | -| backText | `string | nil` | the text going to write on the sign's back side | +| name | type | Description | Default | +| -------- | -------------- | ----------------------------------------------------------------- | -------------------- | +| x | `number | nil` | The x offset relative to the turtle | `0` | +| y | `number | nil` | The y offset relative to the turtle | `0` | +| z | `number | nil` | The z offset relative to the turtle | `0` | +| anchor | `string | nil` | The direction the block should anchor | Turtle's forward | +| front | `string | nil` | The direction the block should facing | same as `anchor` | +| top | `string | nil` | The direction the top of block should facing | `"up"` | +| text | `string | nil` | the text going to write on the sign's front side | | +| backText | `string | nil` | the text going to write on the sign's back side | | ---