BagOfHoldingclassgadget.t[294]

Mix-in class to help with inventory management. A BagOfHolding can be mixed in with a Container (or, less usually, Surface, RearContainer or Underside) to provide an object which, if held by the player character, will be used to move objects in the player character's inventory to if his/her hands become too full to pick up another object.

class BagOfHolding :   object

Superclass Tree   (in declaration order)

BagOfHolding
        object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

(none)

Summary of Methods  

affinityFor  moveAction  suitabilityFor  tryHolding 

Properties  

(none)

Methods  

affinityFor (obj)gadget.t[304]

The affinity for this BagOfHolding for obj. This can be used to determined how 'willing' a particular BagOfHolding is to contain obj. A value of less than 1 means that the BagOfHolding can't contain obj at all. The higher the affinity, the better the choice this BagOfHolding is for obj. The default value is 100, or 0 for a BagOfHolding's affinity for itself.

moveAction ( )gadget.t[420]
The action needed to move an object into me.

suitabilityFor (obj)gadget.t[314]
To be suitable to contain obj a BagOfHolding must have enough spare capacity for it. If it has, its suitability is its affinity for obj; otherwise it's 0. A BagOfHolding is also unsuitable if it's locked.

tryHolding (obj)gadget.t[329]
Class method to determine whether the actor is carrying a suitable BagOfHolding that could be used to move something from his inventory into, and then to move items from the actor's inventory into an appropriate bag of holding.

Adv3Lite Library Reference Manual
Generated on 28/03/2016 from adv3Lite version 1.5