Skip to content

Commit f3aec9b

Browse files
authored
Merge pull request #97 from scmcgowen/0.8
Update weak automata documention for 0.8
2 parents 4532c28 + 84579c7 commit f3aec9b

1 file changed

Lines changed: 55 additions & 24 deletions

File tree

docs/turtles/metaphysics/weak_automata.md

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,49 +99,80 @@ Returns the configuration values for this automata.
9999

100100
### lookAtBlock
101101
```
102-
lookAtBlock() -> table | nil, string
102+
lookAtBlock(options: table | nil) -> table | nil, string
103103
```
104104
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.
105105

106+
#### `options` properties
107+
108+
| name | type | Description | Default |
109+
| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- |
110+
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` |
111+
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` |
112+
106113
---
107114

108115
### lookAtEntity
109116
```
110-
lookAtEntity() -> table | nil, string
117+
lookAtEntity(options: table | nil) -> table | nil, string
111118
```
112119
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.
113120

121+
122+
#### `options` properties
123+
124+
| name | type | Description | Default |
125+
| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- |
126+
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` |
127+
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` |
128+
114129
---
115130

116131
### digBlock
117132
```
118-
digBlock(options: table | nil) -> true | nil, string
133+
digBlock(options: table | nil) -> boolean, string
119134
```
120135
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.
121136

122137
#### `options` properties
123138

124-
| name | type | Description |
125-
| ----- | --------------- | ------------------------------------------------------------------------------------------------ |
126-
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) |
127-
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) |
128-
| sneak | `boolean | nil` | Sneak while digging (default `false`) |
139+
| name | type | Description | Default |
140+
| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- |
141+
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` |
142+
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` |
143+
| sneak | `boolean | nil` | Sneak while digging (default `false`) | `false` |
129144

130145
---
131146

132147
### useOnBlock
133148
```
134-
useOnBlock(options: table | nil) -> true | nil, string
149+
useOnBlock(options: table | nil) -> boolean, string
135150
```
136151
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.
137152

138153
#### `options` properties
139154

140-
| name | type | Description |
141-
| ----- | --------------- | ------------------------------------------------------------------------------------------------ |
142-
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right (default: `0`) |
143-
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down (default: `0`) |
144-
| sneak | `boolean | nil` | Sneak while using (default `false`) |
155+
| name | type | Description | Default |
156+
| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- |
157+
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` |
158+
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` |
159+
| sneak | `boolean | nil` | Sneak while using (default `false`) | `false` |
160+
161+
---
162+
163+
### updateBlock
164+
```
165+
updateBlock(options: table) -> boolean, string
166+
```
167+
Tries to update the text of the sign that the turtle is looking at with the `options.text` property
168+
169+
#### `options` properties
170+
171+
| name | type | Description | Default |
172+
| ----- | --------------- | ------------------------------------------------------------------------------------------------ | ------- |
173+
| pitch | `number | nil` | Relative pitch degrees, negative means to turn left, positive means to turn right | `0` |
174+
| yaw | `number | nil` | Relative yaw degrees, negative means to look up, positive means to look down | `0` |
175+
| text | `string` | The text to apply to the sign | |
145176

146177
---
147178

@@ -202,16 +233,16 @@ Returns true if it successfully placed block or nil and an error message.
202233

203234
#### `options` properties
204235

205-
| name | type | Description |
206-
| -------- | -------------- | ----------------------------------------------------------------- |
207-
| x | `number | nil` | The x offset relative to the turtle (default: `0`) |
208-
| y | `number | nil` | The y offset relative to the turtle (default: `0`) |
209-
| z | `number | nil` | The z offset relative to the turtle (default: `0`) |
210-
| anchor | `string | nil` | The direction the block should anchor (default: turtle's forward) |
211-
| front | `string | nil` | The direction the block should facing (default: same as `anchor`) |
212-
| top | `string | nil` | The direction the top of block should facing (default: `"up"`) |
213-
| text | `string | nil` | the text going to write on the sign's front side |
214-
| backText | `string | nil` | the text going to write on the sign's back side |
236+
| name | type | Description | Default |
237+
| -------- | -------------- | ----------------------------------------------------------------- | -------------------- |
238+
| x | `number | nil` | The x offset relative to the turtle | `0` |
239+
| y | `number | nil` | The y offset relative to the turtle | `0` |
240+
| z | `number | nil` | The z offset relative to the turtle | `0` |
241+
| anchor | `string | nil` | The direction the block should anchor | Turtle's forward |
242+
| front | `string | nil` | The direction the block should facing | same as `anchor` |
243+
| top | `string | nil` | The direction the top of block should facing | `"up"` |
244+
| text | `string | nil` | the text going to write on the sign's front side | |
245+
| backText | `string | nil` | the text going to write on the sign's back side | |
215246

216247
---
217248

0 commit comments

Comments
 (0)