Skip to content

Commit

Permalink
Updated fleet docs for set and simulate commands
Browse files Browse the repository at this point in the history
  • Loading branch information
S-S-X committed Feb 15, 2020
1 parent 33b42d5 commit e004a79
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions doc/digiline.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Where
* `z` sets z coordinate
* `r` sets radius
* `formupdate` updates coordinates on formspec

Every value is optional. `x`, `y`, `z` and `r` must be integers. `formupdate` is truth value.

### Simulate jump
Expand Down Expand Up @@ -167,13 +168,22 @@ end

Resets the target coordinates

Where
* `x` sets x coordinate
* `y` sets y coordinate
* `z` sets z coordinate
* `formupdate` updates coordinates on formspec

Every value is optional. `x`, `y` and `z` must be integers. `formupdate` is truth value.

```lua
-- request
digiline_send("fleetcontroller", {
command = "set",
x = 0,
y = 100,
z = 1024
z = 1024,
formupdate = false
})

-- response sent back on the same channel
Expand All @@ -186,6 +196,9 @@ if event.type == "digiline" and event.channel == "fleetcontroller" then
end
```

Response is only sent when operation fails due to another operation is in progress like simulation or jump.
Error will not be sent for invalid values or missing values because every value is optional.

### Simulate jump

Simulates a jump
Expand Down Expand Up @@ -224,7 +237,7 @@ if event.type == "digiline" and event.channel == "fleetcontroller" then
success = true,
count = 10,
msgs = {
-- error messages!?
-- possible warning messages for engines like target in vacuum warning
}
}
end
Expand Down

0 comments on commit e004a79

Please sign in to comment.