Skip to content

rift.components

fun hasVisibilityFilter(entity: Entity): Boolean
Example
on_npc_option(Assets.Npc.goblin.id, "Inspect") { player ->
if (hasVisibilityFilter(target)) player.message("Not everyone can see this goblin.")
}
fun isVisibleTo(
subject: Entity,
observer: Actor
): Boolean
Example
on_player_option("Inspect") { player ->
if (isVisibleTo(target, player as Actor)) player.message("You can see them.")
}