[ Package Index | Mudlib Index | Effect Index ]

File /std/object.c

The basic object. This pulls together all the bits needed to create a basic object.

See also:
/std/room.c

Written by Pinkfish


Inherits

This class inherits the following classes /std/basic/extra_look.c, /std/basic/misc.c, /std/basic/help_files.c, /std/basic/id.c, /std/basic/read_desc.c, /std/basic/theft_callback.c, /std/basic/auto_load.c, /std/basic/effects.c, /std/basic/property.c and /std/basic/enchant.c

Includes

This class includes the following files /include/cmr.h

Method index

 o add_material(mixed)
This method adds a material to the list of current materials.
 o clean_up(int)
 o long(string, int)
The description of an object when someone looks at it.
 o query_cloned_by()
Who cloned the object.
 o query_colour()
The colour of the object.
 o query_material()
The material of the object.
 o query_materials()
This returns all of the materials of the object.
 o query_objective()
The objective of the object.
 o query_possessive()
The possessive of the object.
 o query_pronoun()
The pronoun of the object.
 o query_quality()
This method returns the quality of the object.
 o replace_long_dollars(object, string)
This method replaces any colours of materials in the given string with the appropriate ccolours or materials for this object.
 o set_colour(string)
Sets the colour of the object.
 o set_material(mixed)
Sets the material of the object, this adds this material to the front of the material list.
 o set_name(string)
Gives the object a name.
 o set_player(object)
Sets the player associated with the object.
 o set_quality(int)
This method sets the quality of the object.

Public Functions

These are functions that everyone can access.

.
 * add_material
void add_material(mixed material)
This method adds a material to the list of current materials.

Parameters:
material - the material to add
 * clean_up
int clean_up(int inherited)
 * long
string long(string word,
            int dark)
The description of an object when someone looks at it. This handles the extra code for messages, colour and material.

Parameters:
word - the word it was matched on
dark - is it dark from the player's perspecitive
Returns:
the long description
 * query_cloned_by
string query_cloned_by()
Who cloned the object. Used for security reasoin to trace who have been cloning up objects for players.

Returns:
the person who cloned the object
 * query_colour
string query_colour()
The colour of the object.

Returns:
the colour of the objecy
 * query_material
string query_material()
The material of the object.

Returns:
the name of the material
 * query_materials
string * query_materials()
This returns all of the materials of the object.

Returns:
all the materials
 * query_objective
string query_objective()
The objective of the object.

Returns:
always returns "it"
 * query_possessive
string query_possessive()
The possessive of the object.

Returns:
always returns "its"
 * query_pronoun
string query_pronoun()
The pronoun of the object.

Returns:
always returns "it"
 * query_quality
int query_quality()
This method returns the quality of the object. The quality is used in the crafts system, amongst other things.

 * replace_long_dollars
string replace_long_dollars(object player,
                            string text)
This method replaces any colours of materials in the given string with the appropriate ccolours or materials for this object.

Parameters:
player - the player attempting to check the colour/material.
text - the text to replace
Returns:
a new string with the dollar identities expanded.
 * set_colour
void set_colour(string word)
Sets the colour of the object.

Parameters:
word - the colour to make the object
 * set_material
void set_material(mixed word)
Sets the material of the object, this adds this material to the front of the material list.

Parameters:
word - the material to set it to
 * set_name
void set_name(string word)
Gives the object a name. Sets the name to the word and makes it the short description and attempts to create the pural short description from it.

Parameters:
name - the name to use
 * set_player
void set_player(object thing)
Sets the player associated with the object. This is used during the autoload sequence.

Parameters:
thing - the player object we belong to
See also:
/global/auto_load.c
 * set_quality
void set_quality(int quality)
This method sets the quality of the object. All objects are by default 'normal' quality.

Parameters:
quality - the quality of the object

Discworld MUD's distribution world wide web pages.
brought to you by
Cut Me Own Throat Dibbler's Sensational Sausages; buy one while they are hot.
File last modified: Sat, 06 Sep 2003 03:52:12 GMT

Lost? Try Discworld's home page.