readmsgs

prop
SYNOPSIS
    mapping P_READ_MSGS  "ReadMsgs"

    mapping Set(P_READ_MSGS, mapping value)
    mapping Query(P_READ_MSGS)
      or
    mapping SetReadMsgs(mapping value)
    mapping QueryReadMsgs()

      Accessible via:
    void AddReadMsg(string|string * id, string desc)
    void AddReadMsg(string|string * id, string * desc)
    void AddReadMsg(string|string * id, closure desc)
    void RemoveReadMsg(string|string * id)
    string|string* GetReadMsg(string id)

DESCRIPTION
    This property implements the readable details of a room, i.e.
    things which can be read, but need not be represented with an own object.

    The value of the property is a mapping of the read messages,
    with the id of each detail indexing its message.
    The message may be:
     - a single string with the text,
     - a closure returning the text string.
       The closure will be called with the id of the detail as
       argument.
    
    The readmsgs cooperate with /std/room/description::DoExplore() to
    implement the explorer facilities.

    The readmsgs should be accessed via AddReadMsg(), RemoveReadMsg() and
    GetReadMsg().

    string|string* GetReadMsg(string id)
      Return the text for readmsg <id>, or 0 if it isn't
      defined. This takes care of closure evaluation.

    void AddReadMsg(string|string * id, string desc)
      Add/redefine a readmsg <id> with the text <desc>.
      If an array of ids is given, each of the readmsgs gets the same
      text (this is also valid for the other AddReadMsg() forms).

    void AddReadMsg(string|string * id, string * desc)
      Add/redefine a readmsg <id> with the text <desc>.
      <desc> is of the form ({ "#call_other", <object>, "functionname", ... }),
      which will be compiled into a closure and stored as such.

    void AddReadMsg(string|string * id, closure desc)
      Add/redefine a readmsg <id> with the closure <desc> returning the
      actual text.
	
    void RemoveReadMsg(string id)
      Remove the readmsg <id> if existing.

    void RemoveReadMsg(string * ids)
      Remove the readmsgs <ids> if existing.

EXAMPLE
    // Add a note to read.
    AddReadMsg("note", "The usual copyright note.\n");

    // Add a note to be resolved by a local function 'therules()'.
    AddReadMsg("rules", #'therules);

    // Remove all the notes added above.
    RemoveReadMsg(({"note", "rules"}));

AVAILABILITY
    Include: <properties.h>

    Availability: /std/room/(details), /std/npc and descendants.

SEE ALSO
    room(S), explorable(P), details(P), noises(P), readmsgs(P)