[DGD]Re: Global Reset

Stephen Schmidt schmidsj at union.edu
Mon Sep 11 23:21:19 CEST 2000


On Mon, 11 Sep 2000, Lord Lerkista wrote:
> Soo mmm how can i do the global reset??
> there's any function that can i use to know the objects that are active in 
> the mud?? and use it to check the reset in each one??

I'm fully sympathetic to Erwin's reply to this question, but at
the risk of throwing good effort after bad, I'll try at least a
short answer to this:

1) There's no function in DGD to return all active objects. Your
mudlib has to keep track of that. Add something to create() in
the auto object to notify a daemon object when an object is
born, and something in destruct() to notify the daemon when
it's destroyed. I think the 2.4.5 mudlib has an example of
this you could look at.
2) You don't "check" a reset. Either you call the function or
you don't. You could have each object keep track of the last
time it reset, and have reset() check that time so as to just
return 0 if it didn't want to do it again. But it's probably
not worth it.
3) To repeat my last, apparently unread post: You do a global
reset by having a daemon object which tracks the global changes,
then you have each individual object query the daemon when it
resets of its own accord. That's not the only way to do it but
it's probably the best. If you didn't understand that, you
need to go get some more education before you tackle a project
like the one you describe.

Steve Schmidt

 
"Bill Gates' biggest fear is not that some kid is brewing up the next killer
app in his garage in Kenosha. His biggest fear is that some kid will brew up
the next killer app in his garage in Kenosha and Microsoft won't own it."
	Seattle Times, 4/1-7 2000






List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list