Package horizons :: Package ai :: Package aiplayer :: Module resourcemanager :: Class SimpleProductionChainSubtree
[hide private]
[frames] | no frames]

Class SimpleProductionChainSubtree

source code

This is a simple version of ProductionChainSubtree used to make recursive quotas possible.

Instance Methods [hide private]
 
__init__(self, resource_manager, resource_id, production_line, abstract_building, children, production_ratio) source code
 
assign_identifier(self, prefix)
Recursively assign an identifier to this subtree to know which subtree owns which resource quota.
source code
 
request_quota_change(self, quota_holder, amount, priority)
Try to reserve currently available production.
source code
 
get_quota(self, quota_holder)
Return the current quota at the bottleneck.
source code
Method Details [hide private]

request_quota_change(self, quota_holder, amount, priority)

source code 

Try to reserve currently available production. Return the total amount that can be reserved.