Quantity(3)                                                        Quantity(3)



NNAAMMEE
       Quantity -

SSYYNNOOPPSSIISS
       Inherits IItteemm, and DDeesscc.

       Inherited by RReessoouurrccee.


   PPuubblliicc MMeetthhooddss
       void sseett__qquuaannttiittyy (int x)
       int qquueerryy__qquuaannttiittyy ()
       int ggeett__wweeiigghhtt__qquuaannttiittyy (int w)
       void sspplliitt__qquuaannttiittyy (int new_quantity)
       void oonn__mmoovvee (object src)

   PPuubblliicc AAttttrriibbuutteess
       int qquuaannttiittyy

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       This object is used to store quantities. If you're using all_present()
       for identifying objects, it will be able to split up quantifiable
       objects into distinct parts (for example, you might use this for coins;
       then, 'get five coins' from a pile of ten should make two piles of five
       coins).

       \warn If the quantity is greater than 1 when you edit the object,
       modified descriptions may be clobbered when the quantity is reset to 1.

       Definition at line 14 of file quantity.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   iinntt ggeett__wweeiigghhtt__qquuaannttiittyy ((iinntt ww))
       RReettuurrnnss::
           The maximum quantity that fits within the weight _w. For example, if
           w is 550, and this object weighs 100 per unit, The most you can
           carry is 5 units at 100 each. This function will return 5 in that
           case. The maximum value that will be returned is the actual
           quantity of this object.Generally, you call this function to figure
           out what value to use for split_quantity when picking up part of a
           large pile.

       Definition at line 47 of file quantity.c.

       References quantity.

   vvooiidd oonn__mmoovvee ((oobbjjeecctt ssrrcc))
       Used for combining objects together ... actually does this on a delayed
       function call, so you'll have about two seconds with the objects
       uncombined (unless something else calls combine_check() earlier). If
       you override the on_move event, objects will not recombine!

       Definition at line 92 of file quantity.c.

   iinntt qquueerryy__qquuaannttiittyy (())
       RReettuurrnnss::
           The quantity of this item

       Definition at line 34 of file quantity.c.

       References quantity.

   vvooiidd sseett__qquuaannttiittyy ((iinntt xx))
       Sets the quantity of this item. This is generally insufficient for a
       well-behaved item, but you will need to override the behavior you want
       to change. New query_distant and query_specific functions are generally
       a good idea.

       Definition at line 25 of file quantity.c.

       References quantity.

       Referenced by split_quantity().

   vvooiidd sspplliitt__qquuaannttiittyy ((iinntt nneeww__qquuaannttiittyy))
       A messy function that cuts this object into distinct parts. Very yucky.

       Definition at line 55 of file quantity.c.

       References quantity, and set_quantity().

MMEEMMBBEERR DDAATTAA DDOOCCUUMMEENNTTAATTIIOONN
   iinntt qquuaannttiittyy
       The stored quantity.

       Definition at line 18 of file quantity.c.

       Referenced by get_weight_quantity(), query_quantity(), set_quantity(),
       and split_quantity().


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                       Quantity(3)
