mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 08:23:47 +00:00
cleanup of 0e887a686a following elexis comments
This was SVN commit r19795.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user