Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/researchManager.js
Show All 40 Lines | if (queues.minorTech.hasQueuedUnits()) | ||||
return; | return; | ||||
let techs = gameState.findAvailableTech(); | let techs = gameState.findAvailableTech(); | ||||
for (let tech of techs) | for (let tech of techs) | ||||
{ | { | ||||
if (!tech[1]._template.modifications) | if (!tech[1]._template.modifications) | ||||
continue; | continue; | ||||
// TODO may-be loop on all modifs and check if the effect if positive ? | // TODO may-be loop on all modifs and check if the effect if positive ? | ||||
if (tech[1]._template.modifications[0].value !== "Cost/PopulationBonus") | if (tech[1]._template.modifications[0].value !== "Population/Bonus") | ||||
continue; | continue; | ||||
queues.minorTech.addPlan(new PETRA.ResearchPlan(gameState, tech[0])); | queues.minorTech.addPlan(new PETRA.ResearchPlan(gameState, tech[0])); | ||||
break; | break; | ||||
} | } | ||||
}; | }; | ||||
PETRA.ResearchManager.prototype.researchTradeBonus = function(gameState, queues) | PETRA.ResearchManager.prototype.researchTradeBonus = function(gameState, queues) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator