Timed Shutdown (think someone asked)

From: B.H. Chan (bhchan@csua.berkeley.edu)
Date: 12/06/95

Think Someone asked about a timed shutdown, well ,
I went into comm.c adn poked around, and came up with
the following solution.  It might not be an eligant
hack to some, but it works.

The hacks are as follows (hope I don't forget something)

In the main game loop, instead of checking for circle_shutdown as
a boolean value, change it to while (circle_shutdown != 1)
now, go down withing game loop until after a user command is parsed
(actually, anywhere is fine) and dosomething like:
	if (circle_shutdown > 1) {
		switch (circle_shutdown) {
		case (300 RL_SEC):
			<print nifty message (send_to_all works.. maybe a page)
		case (you get the idea)

This will run the loop each (tick). Using RL_SEC makes everything timed
more intuitively.

Now, in act.wizard.c, you have to change the do_shutdown command...
every place where it sets circle_shutdown = 1, change it to the value
you want... for example, I have regular shutdown print a message and
set circle_shutdown to 300 RL_SEC... while reboot only goes 60 RL_SEC.
You known the drill.

Anyway, hope this helps some inquisitve impls.... I know I should do something
about circle_reboot, but I didn't (didn't have time to look into that.. this
took 10 minutes to hack, compile, test, be satisfied, so no guarentees).
-Billy (strom@lostlands... a mud with lots of code but no areas <sigh>)

This archive was generated by hypermail 2b30 : 12/07/00 PST