On Thu, 9 May 1996, George wrote: > #3) Wearing a piece of armor over two spots. > > ACMD(do_wear) > [blah blah] > if (dotmode == FIND_ALL) { > for (obj = ch->carrying; obj; obj = next_obj) { > next_obj = obj->next_content; > if (CAN_SEE_OBJ(ch, obj) && (where = find_eq_pos(ch, obj, 0)) >= 0) { > items_worn++; > perform_wear(ch, obj, where); > } > } > > In the above code (and also the code below this in act.item.c if you > want it fully fixed) change it to check both positions. Then if both > are free, do a perform_wear() to both spots. And when they remove it > later, make sure you remove it both times also. One note, you have to > also change the ALL.obj code or else they will be able to wear the obj > in only one spot. I also assume you have two bits set for it and maybe > a flag so that an item you can wield and hold won't take both (except > for two-handed weapons of course). > > I probably missed some things but that's the "basic idea"... Unfortunately you also have to differentiate between an item which can be worn in 2 (or more) different, distinct locations (ie wear towel head, or wear towel waist..) and an item which takes up 2 (or more) eq slots when worn (like a full suit of plate armor). This becomes trickier now, a bit. You could add some sort of flag to the object, which would indicate that the given wear locations all mandatory instead of alternatives; but what if you wanted to be really flexible (and I'm not saying that's what Fionn wants; just tossing some possibilities here) and you wanted to have an item that covers 2 locations.. but there are different possible combinations of those 2 locations? Gets tricky... I know, I've tried to do it ;) If you're actually interested in the latter, I can tell you what I came up with, but it's probably not of general interest so... If you just want to be as simple as possible, you could just forget all about eq that could be worn in different locations entirely, and just have the multiple-location-covering items by means of George Greer's suggestion. Graham Gilmore ps George: don't sign as gg... don't want to get confused <grin> (What? I don't remember sending that.. ;)
This archive was generated by hypermail 2b30 : 12/18/00 PST