From 5b8029364f3a8af83b80bbf915f0ddf772cfc16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 15 Mar 2014 20:00:08 +0100 Subject: [PATCH] fixed the dig program --- .../assets/opencomputers/lua/component/robot/bin/dig.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/opencomputers/lua/component/robot/bin/dig.lua b/src/main/resources/assets/opencomputers/lua/component/robot/bin/dig.lua index b68022c99..cec0bfe08 100644 --- a/src/main/resources/assets/opencomputers/lua/component/robot/bin/dig.lua +++ b/src/main/resources/assets/opencomputers/lua/component/robot/bin/dig.lua @@ -4,7 +4,7 @@ local robot = require("robot") local shell = require("shell") local sides = require("sides") -if not computer.isRobot() then +if not component.isAvailable("robot") then io.stderr:write("can only run on robots") return end @@ -22,7 +22,7 @@ if not size then return end -local r = component.computer +local r = component.robot local x, y, z, f = 0, 0, 0, 0 local dropping = false -- avoid recursing into drop() local delta = {[0] = function() x = x + 1 end, [1] = function() y = y + 1 end,