Skip to content

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

@SystemParadox

Description

@SystemParadox

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.

Metadata

Metadata

Assignees

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