Add digiline interface to quarry

This adds a digiline interface that can be used to start, stop and restart, set the radius and get the current status.
This commit is contained in:
Alexander Ried
2020-06-30 16:26:53 +02:00
committed by Buckaroo Banzai
parent 35e989ba2e
commit 6a9cf6da27
2 changed files with 104 additions and 6 deletions

View File

@ -108,3 +108,25 @@ The commands:
- `"start"`: Tries to start the reactor, `"Start successful"` is sent back on success, `"Error"` if something is wrong.
If the automatic start is enabled, it will always send `"fuel used"` when it uses fuel.
## Quarry
You should send a table to it containing the `command` and for some commands the `value` field.
Some strings will automatically be converted to tables:
- `"get"` :arrow_right: `{command = "get"}`
- `"on"` :arrow_right: `{command = "on"}`
- `"off"` :arrow_right: `{command = "off"}`
- `"restart` :arrow_right: `{command = "restart"}`
- `"radius "..value` :arrow_right: `{command = "radius", value = value}`
The commands:
- `"get"`: The forcefield emitter sends back a table containing:
- `"enabled"`: `0` is off, `1` is on.
- `"radius"`
- `"finished"`
- `"dug_nodes"`
- `"dig_level"`: A negative value means above the quarry, a positive value means below.
- `"on"`: Activate the quarry.
- `"off"`: Deactivate the quarry.
- `"restart"`: Restart the quarry.
- `"radius"`: Set the radius to `value` and restart the quarry if the radius changed.