Class: BuildManager

BuildManager()

One task of this manager is to cache the list of structures we have builders for, to avoid having to loop on all entities each time. It also takes care of the structures we can't currently build and should not try to build endlessly.

Constructor

new BuildManager()

Source:

Methods

checkEvents()

Update the builders counters
Source:

findStructuresByFilter()

Get the buildable structures passing a filter.
Source:

findStructureWithClass()

Get the first buildable structure with a given class TODO when several available, choose the best one
Source:

init()

Initialization at start of game
Source:

numberMissingRoom()

Return the number of unbuildables due to missing room
Source:

resetMissingRoom()

Reset the unbuildables due to missing room
Source:

setUnbuildable()

Time is the duration in second that we will wait before checking again if it is buildable
Source: