index_data (fwd)

From: Eric Pilcher (rasta@CSOS.ORST.EDU)
Date: 09/09/94


> 
> I've actually coded a solution to this, and I used option a because I
> only have to do the search once, and I can keep accurate numbers after
> that.  Basically, you need to go into objsave.c and when a new user comes
> into the game, SUBTRACT one instance of the object as it is being created,
> because the creation routine will add one back in.  When a player exits
> the game, ADD one instance of the object, since the purge routine subtracts
> one.  
>	All the numbers will end up balancing fine, and will only change if
> someone junks something, a zone resets, a God creates a new item, a shop
> produces something, or create food gets cast (there's probably more).  The
> best part is that this technique only modifies the code in 3 places, and
> the rest work fine.

Hmmm... any plans to modify these routines so that they also add or subtract
an instance of the object?  Seems like you've already done most the hard
work.  Why not set up the the ADD and SUBTRACT counters as modular routines
and then just modify these other cases to call the appropriate routine?

Just a suggestion.

-Eric:  rasta@CSOS.ORST.EDU, gt7282c@prism.gatech.edu | mud.CSOS.ORST.EDU 4000
------------------------------------------------------+------------------------



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