Don't add queues when deserializing AttackPlans

When deserializing the queues are already there. It was an error to try
to add a queue since sometimes there must not be a queue.
This commit is contained in:
phosit 2025-09-20 16:35:48 +02:00
parent cca2cfe05c
commit 130ea06ce8
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -219,10 +219,13 @@ export function AttackPlan(gameState, config, uniqueID, type = AttackPlan.TYPE_D
this.unitStat[cat].minSize = Math.ceil(this.Config.popScaling * this.unitStat[cat].minSize);
}
// TODO: there should probably be one queue per type of training building
gameState.ai.queueManager.addQueue("plan_" + this.name, priority);
gameState.ai.queueManager.addQueue("plan_" + this.name +"_champ", priority+1);
gameState.ai.queueManager.addQueue("plan_" + this.name +"_siege", priority);
if (!deserialized)
{
// TODO: there should probably be one queue per type of training building
gameState.ai.queueManager.addQueue("plan_" + this.name, priority);
gameState.ai.queueManager.addQueue("plan_" + this.name +"_champ", priority+1);
gameState.ai.queueManager.addQueue("plan_" + this.name +"_siege", priority);
}
// each array is [ratio, [associated classes], associated EntityColl, associated unitStat, name ]
this.buildOrders = [];