Skip to content

Clarify that PathFinder is enabled by default #154

@Calvin-L

Description

@Calvin-L

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions