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

Class BuildableSingleEverywhere

source code

  Buildable --+    
              |    
BuildableSingle --+
                  |
                 BuildableSingleEverywhere

Buildings, that can be built everywhere. Usually not used for buildings placeable by humans.

Class Methods [hide private]
 
check_build(cls, session, point, rotation=45, check_settlement=True, ship=None, issuer=None)
Check if a building is buildable here.
source code
    Inherited from BuildableSingle
 
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_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]
  terrain_type = None
hash(x)
    Inherited from Buildable
  CHECK_NEARBY_LOCATIONS_UP_TO_DISTANCE = 3
  irregular_conditions = False
Method Details [hide private]

check_build(cls, session, point, rotation=45, check_settlement=True, ship=None, issuer=None)
Class Method

source code 

Check if a building is buildable here. All tiles, that the building occupies are checked.

Parameters:
  • point - Point instance, coords
  • rotation - preferred rotation of building
  • check_settlement - whether to check for a settlement (for settlementless buildings)
  • ship - ship instance if building from ship @return instance of _BuildPosition
Overrides: Buildable.check_build
(inherited documentation)