|
|
[Package Index | Mudlib Index | Effect Index]
File /obj/cont_medium.c
Continuous Medium Object.
amount: current quantity of medium in arbitrary units
continuous: 1 for continuous (default), reset to 0 for normal
object behaviour
collective: 1 for collective, 0 for normal behaviour.
weight_unit: ({ a, b }) means that b units have weight a
value_scale (float): if set & continuous, value is ::query_value() * amount
* value_scale; else value is ::query_value()
medium_alias: used for identification - choose something with
capitals (e.g. "ChalkDust") so players can't
use it as a valid alias by accident
pile_name: "pile", "collection", "puddle", etc.
amount_types: ([ "pinch": ({ 1, "pinches" }),
"handful": ({ 50, "handfuls" }) ])
pile_types: ({ 50, "small", 100, "medium", 150, "large", "huge" });
Added by Jeremy, 4-Nov-95:
ground, longs, shorts, medium_aliases
The above were removed by Jeremy, 18-Jun-97. Hopefully no one will
miss them.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$. Example: $Vglows$glow
If there are any words which should be pluralized, place a $P in front of it,
like $Pleaf or $Pword
Finally you can use $A if you want "a word" in for one object and
"words" for more than one.
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
- adjust_amount(int)
This method changes the amount of stuff.
- amount_size(int, int)
This method returns a string which tells us how much stuff we
have.
- amount_size_short(int)
This method returns a string which tells us how much stuff we
have.
- dest_old_env(object)
This method destructs the temporary container.
- group_object()
This returns true if there are a bunch of the wombles.
- group_object_count()
This returns the number of objects in this group.
- long(string, int)
- make_medium_clone(int)
This method makes a duplicate of ourselves at a different size.
- merge()
This method attempts to merge this object with other objects
with the same medium alias.
- merge_criteria(object)
- new_collective(int)
- no_env_move(object, object)
This method checks to see if we are still in our silly little container
and if we are, moves us back.
- pile_size(int)
This method returns a string describing how big the pile is.
- query_amount()
This method returns the amount of the stuff there is.
- query_amount_types()
This method returns the types of the different amounts.
- query_biggest_size()
This returns what the biggest size unit is.
- query_collective()
This method tests to see if this object is a collective or not.
- query_continuous()
This method tests to see if this object is continuous or not.
- query_how_many(mixed)
This returns as an integer 'how many' we have of a particular
type.
- query_max_seen()
This method returns the maximum number of piles of the
object that can be seen.
- query_medium_alias()
This method returns the medium alias.
- query_merger()
This method returns 1 if the object is available for mergin.
- query_no_join()
This method checks to see if we are allowed to join with other
objects when we encounter them.
- query_pile_name()
This method returns the name we give the piles of this stuff.
- query_pile_types()
This method returns the array of pile types.
- query_value()
This method returns the value of the object.
- query_value_scale()
This method returns the current value scale.
- query_weight_unit()
This method returns the weight units used for this type
of unit.
- reset_collective()
This method removes the collective property from the object.
- reset_continuous()
This method removes the continuous property from the object.
- reset_no_join()
This method lets this object joining with other
objects when we encounter them.
- set_amount(int)
This method sets the amount of the stuff there is.
- set_amount_types(mapping)
This method sets the sizes of the piles and their names.
- set_collective()
- set_continuous()
This method makes the object continuous.
- set_medium_alias(string)
This method sets the medium alias for the object.
- set_no_env_move(object)
This method is for dealing with the object when bits are shaved off.
- set_no_join()
This method stops this object joining with other
objects when we encounter them.
- set_pile_name(string)
This method returns the name we give the piles of this stuff.
- set_pile_types(mixed *)
This method sets the name of the piles given the different
amounts of piles available.
- set_value_scale(float)
This method sets the amount by which to scale the value of a
continuous object.
- set_weight_unit(int *)
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.
- Parameters:
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.
|