seed.c

final_realms_fluffos_v1/lib/obj/seed.c · 455 B

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

inherit "/std/object";
#define PLANT_HANDLER "/obj/handlers/plant"

string plant;

void set_plant(string s)
{
   plant = s;
}

void set_germ(int n)
{
   call_out("germinate", n, n);
}

void germinate(int n)
{
   object newplant;

   if (PLANT_HANDLER->query_population(plant) >= plant->query_max()) {
      call_out("germinate", n, n);
      return;
   }
   newplant = clone_object(plant);
   newplant->move(environment());
   this_object()->dest_me();
}

Site Stats

Snippets: 1791
Codebases: 571