[Package Index | Mudlib Index | Effect Index]
Written by Jeremy
Additions for collective objects:
Since "a" and "an" will be replaced with the number of objects,
"$a" and "$an" can be used if there should be a non-changing "a" or "an"
in the long.
For verbs you can use $V
.Inherits
This class inherits the following classes /std/object.cIncludes
This class includes the following files /include/money.h, /include/shops/bank.h, /include/parse_command.h, /include/move_failures.h and /include/obj_parser.hMethod index
This method changes the amount of stuff.
This method returns a string which tells us how much stuff we
have.
This method returns a string which tells us how much stuff we
have.
This method destructs the temporary container.
This returns true if there are a bunch of the wombles.
This returns the number of objects in this group.
This method makes a duplicate of ourselves at a different size.
This method attempts to merge this object with other objects
with the same medium alias.
This method checks to see if we are still in our silly little container
and if we are, moves us back.
This method returns a string describing how big the pile is.
This method returns the amount of the stuff there is.
This method returns the types of the different amounts.
This returns what the biggest size unit is.
This method tests to see if this object is a collective or not.
This method tests to see if this object is continuous or not.
This returns as an integer 'how many' we have of a particular
type.
This method returns the maximum number of piles of the
object that can be seen.
This method returns the medium alias.
This method returns 1 if the object is available for mergin.
This method checks to see if we are allowed to join with other
objects when we encounter them.
This method returns the name we give the piles of this stuff.
This method returns the array of pile types.
This method returns the value of the object.
This method returns the current value scale.
This method returns the weight units used for this type
of unit.
This method removes the collective property from the object.
This method removes the continuous property from the object.
This method lets this object joining with other
objects when we encounter them.
This method sets the amount of the stuff there is.
This method sets the sizes of the piles and their names.
This method makes the object continuous.
This method sets the medium alias for the object.
This method is for dealing with the object when bits are shaved off.
This method stops this object joining with other
objects when we encounter them.
This method returns the name we give the piles of this stuff.
This method sets the name of the piles given the different
amounts of piles available.
This method sets the amount by which to scale the value of a
continuous object.
This method sets the weight units used for this type
of stuff.
Public Functions
These are functions that everyone can access.
void adjust_amount(int number)
This method changes the amount of stuff.
number - the amount to change it by
varargs string amount_size(int exact,
int amt)
This method returns a string which tells us how much stuff we
have.
string representing the amount of stuff we have
varargs string amount_size_short(int amt)
This method returns a string which tells us how much stuff we
have.
string representing the amount of stuff we have
void dest_old_env(object place)
This method destructs the temporary container.
place - the object to destroy
int group_object()
This returns true if there are a bunch of the wombles.
int group_object_count()
This returns the number of objects in this group.
the number of objects in the group
string long(string words,
int dark)
object make_medium_clone(int number)
This method makes a duplicate of ourselves at a different size.
number - the new size of the object
the new object
void merge()
This method attempts to merge this object with other objects
with the same medium alias.
int merge_criteria(object ob)
object new_collective(int number)
void no_env_move(object dest,
object place)
This method checks to see if we are still in our silly little container
and if we are, moves us back. We always dest the old container
dest - where we are going to
place - the temporary container
varargs string pile_size(int amt)
This method returns a string describing how big the pile is.
the size of this pile of stuff
int query_amount()
This method returns the amount of the stuff there is. This is a
volume measurement.
the amount of stuff
mapping query_amount_types()
This method returns the types of the different amounts.
argument is a mapping which contains the name of the pile and
value is an array, the first element is the amount needed for
the name and the second element is the plural of the pile name.
the amount types mapping
string query_biggest_size()
This returns what the biggest size unit is.
a string representation of the biggest size unit.
int query_collective()
This method tests to see if this object is a collective or not.
1 if it is continuous, 0 if not.
int query_continuous()
This method tests to see if this object is continuous or not.
1 if it is continuous, 0 if not
varargs int query_how_many(mixed proxy)
This returns as an integer 'how many' we have of a particular
type.
int representing the amount of a particular pile.
int query_max_seen()
This method returns the maximum number of piles of the
object that can be seen. Any more than this turns into 'many'.
the maximum number of piles that can be seen
string query_medium_alias()
This method returns the medium alias. This should be a unique alias
for the medium, it is used when joining to see if we can join or not
It it used for identification - choose something with
capitals (e.g. "ChalkDust") so players can't
use it as a valid alias by accident.
the medium alias
int query_merger()
This method returns 1 if the object is available for mergin.
1 if we can merge
int query_no_join()
This method checks to see if we are allowed to join with other
objects when we encounter them. A join will occur if we end up in
same environment and the medium aliases match.
1 if they cannot join, 0 if they can
string query_pile_name()
This method returns the name we give the piles of this stuff. This
is the name given to piles of the object.
the name of the pile
mixed query_pile_types()
This method returns the array of pile types.
The pile types array starts with a number, the number is the
cut off amount to get the size name in the next array element.
The numbers and strings alternate and the last element is the
the default size.
the array of pile types
int query_value()
This method returns the value of the object. If the object is
not continuous, or the value_scale has not been set, the value is
the value set with set_value(), as usual. Otherwise, the value is
scaled by value_scale and multiplied by the current amount.
the value of the object
set_value(), set_value_scale() and query_value_scale()
float query_value_scale()
This method returns the current value scale.
the value scale
set_value_scale() and query_value()
int * query_weight_unit()
This method returns the weight units used for this type
of unit. The weight unit is an array ({ a, b }) which means
that b units of stuff have weight a.
the weight array
void reset_collective()
This method removes the collective property from the object.
void reset_continuous()
This method removes the continuous property from the object.
void reset_no_join()
This method lets this object joining with other
objects when we encounter them. A join will occur if we end up in
same environment and the medium aliases match.
void set_amount(int number)
This method sets the amount of the stuff there is.
number - the amount to set it to
void set_amount_types(mapping map)
This method sets the sizes of the piles and their names. The
argument is a mapping which contains the name of the pile and
value is an array, the first element is the amount needed for
the name and the second element is the plural of the pile name.
map - the amount types mapping
set_amount_types( ([ "pinch": ({ 1, "pinches" }),
"handful": ({ 50, "handfuls" }) ]));
void set_collective()
void set_continuous()
This method makes the object continuous.
void set_medium_alias(string word)
This method sets the medium alias for the object.
This should be a unique alias
for the medium, it is used when joining to see if we can join or not
It it used for identification - choose something with
capitals (e.g. "ChalkDust") so players can't
use it as a valid alias by accident.
& @param word the medium alias
void set_no_env_move(object dest)
This method is for dealing with the object when bits are shaved off.
If it is split up by someone referencing it we are moved into a
special environment so we do not interfer with the old pile. The
property "medium dest" will be used as the place to go, otherwise
the environment will be used. This method sticks it into a special
on the fly created container.
dest - the place to move too (this will be the "medium dest" or
the environment()
void set_no_join()
This method stops this object joining with other
objects when we encounter them. A join will occur if we end up in
same environment and the medium aliases match.
void set_pile_name(string word)
This method returns the name we give the piles of this stuff.
word - the name of the pile
set_pile_name("puddle");
void set_pile_types(mixed * args)
This method sets the name of the piles given the different
amounts of piles available. The last pile type in the list is
the size to use for anything larger. The pile sizes must be in
order.
args - the pile types
set_pile_types(({ 50, "small", 100, "medium", 150, "large", "huge" }));
void set_value_scale(float f)
This method sets the amount by which to scale the value of a
continuous object. If not set, the value will be that set with
set_value().
f - the value scale
query_value_scale() and query_value()
void set_weight_unit(int * numbers)
This method sets the weight units used for this type
of stuff. The weight unit is an array ({ a, b }) which means
that b units of stuff have weight a.
numbers - the new weight unit