Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/queue.js
var PETRA = function(m) | (function(m) | ||||
{ | { | ||||
/** | /** | ||||
Context not available. | |||||
if (!newPlan) | if (!newPlan) | ||||
return; | return; | ||||
for (let plan of this.plans) | for (let plan of this.plans) | ||||
{ | |||||
if (newPlan.category === "unit" && plan.type == newPlan.type && plan.number + newPlan.number <= plan.maxMerge) | if (newPlan.category === "unit" && plan.type == newPlan.type && plan.number + newPlan.number <= plan.maxMerge) | ||||
{ | { | ||||
plan.addItem(newPlan.number); | plan.addItem(newPlan.number); | ||||
Context not available. | |||||
} | } | ||||
else if (newPlan.category === "technology" && plan.type === newPlan.type) | else if (newPlan.category === "technology" && plan.type === newPlan.type) | ||||
return; | return; | ||||
} | |||||
this.plans.push(newPlan); | this.plans.push(newPlan); | ||||
}; | }; | ||||
Context not available. | |||||
} | } | ||||
}; | }; | ||||
return m; | }(PETRA)); | ||||
}(PETRA); | |||||
Context not available. |
Wildfire Games · Phabricator