From f38c96865638fa8a15786fe15f3a2716f60ce0f0 Mon Sep 17 00:00:00 2001 From: kepler155c Date: Sat, 24 Feb 2018 04:47:47 -0500 Subject: [PATCH] 1.7.10 compatibility --- apps/Crafter.lua | 20 ++++++++++++++------ apps/chestManager.lua | 10 +++++----- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/apps/Crafter.lua b/apps/Crafter.lua index 7be22f8..dd051da 100644 --- a/apps/Crafter.lua +++ b/apps/Crafter.lua @@ -1077,12 +1077,20 @@ function listingPage:applyFilter() self.grid:setValues(t) end -local s, m = pcall(findMachines) - -if not s and m then - printError(m) - read() - return +-- randomly errors in 1.7x with "you are not attached to this computer" +local retryCount = 0 +for _ = 1, 3 do + local s, m = pcall(findMachines) + if not s and m then + _G.printError(m) + else + break + end + retryCount = retryCount + 1 + if retryCount > 3 then + error(m) + end + print('retrying...') end loadResources() diff --git a/apps/chestManager.lua b/apps/chestManager.lua index 26d467f..bd09f61 100644 --- a/apps/chestManager.lua +++ b/apps/chestManager.lua @@ -25,12 +25,12 @@ if multishell then end local config = { - computerFacing = 'north', -- direction turtle is facing + computerFacing = 'north', -- direction turtle is facing - inventory = 'top', - craftingChest = 'bottom', - controller = 'none', - stock = 'none', + inventory = 'top', -- main inventory + craftingChest = 'bottom', -- required in 1.8+ for crafting + controller = 'none', -- AE / RS controller + stock = 'none', -- another inventory for restocking main inventory trashDirection = 'up', -- trash/chest in relation to inventory monitor = 'type/monitor',