OBJECT
  /adm/obj/armageddon

LAST UPDATE
  Mateese, 30-June-1993

DESCRIPTION
  Armageddon is the god? demon? of game crashing.
  It takes care of shutting down the game; especially if the gamedriver
  runs out of memory. The login object explicitely queries for this
  object to reject logins in times of impending shutdowns.

  For this object, only the blueprint may exist in the game.
  It registers itself as the living 'armageddon'.
  Once started, Armageddon issues shutdown messages in exponentially
  decreasing intervals. During the last 10 minutes. special progress
  messages and some random messages are issued.
  The starting/stopping of shutdowns are logged in /log/adm/game

    void create ()
      The object is initialized, especially the shutdown and random
      messages. Other livings with the name 'armageddon' are
      destructed.

    int prevent_shadow (object shadow)
      Always returns 1 to deny shadowing.

    void heart_beat()
      During the last five minutes of a shutdown, random messages
      are issued with a chance of 5% per heart beat.

    int QueryShutProgress ()
      Returns the internal shut progress counter.
      External callers may use just the fact that a non-zero value
      denotes a shutdown in progress.

    int QueryTimeLeft ()
      If a shutdown is in progress, the time left is returned in
      seconds.

    string QueryReason ()
      If a shutdown is in progress, the set reason is returned.

    void doShout (string txt)
      Auxiliary function to shout <txt> to all players.


  The shutdown is started by calling this function:

    void Shutdown (int minutes, string why)
      Schedule a shutdown in <minutes> minutes, for the reason <why>.
      The call is ignored if a shutdown is already in progress.

    void contShutting (int seconds)
      Continues the shutdown.
      Checks if the time for the shutdown is reached and performs it
      then. Else, appropriate messages are issued and another
      callout to contShutting is issued.

    void Stop ()
      Stops a shutdown, if existing.

TODO
  Split armageddon into a demon and a NPC-frontend (some wizards like
  to have Armageddon as guest in their workroom).

CREDITS
  Messages originally written Aug. 1991 by Dogbowl, Nightfall.

SEE ALSO
  login(secure)

