change _debug to _syslog

This commit is contained in:
kepler155c@gmail.com
2019-05-03 15:30:37 -04:00
parent 074e0742d5
commit 731fc2c761
31 changed files with 264 additions and 204 deletions

View File

@@ -294,7 +294,6 @@ local function craftItem(ikey, item, items, machineStatus)
local ingredient = itemDB:get(key)
-- local c = item.craftable * qty
-- while c > 0 do
--debug(key)
inventoryAdapter:provide(ingredient, maxCount * qty, slot)
if turtle.getItemCount(slot) ~= maxCount * qty then
item.status = 'Extract failed: ' .. (ingredient.displayName or itemDB:getName(ingredient))

View File

@@ -71,7 +71,7 @@ local function turtleCraft(recipe, qty, inventoryAdapter)
inventoryAdapter:provide(item, provideQty, k)
if turtle.getItemCount(k) == 0 then -- ~= qty then
-- FIX: ingredients cannot be stacked
--debug('failed ' .. v .. ' - ' .. provideQty)
--_G._syslog('failed ' .. v .. ' - ' .. provideQty)
return false
end
end

View File

@@ -1208,8 +1208,8 @@ local function learnRecipe(page)
end
if not recipe then
_debug(results)
_debug(newRecipe)
_G._syslog(results)
_G._syslog(newRecipe)
error('Failed - view system log')
end
@@ -1437,7 +1437,7 @@ listingPage:setFocus(listingPage.statusBar.filter)
--[[
Event.on('modem_message', function(e, side, sport, dport, item)
debug({ e, side, sport, dport, item })
_syslog({ e, side, sport, dport, item })
if dport == 205 and type(item) == 'table' then
inventoryAdapter:provide(
item,