SYNOPSIS
string P_SUB_DETAILS "SubDetails"
string Set(P_SUB_DETAILS, string value)
string Query(P_SUB_DETAILS)
or
string SetSubDetails(string value)
string QuerySubDetails()
Accessed through:
void AddSubDetail(string det, string desc, void|string exa)
void RemoveSubDetail(string det)
string GetSubDetail(string det)
DESCRIPTION
This property holds the description of details on an object.
The indices of the mapping are the detail-ids, the value for each
index is the long description of the detail.
The details are addressed in commands as "<detailid> on <objectid>"
resp. "<detailid> of <objectid>".
The long description may be a single string, or an array of two
strings. If it is just one string, it is used for both the "look"
and the "examine" command, if it is an array, the first string is
used for the "look" command, the second for the "examine" command.
To set resp. remove details, the two lfuns AddSubDetail() and
RemoveSubDetail() should be used.
void AddSubDetail(string det, string desc, void|string exa)
Add a detail <det> with the long description <desc> and the
optional 'examine' description <exa>.
<det> may be an array of detail ids, which then all get the
same description.
<desc> may also be an array of two strings, which is then
interpreted as ({ "look description", "examine description" }).
void RemoveSubDetail(string det)
Remove the detail <det>.
<det> may be an array of detail ids, which then all get removed.
The detail is queried via the Long() lfun, which calls the lfun
GetSubDetail(), which returns the description 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".
(Exa)Long() checks this entry to see if the object's or a detail's
description is queried.
EXAMPLE
AddSubDetail("rune", "A magical rune, old and powerful.\n");
AddSubDetail("scratch"
, "A scratch in the paint, isn't it?\n"
, "Closer examination reveals the scratch as a seqence of "
"microscopic letters.\n"
);
AVAILABILITY
Include: <properties.h>
Availability: /std/thing(/description) and descendants.
SEE ALSO
thing(S), subreadmsgs(P), long(P), readmsg(P)