Room affections assigned in the world files

From: The Arrow (pt94jpi@student.hk-r.se)
Date: 02/04/97


Some people have asked me how to add assignments of room affections
(a small "invention" of mine) in the world files. So, here is the solution:

In the parse_room() function (in db.c, but I don't know the linenumber)
in the switch statement where it checks for doors and extra-description fields,
before "case 'S':" add the following:

    case 'F':
        if (!get_line(fl, line))
        {
            fprintf(stderr, "Format error in room #%d, " \
                            "expecting flag field after 'F'.\n", virtual_nr);
            exit(1);                         
        }
        world[room_nr].room_affections = asciiflag_conv(line);
        break;

It is as simple as that! :)

/ Joachim

------------------------------------------------------------------------
  The Arrow              Arrow@Shadow World - mud.fukt.hk-r.se 4000

  Joachim Pileborg       Email: pilen@fukt.hk-r.se
  Tranbärsvägen 22:19
  37238 Ronneby          http://www.fukt.hk-r.se/~pilen/
  SWEDEN
------------------------------------------------------------------------

+-----------------------------------------------------------+
| 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