setup.c

dw_fluffos_v1/lib/std/basic/setup.c · 766 B

From the archive dw_fluffos_v1.tar.gz

Download the archive   « Back to the archive contents

/**
 * This handles the setup code for rooms and objects.  It simplifies the whole
 * system and makes it nice and generic.
 * @author Pinkfish
 * @started May 16th
 */
private int _do_setup;

/**
 * This method increments the setup variable.
 */
protected void inc_setup() {
   _do_setup++;
} /* inc_setup() */

/**
 * This method decrements the setup variable.
 */
protected void dec_setup() {
   _do_setup--;
} /* dec_setup() */

/**
 * This method checks to see if the setup is possible.
 */
protected void do_setup() {
   if (!_do_setup) {
      this_object()->setup();
   }
} /* do_setup() */

/**
 * This method checks to see if the reset is possible.
 */
protected void do_reset() {
   if (!_do_setup) {
      this_object()->reset();
   }
} /* do_reset() */

Site Stats

Snippets: 1791
Codebases: 571