diff --git a/inventoryManager.lua b/inventoryManager.lua index 8eb4042..c09a25b 100644 --- a/inventoryManager.lua +++ b/inventoryManager.lua @@ -224,20 +224,13 @@ local function main() log.warn("INIT", "No modem found for client sync") end - -- Detect crafting turtle on network (must have craft() method) + -- Detect crafting turtle on network + -- The actual craft message goes on CRAFT_CHANNEL which only the crafting + -- turtle listens to, so we just need any turtle name for presence checks. for _, name in ipairs(peripheral.getNames()) do if name:match("^turtle_") then - local methods = peripheral.getMethods(name) - if methods then - local hasCraft = false - for _, m in ipairs(methods) do - if m == "craft" then hasCraft = true; break end - end - if hasCraft then - ctx.craftTurtleName = name - break - end - end + ctx.craftTurtleName = name + break end end if ctx.craftTurtleName then