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

Class BuildableRect

source code

Buildable --+
            |
           BuildableRect

Buildings one can build as a Rectangle, such as Trees

Class Methods [hide private]
 
check_build_line(cls, session, point1, point2, rotation=45, ship=None)
Checks out a line on the map for build possibilities.
source code
    Inherited from Buildable
 
_check_buildings(cls, session, position, island=None)
Check if there are buildings blocking the build.
source code
 
_check_island(cls, session, position, island=None)
Check if there is an island and enough tiles.
source code
 
_check_rotation(cls, session, position, rotation)
Returns a possible rotation for this building.
source code
 
_check_settlement(cls, session, position, ship=None, issuer=None)
Check that there is a settlement that belongs to the player.
source code
 
_check_units(cls, session, position) source code
 
check_build(cls, session, point, rotation=45, check_settlement=True, ship=None, issuer=None)
Check if a building is buildable here.
source code
 
check_build_fuzzy(cls, session, point, *args, **kwargs)
Same as check_build, but consider point to be a vague suggestions and search nearby area for buildable position.
source code
 
is_tile_buildable(cls, session, tile, ship, island=None, check_settlement=True)
Checks a tile for buildability.
source code
Class Variables [hide private]
    Inherited from Buildable
  CHECK_NEARBY_LOCATIONS_UP_TO_DISTANCE = 3
  irregular_conditions = False
  terrain_type = 1
Method Details [hide private]

check_build_line(cls, session, point1, point2, rotation=45, ship=None)
Class Method

source code 

Checks out a line on the map for build possibilities. The line usually is a draw of the mouse.

Parameters:
  • point1, point2 - Point instance, start and end of the line
  • rotation - prefered rotation
  • ship - ship instance if building from ship @return list of _BuildPositions
Overrides: Buildable.check_build_line
(inherited documentation)