Package parpg :: Package objects :: Module composed :: Class CarryableContainer
[hide private]
[frames] | no frames]

Class CarryableContainer

source code

         object --+            
                  |            
    base.BaseObject --+        
                      |        
     base.DynamicObject --+    
                          |    
         object --+       |    
                  |       |    
    base.BaseObject --+   |    
                      |   |    
        base.Scriptable --+    
                          |    
             base.Container --+
                              |
     object --+               |
              |               |
base.BaseObject --+           |
                  |           |
 base.DynamicObject --+       |
                      |       |
        base.GameObject --+   |
                          |   |
     object --+           |   |
              |           |   |
base.BaseObject --+       |   |
                  |       |   |
 base.DynamicObject --+   |   |
                      |   |   |
         base.Carryable --+   |
                          |   |
         object --+       |   |
                  |       |   |
    base.BaseObject --+   |   |
                      |   |   |
            base.Usable --+   |
                          |   |
              CarryableItem --+
                              |
                             CarryableContainer

Composite class that will be used for backpack, pouches, etc.

Nested Classes [hide private]

Inherited from base.Container: ItemSelf, SlotBusy, TooBig

Instance Methods [hide private]
 
__init__(self, item_type, **kwargs)
Initialise minimalistic set of data
source code
 
getWeight(self)
Resulting weight of a container
source code
 
setWeight(self, weight)
Set container's own weight.
source code
 
getBulk(self)
Resulting bulk of container
source code
 
setBulk(self, bulk)
Set container's own bulk.
source code
 
__repr__(self)
A debugging string representation of the object
source code
 
getStateForSaving(self)
Returns state for saving
source code

Inherited from base.Container: count, findItem, findItemByID, findItemByItemType, getContentsBulk, getItemAt, indexOf, placeItem, removeItem, replaceItem, serializeItems, takeItem

Inherited from base.Container (private): _placeAtVacant

Inherited from CarryableItem: prepareStateForSaving

Inherited from base.GameObject (private): _getCoords, _setCoords

Inherited from base.Carryable: getInventoryThumbnail

Inherited from base.DynamicObject: __getstate__, __setstate__, restoreState

Inherited from base.Scriptable: runScript, setScript

Inherited from base.BaseObject: trueAttr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  weight = property(getWeight, setWeight, "Total weight of conta...
  bulk = property(getBulk, setBulk, "Total bulk of container")

Inherited from base.GameObject: coords

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, item_type, **kwargs)
(Constructor)

source code 

Initialise minimalistic set of data

Parameters:
  • name - Object display name
  • name - Filename of image to use in inventory
Overrides: object.__init__
(inherited documentation)

setWeight(self, weight)

source code 

Set container's own weight. For compatibility with inherited methods

setBulk(self, bulk)

source code 

Set container's own bulk. For compatibility with inherited methods

__repr__(self)
(Representation operator)

source code 

A debugging string representation of the object

Overrides: object.__repr__
(inherited documentation)

getStateForSaving(self)

source code 

Returns state for saving

Parameters:
  • state (dictionary) - State of the object
Overrides: base.BaseObject.getStateForSaving

Class Variable Details [hide private]

weight

Value:
property(getWeight, setWeight, "Total weight of container")