Package horizons :: Package ai :: Package aiplayer :: Package building :: Module irondeposit :: Class AbstractIronDeposit
[hide private]
[frames] | no frames]

Class AbstractIronDeposit

source code

                           AbstractBuilding --+    
                                              |    
fakeresourcedeposit.AbstractFakeResourceDeposit --+
                                                  |
                                                 AbstractIronDeposit

Instance Methods [hide private]
    Inherited from fakeresourcedeposit.AbstractFakeResourceDeposit
 
__init__(self, building_id, name, settler_level) source code
 
_get_producer_building(self) source code
 
directly_buildable(self)
You don't actually build resource deposits
source code
 
get_expected_cost(self, resource_id, production_needed, settlement_manager)
you don't actually build resource deposits
source code
 
ignore_production(self)
Return a boolean showing whether instances of this building can be used to calculate the production capacity.
source code
    Inherited from AbstractBuilding
 
build(self, settlement_manager, resource_id)
Try to build the best possible instance of this building in the given settlement.
source code
 
coverage_building(self)
Return a boolean showing whether buildings of this type may need to be built even when the production capacity has been reached.
source code
 
evaluator_class(self)
Return the relevant BuildingEvaluator subclass.
source code
 
get_evaluators(self, settlement_manager, resource_id)
Return a list of every BuildingEvaluator for this building type in the given settlement.
source code
 
get_expected_building_cost(self)
Return a value representing the utility cost of building the building.
source code
 
get_expected_production_level(self, resource_id)
Return the expected production capacity of a single building of this type producing the given resource.
source code
 
get_production_level(self, building, resource_id)
Return the actual production capacity of a single building of this type producing the given resource.
source code
 
have_resources(self, settlement_manager)
Return a boolean showing whether the given settlement has enough resources to build a building of this type.
source code
 
iter_potential_locations(self, settlement_manager)
Iterate over possible locations of the building in the given settlement in the form of (x, y, orientation).
source code
 
need_to_build_more_buildings(self, settlement_manager, resource_id)
Return a boolean showing whether another instance of the building should be built right now regardless of the production capacity.
source code
 
producer_building(self)
Return a boolean showing whether this building is supposed to have usable production lines.
source code
Class Methods [hide private]
 
get_higher_level_building_id(cls) source code
 
register_buildings(cls) source code
    Inherited from fakeresourcedeposit.AbstractFakeResourceDeposit
 
load(cls, db, building_id) source code
    Inherited from AbstractBuilding
 
_get_buildability_intersection(cls, settlement_manager, size, terrain_type, need_collector_connection) source code
 
_load_name(cls, db, building_id) source code
 
_load_settler_level(cls, building_id) source code
 
load_all(cls, db)
Fill the cls.buildings dict so the registered buildings can be used.
source code
Class Variables [hide private]
    Inherited from AbstractBuilding
  _available_buildings = {}
  buildings = {}
  log = logging.getLogger("ai.aiplayer.building")
  monthly_gold_cost = 50
  resource_cost = {RES.GOLD: 1, RES.BOARDS: 20, RES.BRICKS: 45, ...
Method Details [hide private]

get_higher_level_building_id(cls)
Class Method

source code 
Overrides: fakeresourcedeposit.AbstractFakeResourceDeposit.get_higher_level_building_id