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

Class BuildableSingleOnOcean

source code

     Buildable --+        
                 |        
   BuildableSingle --+    
                     |    
BuildableSingleOnCoast --+
                         |
                        BuildableSingleOnOcean

Requires ocean nearby as well

Class Methods [hide private]
 
_check_island(cls, session, position, island=None)
Check if there is an island and enough tiles.
source code
    Inherited from BuildableSingleOnCoast
 
_check_rotation(cls, session, position, rotation)
Rotate so that the building faces the seaside
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_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]
  terrain_type = 3
    Inherited from BuildableSingleOnCoast
  irregular_conditions = True
    Inherited from Buildable
  CHECK_NEARBY_LOCATIONS_UP_TO_DISTANCE = 3
Method Details [hide private]

_check_island(cls, session, position, island=None)
Class Method

source code 

Check if there is an island and enough tiles. @throws _NotBuildableError if building can't be built.

Parameters:
  • position - coord Point to build at
  • island - Island instance if known before
Overrides: Buildable._check_island
(inherited documentation)