Update the findPath documentation.



  • I was under the impression that if you wanted to grab a path that ends X range before the target, you had to do it like this.

    Game.rooms[x_room].findPath(startPos, {pos: endPos, range: 2}, {opt: arg, opt2: arg2, etc});

    That's how the PathFinder documentation said it works.

    But in reality, you have to do it like this.

    Game.rooms[x_room].findPath(startPos, endPos, {range: 2, opt: arg, opt2: arg2, etc})

    The documentation for findPath does not list range as an argument you can put in its options object. But it is, so it should.

    I had to find out the hard way by asking for help in the chat.

    Thank you in advance!



  • It would also be cool if all the pathfinding functions were in the same place.