Changes between Version 1 and Version 2 of Ticket #6691


Ignore:
Timestamp:
Jan 16, 2023, 9:31:20 AM (16 months ago)
Author:
Langbart
Comment:

braces

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6691 – Description

    v1 v2  
    1717--- a/binaries/data/mods/public/gui/reference/viewer/ViewerPage.js
    1818+++ b/binaries/data/mods/public/gui/reference/viewer/ViewerPage.js
    19 @@ -77,6 +77,11 @@ class ViewerPage extends ReferencePage
     19@@ -76,7 +76,14 @@ class ViewerPage extends ReferencePage
     20 
    2021                        let researchers = templateLists.techs.get(currentTemplateName);
    2122                        if (researchers && researchers.length)
     23+                       {
    2224                                this.currentTemplate.researchedByListOfNames = researchers.map(researcher => getEntityNames(this.TemplateParser.getEntity(researcher, this.activeCiv)));
    2325+
    24 +                       const {techCostMultiplier} = this.TemplateParser.getEntity(researchers[0], this.activeCiv);
    25 +                       for (const res in this.currentTemplate.cost)
    26 +                               if (this.currentTemplate.cost[res])
    27 +                                       this.currentTemplate.cost[res] *= techCostMultiplier[res];
     26+                               const {techCostMultiplier} = this.TemplateParser.getEntity(researchers[0], this.activeCiv);
     27+                               for (const res in this.currentTemplate.cost)
     28+                                       if (this.currentTemplate.cost[res])
     29+                                               this.currentTemplate.cost[res] *= techCostMultiplier[res];
     30+                       }
    2831                }
    2932