From the NannyMUD documentation

LAST CHANGE

2005-08-16

NAME

        booklet - A small collection of pages.

INHERITS

        basic_thing

FUNCTIONS

SETUP FUNCTIONS

        add_text
        set_blocked

QUERY FUNCTIONS

        query_long
        query_blocked
        query_data
        query_raw_data

OTHER FUNCTIONS

        cmd_read

PROPERTIES

INTERNAL PROPERTIES


PROPERTY NAME

        __format - 

DESCRIPTION

        This property causes the written text on the pages to be
        line-broken according to the players tty settings.

PROPERTY NAME

        __remote - 

DESCRIPTION

        If set (object or file name), checks will be done for the
        remote functions:
                remote_prevent_read() ,
                remote_pre_read() ,
                remote_post_read() .

PROPERTY NAME

        nr_pages_in_long - 

DESCRIPTION

        If this property is set, the number of pages in the booklet
        will be seen in the long description of the booklet.

PROPERTY NAME

        no_fail_msg - 

DESCRIPTION

        Set this to inhibit the standard "You are prevented from
        reading the message" that is otherwise written when a
        player is prevented by the function 'remote_prevent_read',
        in the case that function does not return a string.

PROPERTY NAME

        read_msg - 

DESCRIPTION

        This is the string used by /std/msg to tell the player and the
        room that the players reads a page. It uses one special marker
        $P, which will be replaced with the number of the pagebeing
        read.

PROPERTY NAME

        simplemore - 

DESCRIPTION

        The text is presented using the /obj/simplemore functionality.

DESCRIPTION

        The booklet object is suitable to make objects that resemble a
        book from. Here you add text on a per-page basis. The booklet
        can have more than one page, in contrast to the text object.

NOTE

        Just like the text object, the booklet support the 'booklet X'
        usage, where you have more than one booklet in your inventory.
        Then you can simply do 'read page 8 in booklet 3', to read
        page 8 in the third booklet in your inventory.

NOTE

        Do not forget to do the call ::reset(arg) if you inherit this
        object, or the 'read' command will not work.

SEE ALSO

        text in std/text/text

FUNCTION


NAME

        add_text - Set the text for a page of the booklet.

SYNTAX

        void add_text(int page, string text)

DESCRIPTION

        This function adds the text for a page of the booklet. Things to note:
        1/ The added text is run through eval() before being presented.
        2/ If the text is a string starting with either '/' or '~' it will be
           interpreted as a file name, and that file will be read.

FUNCTION


NAME

        set_blocked - 

SYNTAX

        void set_blocked()

DESCRIPTION

        After calling this function, no more pages can be added to the 
        booklet.

FUNCTION


NAME

        query_long - 

SYNTAX

        string query_long(string item)

DESCRIPTION

        This function handles a lot of the versatility of the note; if you
        feel that you have to change this function, you should consider
        creating your own 'booklet' object.

FUNCTION


NAME

        query_blocked - 

SYNTAX

        int query_blocked()

DESCRIPTION

        This function returns the value of the block variable.

FUNCTION


NAME

        query_data - 

SYNTAX

        mapping query_data()

DESCRIPTION

        The data mapping of the booklet is returned. This will be a copy of the
        mapping, with every page run through eval(). This might not be what the
        naive user belives it to be.

FUNCTION


NAME

        query_raw_data - 

SYNTAX

        mapping query_raw_data()

DESCRIPTION

        The raw data mapping of the booklet is returned. Note that due to the
        scheme of how tings are passed as arguments and returned values, this
        will NOT be a copy, but a reference to the original mapping! Thus any
        changes you do to it, will apply to the object you queried, too!

FUNCTION


NAME

        cmd_read - 

SYNTAX

        int cmd_read(string foo, string what)

DESCRIPTION

        This function deals with the read command. If you find that you have a
        need to change this function, consider creating your own 'booklet'
         object.