Re: Multiple items viewed as [number]

From: Niese-Petersen (Tenp@cris.com)
Date: 10/25/96


On Fri, 25 Oct 1996, Jörgen Zigge Sigvardsson wrote:

> > 
> > Does any one know where the code is, or can give me an idea how to set 
> > the MUD up so instead of seeing:  
> > 
> > bread
> > bread 
> > bread
> > 
> > You see:
> > 
> > [3] bread
> > 
> 
> It can be solved in 2 ways (that I know of)
> 
> Way 1: (PSEUDO)
> 
---snip---
> Way 2: (Also Pseudo)
---snip---

Then way I did it, for some time ago on StrangeMUD, was do the stacking at
once in obj_to_obj, obj_to_room, obj_to_char, by going through the list of
objects and check if you find same kind. If it did add it into the list on
that spot, else add it first in list. Corpses and objects with same VNUM,
but not same description, wouldnt be stacked together. [Ofcoz had to check
for that too]. And then in list_obj_bleh_blah [cant remember what
function] just count the items that are the same [Like your PSEUDO thing]
Maybe slow.. But things was always in order.
You never saw:

[2] bread
[3] sword
bread

but:
[3] bread
[3] sword

and if then someone droped a sword, it would be in the right
order, with breads first and then the swords.

---
Erik Niese-Petersen
Aka Quint The typo God
Realms of Darkness IMP




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