local modules = peripheral.find("manipulator") or peripheral.find("neuralInterface") if not modules then error("Must have neural interface or manipulator", 0) end if not modules.hasModule("plethora:sensor") then error("The entity sensor is missing", 0) end if not modules.hasModule("plethora:introspection") then error("The introspection module is missing", 0) end term.clear() term.setCursorPos(1, 1) print("Feeder script started") local inv = modules.getInventory() local cachedSlot = false function feed() if pcall(modules.getMetaOwner) then local data = modules.getMetaOwner() while data.food.hungry do local item if cachedSlot then local slotItem = inv.getItem(cachedSlot) if slotItem and slotItem.consume then item = slotItem else cachedSlot = nil end end if not item then for slot, meta in pairs(inv.list()) do local slotItem = inv.getItem(slot) if slotItem and slotItem.consume then print("Using food from slot " .. slot) item = slotItem cachedSlot = slot break end end end if item then item.consume() else print("Cannot find food") break end data = modules.getMetaOwner() end sleep(3) end end while true do feed() end