environment-fix.c

MAGE.1.1.2/examples/environment-fix.c · 449 B

From the archive TinyMAGE-1.1.2.tar.gz

Download the archive   « Back to the archive contents

/*  This is a minimal function to zap all rooms in your MUCK database
 *  to their proper location in the global environment.  It's up to you
 *  to stick this somewhere in game.c to be used once and then removed.
 */

void zap_rooms(dbref player)
{
  dbref foo;

  for (foo = 0; foo < db_top; foo++) {
    if (Typeof(foo) == TYPE_ROOM)
      moveto(foo, (foo == GLOBAL_ENVIRONMENT) ? NOTHING : GLOBAL_ENVIRONMENT);
  }
  notify(player, "Done.");
}

Site Stats

Snippets: 1791
Codebases: 571