NAME
	text.c - a note with a readable message

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

PRELIMINARY
	In the following, the object is refered to as 'note'. This should not
	be taken strictly; synonyms could be sign, pamphlet, plaquette ...

SETUP FUNCTIONS
	add_text
	set_blocked

QUERY FUNCTIONS
	query_long
	query_blocked
	query_text

REMOTE FUNCTIONS
	remote_pre_read
	remote_post_read
	remote_pre_burn
	remote_post_burn

SPECIAL PROPERTIES
	__format
	__message_in_long
	__message_notification
	__no_empty_msg
	__no_text
	__remote
	burnable
	demand_inventory
	no_fail_msg
	non-gettable	(via inherit)
	read_msg
	simplemore	(via inherit)

=======================================================================
NAME
	add_text - set the text for the note

SYNTAX
	void add_text(string text)

DESCRIPTION
	This function adds the text that can be read on the note. Note that
	this is run through the eval() function before being presented; this
	makes for great versatility.

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

SYNTAX
	void set_blocked()

DESCRIPTION
	After calling this function, the message on the note can no longer
	be changed.

=======================================================================
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 'note' object.

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

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

=======================================================================
NAME
	query_text

SYNTAX
	string query_text()

DESCRIPTION
	The message of the note is run through eval(), and the result is
	returned. This might not be what the naive user belives it to be.

=======================================================================
NAME
	remote_prevent_read

SYNTAX
	mixed remote_prevent_read(object text_ob, object reader)

DESCRIPTION
	This function is called to check if the reader is allowed to read the
	text of the object. Depending on the value returned, different things
	will happen:
	zero	The reader is allowed to partake of the text.
	integer	The reader is not allowed to read the text and a default
		message about this is written as an exscuse.
	string	The reader is not allowed to read the text and the returned
		string is used as the exscuse.

=======================================================================
NAME
	remote_pre_read

SYNTAX
	void remote_pre_read(object text_ob)

DESCRIPTION
	This function is called just before the text of the text object is 
	written to the reader.

=======================================================================
NAME
	remote_post_read

SYNTAX
	void remote_post_read(object ob)

DESCRIPTION
	This function is called just after the text has been written to the
	reader.

=======================================================================
NAME
	remote_pre_burn

SYNTAX
	void remote_pre_burn(object ob)

DESCRIPTION
	This function is called just before the text object is burned by the
	internal burn command.

=======================================================================
NAME
	remote_post_burn

SYNTAX
	void remote_post_burn(object ob)

DESCRIPTION
	This function is called just after the burn-message has been written
	to the player burning this object. Note that the object still exists
	at this point, but will be destroyed directly after this call.

=======================================================================
SPECIAL PROPERTIES
	__format
	  This property causes the written text from the note to be
	  line-breaked according to the players tty settings.
 
	__message_in_long
	  If this property is set, the text/message of the note is shown as
	  soon as you look at it, i.e. as part of the long description.
 
	__message_notification
	  Set this property to replace the standard "It is perhaps possible
	  to read it?\n" message notifying the player from long() that there
	  is a message on the note.
 
	__no_empty_msg
	  If set, this property inhibits the addition of "It is empty" to the
	  long desc when no message has been added to the note.

	__no_text
	  If set, replaces the message "It is empty" added to the long desc
	  when no message has yet been added to the note.

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

	burn_msg
	  This is a string used by /std/msg to tell the player and the room
	  that the note is being burned.

	burnable
	  If set, this object can be burned using the command 'burn'. Note that
	  this is really a general property, but that this object itself
          handles it.

	demand_inventory
	  If set the note must be in the inventory of the reader; if set to a
	  string that string is written to the reader when he tries to read a
	  note not in his inventory.

	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.

	non-gettable
	  If set, the note cannot be taken by players. This can be used to
	  make signs etc., that should not be moved. Se the documentation on
	  /std/basic_thing for more details.

	read_msg
	  This is the string used by /std/msg to tell the player and the room
	  that the note is being read.

	simplemore
	  The text is presented using the /obj/simplemore functionality.
	  See the documentation on /std/basic 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 107 since January 2020.
This file was last modified: June 2000.