You know you can be very, very sneaky with this. I mean, you can 'rewrite' the turtle.<direction> functions!
local turtleUp = turtle.up
turtle.up = function()
--# Do stuff, the coords system in this case
turtleUp()
end
--# A rough example (nothing to due with coords, just showcase what you can do with it)
local turtleUp = turtle.up
turtle.up = function( time )
if type( tonumber(time) ) ~= "number" then error("Number expected, got " .. type( tonumber(time) ), 2 ) end
for i = 1, tonumber(time) do
turtleUp()
end
end
But, what if another program uses turtle.up()? Well, we change it back to the original when the program quits:
turtle.up = turtleUp
After you have done that, you can use all programs just like you would normally. Also a tip:
local turtleUp = turtle.up
turtle.up = function()
if turtleUp() then
--# only do it when we actually moved! Very important!
end
end