Package horizons :: Package scenario :: Module conditions :: Class ConditionsRegistry
[hide private]
[frames] | no frames]

Class ConditionsRegistry

source code

util.python.registry.Registry --+
                                |
                               ConditionsRegistry

Class that holds all available conditions.

These are functions, that perform a certain check at one point in time. There is no memory, e.g. if you lose progress, conditions just aren't true any more.

Condition checking is split up in 2 types:

  1. possible condition change is notified somewhere in the game code
  2. condition is checked periodically
Instance Methods [hide private]
 
__init__(self) source code
 
register_function(self, func, periodically=False)
Register condition.
source code
Method Details [hide private]

register_function(self, func, periodically=False)

source code 

Register condition.

`periodically` means that this condition function will be called periodically by the ScenarioEventHandler.