Skip to content

Commit

Permalink
add RoomPosition.findPathTo
Browse files Browse the repository at this point in the history
  • Loading branch information
exaV committed Sep 7, 2020
1 parent f48ed59 commit 7dfd421
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/screeps/api/RoomPosition.kt
Expand Up @@ -44,6 +44,9 @@ external class RoomPosition(x: Int, y: Int, roomName: String) : NavigationTarget
opts: FilterOption<T> = definedExternally
): Array<T>

fun findPathTo(x: Int, y: Int, opts: FindPathOptions = definedExternally): Array<Room.PathStep>
fun findPathTo(target: NavigationTarget, opts: FindPathOptions = definedExternally): Array<Room.PathStep>

fun getDirectionTo(x: Int, y: Int): DirectionConstant
fun getDirectionTo(target: RoomPosition): DirectionConstant
fun getDirectionTo(target: RoomObject): DirectionConstant
Expand Down

0 comments on commit 7dfd421

Please sign in to comment.