Skip to content

on_world_item_option

fun on_world_item_option(
item: ItemDefinition,
option: String,
behaviour: Interaction<WorldItem>.(subject: Entity) -> Unit
)
Interaction<WorldItem>.(subject: Entity) -> Unit

Entity

Example
on_world_item_option(Assets.Item.bones, "Bury") { player ->
target.remove()
player.message("You bury the bones.")
}
item: ItemDefinition

ItemDefinition

option: String
val target: T

fun on_world_item_option(
option: String,
behaviour: Interaction<WorldItem>.(subject: Entity) -> Unit
)
Interaction<WorldItem>.(subject: Entity) -> Unit

Entity

option: String
val target: T