[ Package Index | Mudlib Index | Effect Index ]

File /std/bit.c

The bit object is the object created to handle bits of corpses, like fingers and eyes and so on.

Written by Ember


Inherits

This class inherits the following classes std/object.c

Includes

This class includes the following files /include/corpse.h and /include/bit.h

Method index

 o add_bit_gone(string)
 o do_cure()
This method cures the corpse.
 o do_decay()
This method is called by the bits controller to do the actual decaying of the object.
 o do_eat()
The main eat entry point.
 o extra_look()
 o make_bit(string)
This method creates a bit from the current bit.
 o make_bits(string *)
This method makes a bunch of bits at once.
 o no_decay()
THis method checks to see if the bit can inherently not decay.
 o query_bit_data()
This method returns the bit data for the bit.
 o query_bit_left(string)
This method figures out of the specified bit is left.
 o query_bit_left_pl(string)
This method figures out of the specified bit is left using the plural name.
 o query_bits_gone()
This method returns the current array of bits gone from this bit.
 o query_bits_left()
This method returns the current array of bits left.
 o query_collective()
 o query_cured()
This returns the cured state of the bit.
 o query_decay()
This method returns the current decay level of the corpse
 o query_determinate(object)
 o query_edible()
This method checks to see if the bit is edible or not.
 o query_medium_alias()
 o query_possible_bits(string)
This method returns the possible bits that can be removed from this bit.
 o query_possible_plural_bits(string)
This returns the plural of all the possible bit names.
 o query_race_name()
This method returns the name of the race associated with this bit.
 o query_race_ob()
This method returns the race object associated with the bit.
 o query_vect()
This method returns the vector used with the potion space.
 o set_bit(string, int)
This method sets the bit that this actually is.
 o set_bits()
This method sets all the basic bits for the bit when it is first created.
 o set_bits_gone(string *)
This method sets the array of gone bits on the bit.
 o set_corpse_weight(int)
This method sets the weight of the bit.
 o set_race_name(string)
This method sets the name of the race associated with the corpse.
 o set_race_ob(object)
This method sets the race object associated with the corpse.
 o setup_long()
This method setsup the long and short based on the current decay levels of the corpse.

Public Functions

These are functions that everyone can access.

.
 * add_bit_gone
mixed * add_bit_gone(string bit)
 * do_cure
void do_cure()
This method cures the corpse. A cured bit no longer decays.

 * do_decay
int do_decay()
This method is called by the bits controller to do the actual decaying of the object.

Returns:
1 if it still exists, 0 if it has finished decaying
 * do_eat
int do_eat()
The main eat entry point.

Returns:
1 on success, 0 on failure
 * extra_look
string extra_look()
 * make_bit
object make_bit(string which_bit)
This method creates a bit from the current bit.

Parameters:
which_bit - the name of the bit to create
Returns:
the object that is the new bit
 * make_bits
object * make_bits(string * what_bits)
This method makes a bunch of bits at once.

Parameters:
what_bits - the list of bits to create
Returns:
the array of made bits
 * no_decay
int no_decay()
THis method checks to see if the bit can inherently not decay. Like trolls teeth and other such things.

Returns:
1 if it cannot decay, 0 if it can
 * query_bit_data
mixed query_bit_data()
This method returns the bit data for the bit. The return array is of the format same format as used in the races.

Returns:
the bit data
See also:
/std/races/basic.c
 * query_bit_left
string query_bit_left(string s)
This method figures out of the specified bit is left.

Parameters:
s - the bit to check if it is left
Returns:
the name of the bit if it is left
 * query_bit_left_pl
string * query_bit_left_pl(string s)
This method figures out of the specified bit is left using the plural name.

Parameters:
s - the bit to check if it is left
Returns:
the name of the bit if it is left
 * query_bits_gone
string * query_bits_gone()
This method returns the current array of bits gone from this bit.

Returns:
the list of missing bits
 * query_bits_left
string * query_bits_left()
This method returns the current array of bits left.

Returns:
the array of bits left
 * query_collective
int query_collective()
 * query_cured
int query_cured()
This returns the cured state of the bit.

Returns:
1 if it is cured, 0 if not
 * query_decay
int query_decay()
This method returns the current decay level of the corpse

Returns:
the current decay level
 * query_determinate
string query_determinate(object caller)
 * query_edible
int query_edible()
This method checks to see if the bit is edible or not.

Returns:
1 if it is edible, 0 if not
 * query_medium_alias
string query_medium_alias()
 * query_possible_bits
string * query_possible_bits(string word)
This method returns the possible bits that can be removed from this bit. If the bits are restricted then the possible bits are the ones that are contained by that bit.

Parameters:
word - restrict the possible bits
Returns:
the list of possible bits
 * query_possible_plural_bits
string * query_possible_plural_bits(string word)
This returns the plural of all the possible bit names. If the bits are restricted then the possible bits are the ones that are contained by that bit.

Parameters:
word - restrict the possible bits
Returns:
the array of possible bit names
 * query_race_name
string query_race_name()
This method returns the name of the race associated with this bit.

Returns:
the name of the race
 * query_race_ob
object query_race_ob()
This method returns the race object associated with the bit.

Returns:
the race object
 * query_vect
int * query_vect()
This method returns the vector used with the potion space. I think this call is now obsolete and not used.

Returns:
the vectorof the bit
 * set_bit
void set_bit(string s,
             int dec)
This method sets the bit that this actually is.

Parameters:
s - the name of the bit
dec - the current decay numbe
 * set_bits
void set_bits()
This method sets all the basic bits for the bit when it is first created.

 * set_bits_gone
void set_bits_gone(string * bits)
This method sets the array of gone bits on the bit.

Parameters:
bits - the set of bits gone to set
 * set_corpse_weight
void set_corpse_weight(int i)
This method sets the weight of the bit.

Parameters:
i - the weight of the bit
 * set_race_name
void set_race_name(string s)
This method sets the name of the race associated with the corpse.

Parameters:
s - the race name to set
 * set_race_ob
void set_race_ob(object s)
This method sets the race object associated with the corpse.

Parameters:
s - the race object to set
 * setup_long
void setup_long()
This method setsup the long and short based on the current decay levels of the corpse.


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 02:07:18 GMT

Lost? Try Discworld's home page.