[Package Index | Mudlib Index | Effect Index]
Written by Taffyd
.
void make_glass(string drink,
string glass_description,
string glass_size,
int amount,
int has_contents)
This function is used to transform the glass into a new type of glass, changing the
short descriptions and adding aliases and adjectives.
If the 'contents' parameter is 1, then the glass is automatically filled
up with a drink made from /obj/reagents/generic_liquid.ob
// Create a large glass of tomato juice
glass = clone_object("/obj/glass");
glass->make_glass("tomato juice", "Red, thick, delicious.\n",
"large glass", 4000, 1);
glass->move(this_object());
inherit "/obj/glass";
void setup() {
// Do your own configuration of the glass, then call make_glass
...
make_glass("chocolate milkshake", "Yumm...", "shot glass", 100, 0);
...
// Place your own contents in, do other funky stuff.
}