This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lignum's profile picture

Maintenance Turtle

Started by Lignum, 06 June 2014 - 04:25 PM
Lignum #1
Posted 06 June 2014 - 06:25 PM
The maintenance turtle is a turtle variation. It can't move regularily, instead, it moves on rails. However, in turn, it moves very quickly and can move along a pre-made path with little programming. It's great for travelling along mineshafts.

Suggested Implementation Details:
  • Doesn't have the standard turtle movement functions (turtle.forward, turtle.back, …) but instead uses the functions below in order to work with rails efficiently.
  • turtle.advance(n) - moves n blocks in the movement direction. Does not block the program flow. Negative values make it move in the opposite direction of the movement direction. A value of 0 makes it move infinitely until the turtle's movement is interrupted.
  • turtle.cancelMove() - immediately stops the turtle's movement.
  • arrival - an event that gets queued when the turtle has arrived at the end of its rail or when turtle.advance has finished. Should have the distance travelled as an event parameter.
  • turtle.setSpeed(n) - sets the turtle's movement speed in blocks/tick.
  • turtle.getSpeed() - gets the turtle's movement speed.
  • turtle.setMoveDir() - sets the movement direction to the current direction the turtle is facing. This allows the turtle to move sideways along a rail.
  • turtle.getMoveDir() - returns the current movement direction (north/south/west/east).
  • Turning is still possible, even when moving, since turtle.setMoveDir takes care of the movement direction.
  • Otherwise, it behaves just like a regular turtle.
  • Bonus: Wears a hard hat :)/>.
Sebra #2
Posted 06 June 2014 - 07:46 PM
Turtle Cart was suggested several times long ago.
Implementation details is highly dependent on Minecarts implementation imho.
My thoughts are:
1. it should be able to detect/place/dig blocks around;
2. it should be able to detect/place/unmount any type of track around;
3. it should be able to detect own movement/turn by event system even if movement is passive.
apemanzilla #3
Posted 10 June 2014 - 06:46 PM
It was suggested and denied multiple times before.
Cranium #4
Posted 10 June 2014 - 07:04 PM
I think you'd be more interested in Railcraft. Or perhaps Steve's Carts. They both have things that do what you want.
Lignum #5
Posted 10 June 2014 - 08:52 PM
It was suggested and denied multiple times before.
Hmm, yes I should've searched first.

I think you'd be more interested in Railcraft. Or perhaps Steve's Carts. They both have things that do what you want.
Alright, I'll check those out then.