World
object Worldon_input<DeveloperCommandInput> { player -> if (name != "census") return@on_input var online = 0 World.players.forEach { online++ } val npcs = World.spatial.npcsWithin(player.tile4.tile, radius = 10, shard = player.shardId) player.message("$online online; ${npcs.size} NPCs within 10 tiles of you.")}players
Section titled “players”val players: EntityList<Actor>spatial
Section titled “spatial”val spatial: WorldSpatialIndexcollisionView
Section titled “collisionView”fun collisionView(entity: Entity): CollisionViewworldObjectAt
Section titled “worldObjectAt”fun worldObjectAt( observer: Entity, tile: Tile3, id: Int, shard: Int = observer.shardId): WorldObject?createInstance
Section titled “createInstance”fun createInstance(map: InstanceMap): IntplaceProjection
Section titled “placeProjection”fun placeProjection( definition: Int, shard: Int, tile: Tile3, angle: Int = 0): WorldProjectioncreateParallelWorld
Section titled “createParallelWorld”fun createParallelWorld(): IntdestroyInstance
Section titled “destroyInstance”fun destroyInstance( shard: Int, evictTo: Tile3, evictToShard: Int = WorldSpatialIndex.GLOBAL)enterInstance
Section titled “enterInstance”fun enterInstance( actor: Actor, shard: Int, tile: Tile3)findPlayer
Section titled “findPlayer”fun findPlayer(username: String): Actor?register
Section titled “register”fun register(actor: Actor): Boolean
fun register( actor: Actor, atIndex: Int): Booleanunregister
Section titled “unregister”fun unregister(p: Actor)forEachNpc
Section titled “forEachNpc”fun forEachNpc(action: (Npc) -> Unit)registerNpc
Section titled “registerNpc”fun registerNpc(npc: Npc): BooleanunregisterNpc
Section titled “unregisterNpc”fun unregisterNpc(npc: Npc)registerWorldItem
Section titled “registerWorldItem”fun registerWorldItem(item: WorldItem): BooleanregisterWorldObject
Section titled “registerWorldObject”fun registerWorldObject(wo: WorldObject): BooleansetWorldItemQuantity
Section titled “setWorldItemQuantity”fun setWorldItemQuantity( item: WorldItem, newQuantity: Int)unregisterWorldItem
Section titled “unregisterWorldItem”fun unregisterWorldItem(item: WorldItem)registerProjectile
Section titled “registerProjectile”fun registerProjectile(projectile: Projectile): BooleanregisterWorldSound
Section titled “registerWorldSound”fun registerWorldSound( sound: WorldSound, loops: Int = 1): BooleanregisterWorldGraphic
Section titled “registerWorldGraphic”fun registerWorldGraphic(graphic: WorldGraphic): BooleanlaunchProjectile
Section titled “launchProjectile”fun launchProjectile( shard: Int, from: Tile3, dest: Tile3, id: Int, lifespan: Int = 60, delay: Int = 0, onHit: ((projectile: Entity, target: Entity, clientSideDelay: Int) -> Unit)? = null): Projectile?
fun launchProjectile( shard: Int, from: Tile3, target: Entity, id: Int, lifespan: Int = 60, delay: Int = 0, onHit: ((projectile: Entity, target: Entity, clientSideDelay: Int) -> Unit)? = null): Projectile?
fun launchProjectile( shard: Int, source: Entity, target: Entity, id: Int, lifespan: Int = 60, delay: Int = 0, onHit: ((projectile: Entity, target: Entity, clientSideDelay: Int) -> Unit)? = null): Projectile?projectionsViewing
Section titled “projectionsViewing”fun projectionsViewing(childShard: Int): List<WorldProjection>rootShardOf
Section titled “rootShardOf”fun rootShardOf(entity: Entity): IntviewportProjectionOf
Section titled “viewportProjectionOf”fun viewportProjectionOf(entity: Entity): WorldProjection?changeActorRoot
Section titled “changeActorRoot”fun changeActorRoot( actor: Actor, shard: Int, tile: Tile3? = null)canAllocateProjection
Section titled “canAllocateProjection”fun canAllocateProjection( rootShard: Int, sizeX: Int, sizeZ: Int): BooleanregisterWorldProjection
Section titled “registerWorldProjection”fun registerWorldProjection(projection: WorldProjection): BooleanregisterArea
Section titled “registerArea”fun registerArea(area: WorldArea): BooleanunregisterArea
Section titled “unregisterArea”fun unregisterArea(area: WorldArea): Unitvar cycle: Intfun cycle()postLoginIntent
Section titled “postLoginIntent”fun postLoginIntent(intent: () -> Unit)systemsAt
Section titled “systemsAt”fun systemsAt(anchor: Anchor): List<System<*, *>>composeAnchor
Section titled “composeAnchor”fun composeAnchor( anchor: Anchor, vararg systems: System<*, *>): UnitsetGameloopMovement
Section titled “setGameloopMovement”fun setGameloopMovement (vararg systems: System<*, *>): Unitprofiler
Section titled “profiler”var profiler: ((phase: String, nanos: Long) -> Unit)?phaseProbe
Section titled “phaseProbe”var phaseProbe: ((phase: String) -> Unit)?subcycle
Section titled “subcycle”fun subcycle()