|
|
[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/effects.c, /std/basic/auto_load.c, /std/basic/id.c, /std/basic/identity_hold.c, /std/basic/help_files.c, /std/basic/extra_look.c, /std/basic/theft_callback.c, /std/basic/property.c, /std/basic/misc.c, /std/basic/enchant.c, /std/basic/init.c and /std/basic/read_desc.cIncludes
This class includes the following files /include/cmr.h and /include/move_failures.hMethod index
Public Functions
These are functions that everyone can access.
-
add_material
void add_material(mixed material)
This method adds a material to the end of the list of current materials. If
you would like the material to be added to the beginning of the materials
array instead, use set_material().
- Parameters:
material - the material to add
- See also:
set_material()
-
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
-
move
varargs int move(mixed dest,
string messin,
string messout)
-
parse_command_adjectiv_id_list
string * parse_command_adjectiv_id_list()
-
parse_command_id_list
string * parse_command_id_list()
-
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()
This gives the primary material of the object, that is, the one listed first
in its materials array.
- Returns:
the name of the object's primary material, or 0 if no materials set
- See also:
query_materials()
-
query_materials
string * query_materials()
This returns all of the materials of the object.
- Returns:
an array contaning all the object's materials
- See also:
query_material()
-
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.
-
reset_materials
void reset_materials()
This resets all of the materials of the object (i.e. empties out its
materials array).
-
set_colour
void set_colour(string word)
Sets the colour of the object.
- Parameters:
word - the colour to make the object
-
set_material
varargs void set_material(mixed word,
int clear_old_materials)
This method adds a material to the front of the list of current materials.
Optionally, it can also clear out any existing materials first, although
this behaviour is not the default, requiring the second argument to be
nonzero. If you would like the material to be added to the end of the
materials array instead, use add_material().
- Parameters:
word - the material to add
clear_old_materials - 1 to clear out the existing materials, 0 to not
- See also:
add_material()
-
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
|