Skip to content

Shard

open class Shard
Example
on_input<DeveloperCommandInput> { player ->
if (name != "arena") return@on_input
val arena = Scenes.boss_arena.createShard()
arena.onLeave { leaver -> leaver.message("You leave the arena (${arena.players.size} still inside).") }
player.teleport(arena.tile(8, 3))
}
fun tile(
x: Int,
z: Int,
height: Int = 0
): Tile4
fun at(point: Point): Tile4
val players: List<Actor>
val npcs: List<Npc>
val isDestroyed: Boolean
fun destroy(sendTo: Tile4)
fun destroy(sendTo: Point): Unit
fun onLeave(block: (player: Actor) -> Unit)