Useful messages in IO

This commit is contained in:
osmarks 2018-08-15 07:30:25 +01:00
parent 08b48859bc
commit b2340fbf08
1 changed files with 6 additions and 3 deletions

9
IO.lua
View File

@ -24,17 +24,20 @@ while true do
local request = w.string_to_item(item_name)
request.type = "extract"
request.destination_inventory = w.chest
w.unwrap(w.query_by_type("storage", request), "extracting items")
local result = w.unwrap(w.query_by_type("storage", request), "extracting items")
print("Moved", result.moved, item_name, "from storage.")
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.unwrap(w.query_by_type("storage", {
local ii = w.get_internal_identifier(item)
if not conf.items[ii] then -- if item is not in want list, send it back to storage
local result = w.unwrap(w.query_by_type("storage", {
type = "insert",
from_inventory = conf.chest,
from_slot = slot
}), "inserting items")
print("Moved", result.moved, ii, "to storage.")
end
end