OpenMods / OpenPeripheral

https://openmods.info
MIT License
67 stars 25 forks source link

Suggestion for a new function #140

Closed JomerDev closed 10 years ago

JomerDev commented 10 years ago

Would there be a way that you could add a .getDistance() for every peripheral? Not the Coordinates, but just the distance between the peripheral and the computer. So people could locate a peripheral with gps?

theoriginalbit commented 10 years ago

How would this help people locate the peripheral exactly? if we provide a distance – I'm assuming you're meaning Euclidean distance just like CC's Rednet message distance – to the peripheral, there's still 360º in which the peripheral can be from the computer. People would have a much better chance of just following the peripheral cable. Plus if its your peripheral then you'd know where it is, the only usage I can think of for this is if you wish to cause havoc to someone else's peripherals, which personally is something I do not suppose.

mikeemoo commented 10 years ago

Hehe, nope, sorry this isn't going to happen. :) But thanks for the suggestion!

JomerDev commented 10 years ago

It would help when you have multiple Computers, just like with the gps thing. I think this function would be usefull for some programms, because: You can track the player when he has a pocket computer, and if you could track the peripherals too, you could just see if the player is in a specified range to the peripheral and have it do something. or show all stats to the peripheral nearest to the player on the pocket computer :)

theoriginalbit commented 10 years ago

Yeah that definitely seems like you're planing on causing havoc. nope.

Just do it the old fashioned way. Plus for your plan to work requires features that the Pocket Computers just don't have.

JomerDev commented 10 years ago

Which feature do you mean?

jmonsted commented 10 years ago

It would be pretty neat to be able to triangulate the position of a player with a pocket computer by using three other computers with wireless modems :)