473 posts
Location
Poland
Posted 27 February 2012 - 10:02 PM
How about adding to the default turtle API a 'move' event? It's second param would be the direction of movement. Ik you can do that with external functions, but i suppose some people would still use default, making any degree of control impossible. I don't want to modify the ROM either, cause my programs are to be fully SMP-compatible. What do you think?
454 posts
Location
London
Posted 27 February 2012 - 10:57 PM
I think this is kind of redundant.
You could use something like this:
local turtle = turtle
function forward()
if turtle.forward() then
os.queueEvent("move", "forward")
return true
end
return false
end
<insert for other turtle functions>
There's certainly no harm from adding this, though.
You could potentially replace the turtle.* functions when you load your program, though; and this could add the move-event.