From 8172858d48fe2dc5a332ad79a04bab08157a3a01 Mon Sep 17 00:00:00 2001 From: osmarks Date: Mon, 13 Aug 2018 09:08:34 +0100 Subject: [PATCH] Add craft --- client.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client.lua b/client.lua index a934d8b..14c1e88 100644 --- a/client.lua +++ b/client.lua @@ -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 }