Package horizons :: Package world :: Package disaster :: Module firedisaster :: Class FireDisaster
[hide private]
[frames] | no frames]

Class FireDisaster

source code

         util.changelistener.ChangeListener --+            
                                              |            
                   util.worldobject.WorldObject --+        
                                                  |        
                                           Disaster --+    
                                                      |    
buildinginfluencingdisaster.BuildingInfluencingDisaster --+
                                                          |
                                                         FireDisaster

Simulates a fire.

Instance Methods [hide private]
 
wreak_havoc(self, building)
The implementation to whatever the disaster does to affected objects goes here
source code
    Inherited from buildinginfluencingdisaster.BuildingInfluencingDisaster
 
__init__(self, settlement, manager) source code
 
breakout(self)
Picks (a) object(s) to start a breakout.
source code
 
end(self)
End this class, used for cleanup.
source code
 
evaluate(self)
Called to evaluate if this disaster is still active
source code
 
expand(self)
Called to make the disaster expand further
source code
 
infect(self, building, load=None)
Used to expand disaster to this building.
source code
 
load(self, db, worldid) source code
 
recover(self, building)
Inverse of infect().
source code
 
save(self, db) source code
    Inherited from util.worldobject.WorldObject
 
__lt__(self, other) source code
 
remove(self) source code
    Inherited from util.changelistener.ChangeListener
 
_changed(self)
Calls every listener when an object changed
source code
 
add_change_listener(self, listener, call_listener_now=False, no_duplicates=False) source code
 
add_remove_listener(self, listener, no_duplicates=False)
A listener that listens for removal of the object
source code
 
clear_change_listeners(self)
Removes all change listeners
source code
 
discard_change_listener(self, listener)
Remove listener if it's there
source code
 
discard_remove_listener(self, listener) source code
 
has_change_listener(self, listener) source code
 
has_remove_listener(self, listener) source code
 
remove_change_listener(self, listener) source code
 
remove_remove_listener(self, listener) source code
Class Methods [hide private]
    Inherited from buildinginfluencingdisaster.BuildingInfluencingDisaster
 
can_breakout(cls, settlement)
Returns whether or not a disaster can break out in the settlement
source code
    Inherited from util.worldobject.WorldObject
 
get_object_by_id(cls, id)
Returns the worldobject with id id Throws WorldObjectNotFound with the worldid as arg.
source code
 
get_objs(cls) source code
 
reset(cls) source code
Class Variables [hide private]
  TYPE = "The Flames Of The End"
hash(x)
  NOTIFICATION_TYPE = 'BUILDING_ON_FIRE'
  SEED_CHANCE = 0.005
  EXPANSION_RADIUS = 3
  DISASTER_RES = 99
hash(x)
  BUILDING_TYPE = 3
  MIN_BREAKOUT_TIER = 1
hash(x)
  MIN_INHABITANTS_FOR_BREAKOUT = 7
  STATUS_ICON = FireStatusIcon
hash(x)
  RESCUE_BUILDING_TYPE = 45
hash(x)
    Inherited from buildinginfluencingdisaster.BuildingInfluencingDisaster
  EXPANSION_TIME = TIME_BEFORE_HAVOC// 2-1
  TIME_BEFORE_HAVOC = GAME_SPEED.TICKS_PER_SECOND* 30
    Inherited from Disaster
  log = logging.getLogger("world.disaster")
Method Details [hide private]

wreak_havoc(self, building)

source code 

The implementation to whatever the disaster does to affected objects goes here

Overrides: Disaster.wreak_havoc
(inherited documentation)