Package parpg :: Package objects :: Module base :: Class DynamicObject
[hide private]
[frames] | no frames]

Class DynamicObject

source code

object --+    
         |    
BaseObject --+
             |
            DynamicObject

Class with basic attributes

Instance Methods [hide private]
 
__init__(self, name="Dynamic object", real_name=None, image=None, **kwargs)
Initialise minimalistic set of data
source code
 
prepareStateForSaving(self, state)
Prepares state for saving
source code
 
restoreState(self, state)
Restores a state from a saved state
source code
 
__getstate__(self) source code
 
__setstate__(self, state) source code
 
getStateForSaving(self)
Returns state for saving
source code

Inherited from BaseObject: trueAttr

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name="Dynamic object", real_name=None, image=None, **kwargs)
(Constructor)

source code 

Initialise minimalistic set of data

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

prepareStateForSaving(self, state)

source code 

Prepares state for saving

Parameters:
  • state (dictionary) - State of the object

restoreState(self, state)

source code 

Restores a state from a saved state

Parameters:
  • state (dictionary) - Saved state

getStateForSaving(self)

source code 

Returns state for saving

Overrides: BaseObject.getStateForSaving