set_continuous |
Discworld cont_medium help |
set_continuous |
Name
set_continuous - Make this medium continuous!
Syntax
void set_continuous();
Description
A continuous medium or object is something that will automatically group. An example of this would be rice. You would not want to have hundreds of individual objects for each grain of rice, but if you code it as a continuous object then you can refer to each bit of rice individually or handfuls, or the whole lot. Whatever you want.
Example
/* Food inherits cont_medium */
inherit "/obj/food";
void setup() {
set_name("rice");
set_long(
"Little oval shaped hard nuggets, they are made almost totally "
"of starch.\n");
/* Make it a continuous object */
set_continuous();
/* Set an alias to the medium so that it can be connected correctly */
set_medium_alias("RiceStuff");
/* How much of the stuff we have here */
set_amount(100);
/* 200 bits of rice weighs 1 weight unit */
set_weight_unit( ({ 1, 200 }) );
/* The name of a pile of them */
set_pile_name("pile");
/* The size of each of the amounts */
set_amount_types( ([ "pinch" : ({ 1, "pinches" }),
"handful" : ({ 100, "handfuls" }),
"bucket" : ({ 10000, "buckets" }) ]) );
/* The name for each of the sizes of piles */
set_pile_types(({ 400, "small", 800, "medium", 1600, "large", "huge" }) );
} /* setup() */
See also
set_continuous, reset_continuous