SYNOPSIS
string P_SUB_READMSGS "SubReadMsgs"
string Set(P_SUB_READMSGS, string value)
string Query(P_SUB_READMSGS)
or
string SetSubReadMsgs(string value)
string QuerySubReadMsgs()
Accessed through:
void AddSubReadMsg(string det, string desc)
void RemoveSubReadMsg(string det)
string GetSubReadMsg(string det)
DESCRIPTION
This property holds the description of readable details on an object.
The indices of the mapping are the detail-ids, the value for each
index is the read message of the detail.
The read details are addressed in commands as "<detailid> on <objectid>"
resp. "<detailid> of <objectid>".
The read description may be a string or a closure evaluating to
a string.
To set resp. remove details, the two lfuns AddSubReadMsg() and
RemoveSubReadMsg() should be used.
void AddSubReadMsg(string det, string desc)
Add a read-detail <det> with the message <desc>.
<det> may be an array of detail ids, which then all get the
same message text.
void RemoveSubReadMsg(string det)
Remove the read detail <det>.
<det> may be an array of detail ids, which then all get removed.
The detail is queried via the Read() lfun, which calls the lfun
GetSubReadMsg(), which returns the message of the given detail
or 0, if the detail is not defined.
During an actual look command, the parsed detailid is stored in
this_player() as the command data entry "<filename_of_object>:subid".
Read() checks this entry to see if the object's or a detail's
read message is queried.
EXAMPLE
AddSubReadMsg("rune", "You utter the word, but nothing happens.\n");
AVAILABILITY
Include: <properties.h>
Availability: /std/thing(/description) and descendants.
SEE ALSO
thing(S), subdetails(P), long(P), readmsg(P)