1
0
forked from 0ad/0ad

Fix Mace storehouse tech time in template viewer.

Reported at
https://wildfiregames.com/forum/topic/102542-game-guide-of-macedonians-error-reporting
Patch by: @Langbart
Fixes #6691
Refs. #6587

This was SVN commit r27454.
This commit is contained in:
Freagarach 2023-01-16 14:09:53 +00:00
parent ca71c3cd90
commit f97a986077

View File

@ -76,7 +76,13 @@ class ViewerPage extends ReferencePage
let researchers = templateLists.techs.get(currentTemplateName);
if (researchers && researchers.length)
{
this.currentTemplate.researchedByListOfNames = researchers.map(researcher => getEntityNames(this.TemplateParser.getEntity(researcher, this.activeCiv)));
const {techCostMultiplier} = this.TemplateParser.getEntity(researchers[0], this.activeCiv);
for (const res in this.currentTemplate.cost)
if (this.currentTemplate.cost[res])
this.currentTemplate.cost[res] *= techCostMultiplier[res];
}
}
if (this.currentTemplate.builder && this.currentTemplate.builder.length)