Skip to content

Fixed two minor bugs in the helpers #74

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

Merged
merged 1 commit into from
Sep 23, 2016
Merged

Fixed two minor bugs in the helpers #74

merged 1 commit into from
Sep 23, 2016

Conversation

Remz-Jay
Copy link
Contributor

Hey guys,

Great work you're doing with the declarations, really appreciated! Keep it up! 👍

I migrated to the #TS2 branch, and only two things broke on my part, both of which I monkey patched previously on my own copy. I do believe both patches are valid though, so here goes:
#1 : A PathFinder roomCallback (which is dubbed costCallback in FindPathOpts ) can return false if a room is not to be searched. path-finder.ts already has the correct return value, but the FindPathOpts helper did not. See http://support.screeps.com/hc/en-us/articles/207023879-PathFinder#search for the docs on the callback. I quote:

If you return false from the callback the requested room will not be searched, and it won't count against maxRooms
#2: lookForAt and lookForAtArea (both in Room) can use the LOOK_RESOURCES constant as a parameter. That constant is defined as LOOK_RESOURCES: "resource",, which will result in a resource parameter being set in the resulting LookAtResultWithPos or LookAtResult, which was missing from the definitions.

Thanks!

@NhanHo
Copy link
Collaborator

NhanHo commented Sep 23, 2016

Thanks!

@NhanHo NhanHo merged commit 80033cc into screepers:TS2 Sep 23, 2016
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 this pull request may close these issues.

2 participants