implants
implants <creature>
The objects implanted in a creature, as an iterable over its filled implant slots.
Implants are surgically installed items, distinct from worn
equipment and carried inventory.
Arguments
<creature>— the creature whose implants to list.
Returns
An iterable whose elements are the objects occupying the
creature's filled implant slots. Empty slots yield nothing, so a creature
with no implants produces an empty iterable. An unresolved argument
yields null. Consume the iterable with each,
count, first, select, or
another iterable consumer.
Examples
after command (say) {
do "say I have [count [implants $self]] implant(s)."
}
[implants $self] lists the owner's implant slots. The debug-world
mob has none, so this compiles and runs with [count ...] evaluating
to 0 — "I have 0 implant(s)." On an implanted creature each
installed object would be yielded in turn.
after command (say) {
each [implants $actor] { <imp>
do "say $actor has [name $imp] installed."
}
}
When the actor has implants, each names each one; otherwise
the block never runs. The block parameter <imp> is declared inside the
braces, right after {.