Skip to main content

convert_message

Discworld living help

convert_message

Name

convert_message - processes observer-dependent messages

Syntax

string convert_message( string words )

Description

This is a utility function provided as a means to process a message from the point of view of the observer. This processing occurs automatically when the message is used in write, say, tell_object or tell_room, but if the message is to be stored, it needs to be processed before being stored. It does not process ANSI colour codes and will not handle indentation or paging if those codes are in the message.

Examples

> call a_short() beggar
*** function on 'poor beggar' found in /std/basic/desc ***
Returned: "$a_short:/obj/monster#4074$"
> call convert_message( "$a_short:/obj/monster#4074$" ) me
*** function on 'Deutha' found in /global/events ***
Returned: "a poor beggar"
> exec return this_player()->convert_message( query_multiple_short(
all_inventory( environment( this_player() ) ) ) );
Returns: "a poor beggar, a fighter, a woman (hiding) and you"

See also

write, say, tell_object, tell_room
a_short, the_short, one_short, poss_short