Package horizons :: Package world :: Package building :: Module buildable :: Class _BuildPosition
[hide private]
[frames] | no frames]

Class _BuildPosition

source code

A possible build position in form of a data structure. Don't use directly outside of this file

Instance Methods [hide private]
 
__init__(self, position, rotation, tearset, buildable, action='idle', problem=None) source code
 
__bool__(self)
Returns buildable value.
source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
__hash__(self) source code
Method Details [hide private]

__init__(self, position, rotation, tearset, buildable, action='idle', problem=None)
(Constructor)

source code 
Parameters:
  • position - Rect, building position and size
  • rotation - int rotation of building
  • tearset - list of worldids of buildings to tear for this building to build
  • buildable - whether building is actually buildable there
  • action - action (animation of building)
  • problem - (error number, error string) reason it's not buildable or None

__bool__(self)

source code 

Returns buildable value. This enables code such as "if cls.check_build()