Re[2]: [CODE][OLC][?] Deleting

From: Gary Barnett (gbarnett@POLARNET.COM)
Date: 07/25/97


On Fri, 25 Jul 1997 10:34:08 -0400
Ron Cole <roncole@SHORE.INTERCOM.NET> wrote:

> >
> >> > > Is there any code out there to delete an object / room / mob?
> >> > > If so, this would be extremely useful...
> >> > Before some short sighted dork makes the comment, I am sure Chris refers
> >> > to deleting the obj/mob/room from the world files (using OLC, I
> >> > believe)... I have been looking for this myself, but I manage to garble
> >> > all the indexes with every approach I try.
> >> How about just creating a flag for it.. ITEM_DELETED. Then setup the olc
> >> save_to_disk routines to skip objs with that flag. Simple and works well.
> >> Even provides "Oops. I pressed the wrong button" protection, at least
> >> until reboot/crash :-)
> >
> >Sometimes the simplest is oversighted, I had not thought of this and is
> >actually simpler... I will see if I can do it..;)
>
> You might want to consider not using one of your ITEM flags for something that
> never gets saved... :-)   Just add another field to the prototypes or indexes
> and use that instead.
>
Pay me now, or pay me later, but sooner or later you gotta pay :-)

Space for the new field would be allocated for every prototype AND
every instance.. wasteful.. Better to use the flag... or you could
create a linked-list of vnums to delete..  Still better than a byte for
each prototype.

--Mallory


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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