Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add turtle.getTurn() #473
What essentially was said in that PR was turtles having the ability to get their direction is giving them "magic" knowledge. And I have to agree with this, this doesn't seem like something that belongs in a turtle, as they don't have any sort of "compass" built in.
Think of it this way: a player get's teleported randomly in a radius 10000 blocks away from his base, and has to find his way back. Assuming the player is unfamiliar with the land around him, how is he supposed to know which way to start walking? Players aren't given a direction unless they open the debug screen, which is comparable to a GPS. And even then, the player has to do some small movements to figure out which way is +X, and +Z (the rest from there can be assumed).
One of the things brought up in #383 was turtles should be able to do what players can do, I.E. read a compass. And I absolutely agree with this. If a player can get their direction just by looking at a compass, then so should a turtle.
So what I would recommend is turning a compass into a peripheral, and THEN if it is equipped, provide this as a method (and maybe a
Without GPS and since ComputerCraft 1.76 you can get Direction of a Turtle, by placing a block with facing block.state and then inspect it :