This commit is contained in:
osmarks 2018-08-14 22:28:57 +01:00
parent 6f697a6e43
commit 3db3615467
2 changed files with 8 additions and 3 deletions

6
IO.lua
View File

@ -24,17 +24,17 @@ while true do
local request = w.string_to_item(item_name)
request.type = "extract"
request.destination_inventory = w.chest
w.query_by_type("storage", request)
w.unwrap(w.query_by_type("storage", request), "extracting items")
end
end
for slot, item in pairs(stacks_stored) do
if not conf.items[w.get_internal_identifier(item)] then -- if item is not in want list, send it back to storage
w.query_by_type("storage", {
w.unwrap(w.query_by_type("storage", {
type = "insert",
from_inventory = conf.chest,
from_slot = slot
})
}), "inserting items")
end
end

View File

@ -39,6 +39,7 @@ Client Client Client
* **Server** is a computer running `backend-chests`. Other backends may eventually become available. It must be connected to the chests, clients, and both sides of the buffers.
* **Client** is a crafty turtle running `client`. It must be connected to the server and external side of the buffers.
* **Processing** will be used for autocrafting systems. It is not yet implemented.
* **IO** units should be computers connected to chests.
### Configuration
Configuration is stored in `wyvern_config.tbl` in lua table syntax as used by `textutils.(un)serialise`.
@ -51,6 +52,10 @@ Configuration is stored in `wyvern_config.tbl` in lua table syntax as used by `t
`buffer_external` must contain the network name of the buffer on the client side.
`modem_internal` can contain the network name of the server on the chest side. This is only required if your network contains chests on the client side which are connected.
#### IO
`chest` must contain the network name of some sort of storage device to use for item IO.
`items` must can contain the desired quantities of each item, with the item name in "minecraft:cobblestone:0" format as the key and desired quantity as value.
## Warnings
* Inserting/extracting items manually into/out of chests will result in the index being desynchronised with the actual items. To correct the index, run `reindex` in the CLI client.
* If you try and extract items when the storage server is still starting up, it may fail, as not all chests will have been indexed yet.