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.
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 dubbedcostCallback
inFindPathOpts
) can returnfalse
if a room is not to be searched.path-finder.ts
already has the correct return value, but theFindPathOpts
helper did not. See http://support.screeps.com/hc/en-us/articles/207023879-PathFinder#search for the docs on the callback. I quote:Thanks!