NAME
	booklet.c - a small collection of pages

INHERITS
	basic_thing.c
	See the documentation on basic_thing for more details.

SETUP FUNCTIONS
	add_text
	set_blocked

QUERY FUNCTIONS
	query_long
	query_blocked
	query_data

SPECIAL FUNCTIONS
	cmd_read

SPECIAL PROPERTIES
	__format
	__remote
	nr_pages_in_long
	no_fail_msg
	read_msg
	simplemore	(via inherit)
	non-gettable	(via inherit)

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

=======================================================================
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.

=======================================================================
NAME
	set_blocked

SYNTAX
	void set_blocked()

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

=======================================================================
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.

=======================================================================
NAME
	query_blocked

SYNTAX
	int query_blocked()
	
DESCRIPTION
	This function returns the value of the block variable.

=======================================================================
NAME
	query_data

SYNTAX
	mapping query_data()

DESCRIPTION
	The data mapping of the booklet is returned. This might not be what
	the naive user belives it to be.

=======================================================================
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.

=======================================================================
SPECIAL PROPERTIES
	__format
	  This property causes the written text on the pages to be
	  line-breaked according to the players tty settings.
 
	__remote
	  If set (object or file name), checks will be done for the remote
	  functions:
		remote_prevent_read() ,
		remote_pre_read() ,
		remote_post_read() .

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

	no_fail_msg
	  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.

	read_msg
	  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 page being read.

	simplemore
	  The text is presented using the /obj/simplemore functionality.
	  See the documentation on /std/basic for more details.

	non-gettable
	  If set, the booklet cannot be taken by players. This can be used to
	  make booklets  that are chained to a wall or so. See the
	  documentation on /std/basic_thing for more details.

=======================================================================

Help topics available:
booklet.doc msg.doc msg.examples text.doc

[START|BACK ]




[ NannyMuds main page | FAQ | Contact us ]

You are guest number 128 since November 2019.
This file was last modified: June 2000.