mirror of
https://github.com/glest/glest-source.git
synced 2025-08-06 16:36:29 +02:00
Merge pull request #286 from BennettDixon/develop
Added documentation for AiRuleRepair::getMinUnitsToRepairCastle() and AiRuleAddTasks::execute()
This commit is contained in:
@@ -107,6 +107,14 @@ namespace
|
|||||||
|
|
||||||
int
|
int
|
||||||
AiRuleRepair::getMinUnitsToRepairCastle() {
|
AiRuleRepair::getMinUnitsToRepairCastle() {
|
||||||
|
/*
|
||||||
|
* Gets the minimum units needed to repair a castle
|
||||||
|
*
|
||||||
|
* Attributes:
|
||||||
|
* none
|
||||||
|
*
|
||||||
|
* Documentation Author: Bennett Dixon
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
minUnitsRepairingCastle = 7;
|
minUnitsRepairingCastle = 7;
|
||||||
if (ai->getCountOfClass(ucWorker) <= 6) {
|
if (ai->getCountOfClass(ucWorker) <= 6) {
|
||||||
@@ -460,9 +468,17 @@ namespace
|
|||||||
return !ai->anyTask() || ai->getCountOfClass(ucWorker) < 4;
|
return !ai->anyTask() || ai->getCountOfClass(ucWorker) < 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is what triggers the AI to create new units.
|
|
||||||
void
|
void
|
||||||
AiRuleAddTasks::execute() {
|
AiRuleAddTasks::execute() {
|
||||||
|
/*
|
||||||
|
* triggers AI to create new units, differs based on Control Type of AIInterface
|
||||||
|
* if ai->outputAIBehaviourToConsole() it will print debug lines to console
|
||||||
|
*
|
||||||
|
* Attributes:
|
||||||
|
* none
|
||||||
|
*
|
||||||
|
* Documentation Author: Bennett Dixon
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
buildingCount = ai->getCountOfClass(ucBuilding);
|
buildingCount = ai->getCountOfClass(ucBuilding);
|
||||||
UnitClass
|
UnitClass
|
||||||
|
Reference in New Issue
Block a user