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
canDropContents
Summary of Methods
affinityFor
moveAction
suitabilityFor
tryHolding
Properties
A BagOfHolding carried by the actor allows its contents to be dropped (via an implicit TAkeFrom) without the actor havign to perfoam an explicit take.
Methods
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.
The action needed to move an object into me.
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.
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 25/04/2024 from adv3Lite version 2.0