mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-29 00:47:00 +00:00
@@ -912,7 +912,7 @@ m.BaseManager.prototype.update = function(gameState, queues, events)
|
||||
for (var ent of this.buildings.values())
|
||||
m.getBestBase(ent, gameState).assignEntity(ent, gameState);
|
||||
}
|
||||
else
|
||||
else if (gameState.ai.HQ.canBuildUnits)
|
||||
{
|
||||
this.assignRolelessUnits(gameState);
|
||||
this.reassignIdleWorkers(gameState);
|
||||
|
||||
@@ -264,8 +264,8 @@ m.HQ.prototype.init = function(gameState, queues, deserializing)
|
||||
this.canBuildUnits = true;
|
||||
if (!gameState.getOwnStructures().filter(API3.Filters.byClass("CivCentre")).length)
|
||||
{
|
||||
var template = gameState.getTemplate(gameState.applyCiv("structures/{civ}_civil_centre"));
|
||||
if (!template.available(gameState))
|
||||
var template = gameState.applyCiv("structures/{civ}_civil_centre");
|
||||
if (gameState.isDisabledTemplates(template) || !gameState.getTemplate(template).available(gameState))
|
||||
{
|
||||
if (this.Config.debug > 1)
|
||||
API3.warn(" this AI is unable to produce any units");
|
||||
@@ -2080,7 +2080,7 @@ m.HQ.prototype.update = function(gameState, queues, events)
|
||||
|
||||
this.navalManager.update(gameState, queues, events);
|
||||
|
||||
if (this.Config.difficulty > 0)
|
||||
if (this.Config.difficulty > 0 && (this.numActiveBase() > 0 || !this.canBuildUnits))
|
||||
this.attackManager.update(gameState, queues, events);
|
||||
|
||||
this.diplomacyManager.update(gameState, events);
|
||||
|
||||
Reference in New Issue
Block a user