ldmud/doc/applied/catch_msg
Alexander Motzkau 0659a4124d Implement lightweight objects
Add a new type and data structure to LPC. Lightweight objects combine
properties from structs (small memory footprint, automatic lifetime
management) and objects (capsulation, functions).
(Implements #688)
2022-01-09 01:13:21 +01:00

20 lines
785 B
Text

SYNOPSIS
void catch_msg(mixed *|struct|mapping|object msg,
object|lwobject obj)
DESCRIPTION
When say(), tell_room() or tell_object() are used with a
non-string as message, the value will be passed to catch_msg()
in all living objects that can hear it, instead of writing to
the user resp. sending to catch_tell(). This can be used to
implement communication protocols between livings. The second
argument denotes the object that has sent the message.
HISTORY
LDMud 3.2.11 added tell_object() to the efuns calling this
lfun for symmetry reasons.
LDMud 3.3.686 added the use of a mapping/struct/object as message
value.
SEE ALSO
say(E), tell_room(E), catch_tell(A)