mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
fixed the dig program
This commit is contained in:
parent
683a9da6ff
commit
5b8029364f
@ -4,7 +4,7 @@ local robot = require("robot")
|
|||||||
local shell = require("shell")
|
local shell = require("shell")
|
||||||
local sides = require("sides")
|
local sides = require("sides")
|
||||||
|
|
||||||
if not computer.isRobot() then
|
if not component.isAvailable("robot") then
|
||||||
io.stderr:write("can only run on robots")
|
io.stderr:write("can only run on robots")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -22,7 +22,7 @@ if not size then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local r = component.computer
|
local r = component.robot
|
||||||
local x, y, z, f = 0, 0, 0, 0
|
local x, y, z, f = 0, 0, 0, 0
|
||||||
local dropping = false -- avoid recursing into drop()
|
local dropping = false -- avoid recursing into drop()
|
||||||
local delta = {[0] = function() x = x + 1 end, [1] = function() y = y + 1 end,
|
local delta = {[0] = function() x = x + 1 end, [1] = function() y = y + 1 end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user