Re: [CODE]room saving without house

From: Rasmus 'Con' Ronlev (raro94ab@hp4.econ.cbs.dk)
Date: 12/14/96


On Sat, 14 Dec 1996, Peter Hartman wrote:

> How can i make a room save without making house?
> A house requires an atrium and a guest list.
> I've messed with house.c though not extensively.  If anyone has info for
> me I'd be much obliged.

Well, I made this using the existing routines and hacked them a little.
This goes off the top of my head.

In config.c I added a list, like
sh_int saved_rooms = {
  3001,
  5620,
  -1
};

Then I made a save_saved_rooms() routine in the house one, copying the one
that saves the normal house-rooms. As far as I remember one of the house
rountines takes a room number as a save argument, if not you should just
be able to hack a similar one yourself. Then just run this list of
saved_rooms through it, untill the room-number is -1.
Then you can make a similar routine, thats called along with the house
loading/booting one, that loads the rooms from the saved_rooms list.

I guess this could be made smarter, like making a index file or something,
but since I only use it on a couple of rooms, I didn't bother writing some
more flexible code. This way you need to compile and reboor the mud every
time you add a new room that has to be loaded/saved.

Well.. hope this helps,
Con


d.
--
     Rasmus Rønlev DOEK'94      WWW: http://www.econ.cbs.dk/people/raro94ab
     Student instructor         MUD: exiled.mud.circlemud.org 5000
                                         199.199.16.100 5000
       Student, B.Sc in Computer Science and Business Administration.

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



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