Re: CODE: Reordering equip list

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


On Fri, 27 Sep 1996, Sammy wrote:

> On Fri, 27 Sep 1996 BuckFloyd@aol.com wrote:
>
> > Here's my current problem:  I've added a bunch of new wear positions (back,
> > upper leg, etc.)
> > and all works great.  However, I wanted to have the sequence in which it is
> > displayed
> > reordered, but it isn't working.   Here's what I've done so far.
> >
> > 1.  In structs.h, I changed the #define WEAR_ list to a new order sequence.
> >  I *did not*,
> >      however, change ITEM_WEAR.
> >
> > 2.  In constants.c, I modified the *where[] and *equipment_types[] vars, to
> > reflect my
> >      new preferred list order.
> >
> > 3.  I modified  act.informative.c by changing do_equip so that every wear
> > position would
> >      so "nothing" was displayed in a given wear position if it was empty
> >  (for testing).
> >
>
> 4.  Edit every single worn object in the entire mud.  You switched the
> meaning of the wear positions around, but the objects are still using the
> same values.  So if you switched WEAR_HEAD with WEAR_ARMS, all the old
> helmets become gauntlets and vice versa.
>
> I see two choices.  Edit every object to work with the new system or
> write a convertor.   I'd fix it by putting a hack in parse_object to
> convert during bootup.  That alone will fix the problem.  Even better
> would be to write all the object files back out right after converting
> them, then take the conversion code out.  Presto chango :)


Hehe, naering a flame for a long quote, I know... couldn't resist :)

Anyway, the way I did it, was to just hack the look way object/waer
possitions are shown to people. You can build up an array that defines
what tway the list should look without editing the original values of the
WEAR_xxx possitions, and still having that HOLD objects at the bottom even
though there might be WAER_xx possitions that have a higher number.
Havent gotten the code arround, so I can't really give any code hints at
this moment.

Regards,
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