Program 2.3
public unlisted lua v1 · immutable-- _PROGRAM 2.3local robot = require("robot")local component = require("component")function checkSwitch()robot.setLightColor(0xF4FF0D) ifrobot.count(1) > 50component.inventory_controller.equip() ifrobot.count(1) > 50endfunction expUse()robot.setLightColor(0x00FF00) --green print("Extracting...")robot.use()while true docheckSwitch()endwhile true doexpUse()end