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

RoomPosition.findClosestByPath ignores range option - always uses range 1 #120

Open
SystemParadox opened this issue Jul 19, 2019 · 0 comments · May be fixed by #121
Open

RoomPosition.findClosestByPath ignores range option - always uses range 1 #120

SystemParadox opened this issue Jul 19, 2019 · 0 comments · May be fixed by #121
Assignees

Comments

@SystemParadox
Copy link

SystemParadox commented Jul 19, 2019

The documentation for RoomPosition.findClosestByPath clearly states that any options from Room.findPath are accepted, one of which is range.

However, RoomPositition.findClosestByPath appears to ignore the range option entirely.

See https://github.com/screeps/engine/blob/master/src/game/rooms.js#L328. The range argument is always set to 1. It should be opts.range || 1.

This bug caused my creeps to not bother repairing structures which they couldn't get adjacent to, which is often the case with thick walls, blocking the observer behind other structures, etc.

RiftLurker added a commit to RiftLurker/screeps-engine that referenced this issue Oct 18, 2019
@RiftLurker RiftLurker linked a pull request Oct 18, 2019 that will close this issue
@o4kapuk o4kapuk self-assigned this Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants