Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that PathFinder is enabled by default #154

Open
Calvin-L opened this issue Mar 30, 2020 · 0 comments
Open

Clarify that PathFinder is enabled by default #154

Calvin-L opened this issue Mar 30, 2020 · 0 comments

Comments

@Calvin-L
Copy link

The PathFinder module became enabled-by-default in 2016. However, the API documentation for PathFinder does not say so. PathFinder.use is still presented as if it enables an optional feature---now a deprecated optional feature.

I would suggest adding a sentence to the PathFinder module header:

This module exports the path-finding algorithm used internally by Creep.moveTo and other methods. It can be disabled to use an older, slower algorithm (although doing so is not recommended).

And a sentence to PathFinder.use:

PathFinder is enabled by default. This method can be used to disable or re-enable it.

And adjust the wording of places that reference PathFinder, such as Room.findPath:

This is only used when the new PathFinder is enabled. This option is ignored if PathFinder has been disabled.

This option cannot be used when the new PathFinder is enabled (use costCallback option instead). This option can only be used if PathFinder has been disabled. If PathFinder is enabled (which is the default), use the costCallback option instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant