Re: [BPL11] object stacking

From: Patrick Dughi (dughi@IMAXX.NET)
Date: 08/18/98


> i have added object stacking to my code and realized that it didnt cover
> thieves peeking at the inventory.  So i did some looking around and found a
> snippet on Alex's site but it didnt seem to cover it either?  Has anyone
> changed this that could perhaps help me?

        I'll make an assumption that the object stacking takes the list of
objects in a room (like *obj and each has a *(obj->next) type pointer.....
and returns the output you want (stacked).

i'll bet that what ever that format is for the room, its the same for a
character..

-> from room_data struct:
  struct obj_data *contents;    /* list of items in a room              */

-> from character struct:

  struct obj_data *carrying;    /* head of list                         */

        So, i'd also bet you can cut and paste the snippet for the 'look
at room' for object stacking into your do_inventory code.

        Think of it as practice for highlighting code with a mouse,
copying it to a buffer, and then selecting a region to put the code into,
and then actually hitting the command to insert it.

        The changing of names from contains to carrying you can think of
as a stressful usage of intuition, guesswork, mental trickery, wit, guile,
and powerful usage of the dearth of information to divulge knowledge from
the merest hint of a nusance.

        I am not sarcastic at 7:15 in the morning.

                                                        PjD


     +------------------------------------------------------------+
     | 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/15/00 PST