Add craft

This commit is contained in:
osmarks 2018-08-13 09:08:34 +01:00
parent 7b8e623144
commit 8172858d48
1 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,8 @@ All commands listed below can also be accessed using single-letter shortcuts for
withdraw [quantity] [name] - withdraw [quantity] items with display names close to [name] from storage
withdraw [items] - as above but withdraws all available matching items
dump [slot] - dump stack in slot back to storage
dump - dump whole inventory to storage]]
dump - dump whole inventory to storage
craft - runs turtle.craft]]
local function dump(slot)
w.query_by_type("storage", {
@ -78,6 +79,10 @@ local commands = {
else
dump(slot)
end
end,
craft = function()
local result = turtle.craft()
if not result then return "Invalid or no recipe." end
end
}