1
0
forked from mirrors/0ad

cleanup of 0e887a686a following elexis comments

This was SVN commit r19795.
This commit is contained in:
mimo
2017-06-17 10:34:15 +00:00
parent 0e887a686a
commit 9d919f4369
2 changed files with 5 additions and 5 deletions
@@ -1399,7 +1399,7 @@ m.HQ.prototype.buildMoreHouses = function(gameState, queues)
{
let plan = new m.ConstructionPlan(gameState, "structures/{civ}_house");
// change the starting condition according to the situation.
plan.isGoRequirement = "houseNeeded";
plan.goRequirement = "houseNeeded";
queues.house.addPlan(plan);
}
@@ -1431,7 +1431,7 @@ m.HQ.prototype.buildMoreHouses = function(gameState, queues)
--needed;
else if (needed > 0)
{
houseQueue[i].isGoRequirement = undefined;
houseQueue[i].goRequirement = undefined;
--needed;
}
}
@@ -766,7 +766,7 @@ m.ConstructionPlan.prototype.getResourcesAround = function(gameState, types, i,
m.ConstructionPlan.prototype.isGo = function(gameState)
{
if (this.isGoRequirement && this.isGoRequirement === "houseNeeded")
if (this.goRequirement && this.goRequirement === "houseNeeded")
{
if (!gameState.ai.HQ.canBuild(gameState, "structures/{civ}_house"))
return false;
@@ -778,9 +778,9 @@ m.ConstructionPlan.prototype.isGo = function(gameState)
if (gameState.ai.HQ.saveResources)
return freeSlots <= 10;
else if (gameState.getPopulation() > 55)
if (gameState.getPopulation() > 55)
return freeSlots <= 21;
else if (gameState.getPopulation() > 30)
if (gameState.getPopulation() > 30)
return freeSlots <= 15;
return freeSlots <= 10;
}