Skip to content

Commit

Permalink
Added bugfix davechurchill#11
Browse files Browse the repository at this point in the history
A unit that is currently researching a tect/upgrade cannot research another. This check will ensure that if there is another researcher, the job will be passed to them.
  • Loading branch information
Duodecimus committed Dec 9, 2016
1 parent 353f5ab commit d394783
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UAlbertaBot/Source/ProductionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ BWAPI::Unit ProductionManager::getProducer(MetaType t, BWAPI::Position closestTo
if (unit->getType() != producerType) { continue; }
if (!unit->isCompleted()) { continue; }
if (unit->isTraining()) { continue; }
if (unit->isResearching()) { continue; }
if (unit->isUpgrading()) { continue; }
if (unit->isLifted()) { continue; }
if (!unit->isPowered()) { continue; }

Expand Down

0 comments on commit d394783

Please sign in to comment.