[CF-Devel] Pickup Code Revisited

Darren O. Benham gecko at benham.net
Sat Mar 10 18:31:57 CST 2001


Hi!

About a year ago, I suggested some changes to the pickup code.. offered a
patch and then disappeared.  (well, sorta)  Well, the patch doesn't apply to
the 0.96 release and had some problems so I thought I'd look into it again.
I've taken into account comments made by both Mark and Scott and here's what
I'd like to add/change to the code:

pickup changes from "pickup <0-7> or <value_density>" to 
"pickup [no] <types> [<value_density>]"

Where types would be a text representation of the object types that are
appropriate for autopickup.  (currently seem to be about 28).  Setting a
density value will only pickup that type of item if the density value is
triggered using the same formula currently in place.  A density value of
"all" or if no density value is specified would cause density to be ignored
and pickup up everything.  Placing a "no" in front of the command causes
nothing of that type to be picked up.

There would be a special type-words created such as "density" which would 
cause ANYTHING matching the given density to be picked up and "all" which 
would cause anything that can be pickedup to be picked up.  There would also
be type-words for classes of types such as "weapons" for "bows", "arrows",
and anything else weapon related.

The player structure would have to change.  "mode" would be removed.  In it's 
place would be a series of unsigned chars that represent the densities of each
item type to be picked up.  Density set to 0 would be don't pickup and
Density of 1 would be pickup everything.  Any other density value would be
pickup that density value.  At density value 255, there are some things that
would be picked up ... and other things skipped.
Also, by adding a bit flag "stop_before" and "stop_after" we can implement
the "stop before pickup" and "pickup and stop" feature of the current method
("pickup stop before" and "pickup and stop")

Question:

Shall I start the coding??  Much of it I'll be able to take from the old
patch I created....

-- 
Please cc all mailing list replies to me, also.
* 
     
     http://benham.net/index.html
     
             <
     
     gecko at benham.net
     
     >           <><  *
* Debian:                             Software in the Public Interest:  *
*   Project Secretary                   Treasurer                       *
*   Webmaster Team                                                      *
*   BTS Team                          siteROCK:                         *
*   Lintian Team                        Linux Infrastructure Engineer   *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20010310/c85f66e4/attachment.pgp
     
     
    


More information about the crossfire mailing list