only extract necessary items

This commit is contained in:
osmarks 2018-08-16 09:58:01 +01:00
parent 2f012e3d3d
commit d3ca73a14b

1
IO.lua
View File

@ -37,6 +37,7 @@ local function main()
local request = w.string_to_item(item_name)
request.type = "extract"
request.destination_inventory = conf.chest
request.quantity = quantity_desired - quantity_stocked
local result = w.unwrap(w.query_by_type("storage", request), "extracting items", { w.errors.NOITEMS })
if result then print("Moved", result.moved, item_name, "from storage.") end
end