Utils

object Utils

Functions

getWalkableNeighbor
Link copied to clipboard
fun Locatable.getWalkableNeighbor(allowSelf: Boolean = true, diagonalTiles: Boolean = false, checkForWalls: Boolean = true, filter: (Tile) -> Boolean = { true }): Tile?

Returns: Tile nearest neighbor or self as which is walkable

getWalkableNeighbors
Link copied to clipboard
fun Locatable.getWalkableNeighbors(allowSelf: Boolean = true, diagonalTiles: Boolean = false, checkForWalls: Boolean = true): MutableList<Tile>
handleMenu
Link copied to clipboard
fun handleMenu(action: String, name: String): Boolean

Requires menu to be open

onMap
Link copied to clipboard
fun Locatable.onMap(): Boolean
turnRunOn
Link copied to clipboard
fun turnRunOn(): Boolean
walkAndInteract
Link copied to clipboard
fun walkAndInteract(target: InteractableEntity?, action: String, alwaysWalk: Boolean = false, allowWalk: Boolean = true, selectItem: Int = -1): Boolean
fun walkAndInteract(target: InteractableEntity?, filter: Filter<MenuCommand>, alwaysWalk: Boolean = false, allowWalk: Boolean = true, selectItem: Int = -1): Boolean

Takes a walking step entity is not visible or just too far away (distance 12)