WorldSpatialIndex
class WorldSpatialIndexon_input<DeveloperCommandInput> { player -> if (name != "look") return@on_input val here = player.tile4 val npcs = World.spatial.npcsWithin(here.tile, radius = 8, shard = here.shard) val objects = World.spatial.objectsAt(here.tile, shard = here.shard) player.message("${npcs.size} NPCs near you, ${objects.size} world objects under you.")}fun space(shard: Int): ShardSpaceshardSpaceOrNull
Section titled “shardSpaceOrNull”fun shardSpaceOrNull(shard: Int): ShardSpace?isShardAllocated
Section titled “isShardAllocated”fun isShardAllocated(shard: Int): BooleanallocatedShards
Section titled “allocatedShards”fun allocatedShards(): IntArrayinstanceMap
Section titled “instanceMap”fun instanceMap(shard: Int): InstanceMap?objectsAt
Section titled “objectsAt”fun objectsAt( tile: Tile3, shard: Int = GLOBAL, viewer: Int = ShardSpace.NO_VIEWER): List<WorldObject>worldItemAt
Section titled “worldItemAt”fun worldItemAt( tile: Tile3, id: Int, shard: Int = GLOBAL): rift.entities.WorldItem?GLOBAL
Section titled “GLOBAL”const val GLOBAL: Int = 0