#6691 closed defect (fixed)

Template viewer for mace storehouse tech displays wrong time

Reported by: Langbart Owned by: Freagarach
Priority: Should Have Milestone: Alpha 27
Component: UI – In-game Keywords:
Cc: Patch:

Description (last modified by Langbart)

reported by 0ad is the best rts game in the forum: Game guide of Macedonians error reporting (24/Dec/22)

Macedonian has warehouse technology - 100% of the study time. However, when the player clicks on "Learn Game > Structure > Warehouse (right mouse button)" or clicks on the right mouse button of the warehouse in the game, it shows the cost time. This may confuse the player.

bisect

  • likley introduced with the introduction of the new civbonus for the Macedonians in [26627]

related ticket

possible solution ?

  • binaries/data/mods/public/gui/reference/viewer/ViewerPage.js

    a b class ViewerPage extends ReferencePage  
    7676
    7777            let researchers = templateLists.techs.get(currentTemplateName);
    7878            if (researchers && researchers.length)
     79            {
    7980                this.currentTemplate.researchedByListOfNames = researchers.map(researcher => getEntityNames(this.TemplateParser.getEntity(researcher, this.activeCiv)));
     81
     82                const {techCostMultiplier} = this.TemplateParser.getEntity(researchers[0], this.activeCiv);
     83                for (const res in this.currentTemplate.cost)
     84                    if (this.currentTemplate.cost[res])
     85                        this.currentTemplate.cost[res] *= techCostMultiplier[res];
     86            }
    8087        }
    8188
    8289        if (this.currentTemplate.builder && this.currentTemplate.builder.length)

Attachments (1)

mace_template_tech.png (106.5 KB ) - added by Langbart 16 months ago.

Download all attachments as: .zip

Change History (4)

by Langbart, 16 months ago

Attachment: mace_template_tech.png added

comment:1 by Langbart, 16 months ago

Description: modified (diff)

Minimize the diff from the possible solution section

comment:2 by Langbart, 16 months ago

Description: modified (diff)

braces

comment:3 by Freagarach, 16 months ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 27454:

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

Note: See TracTickets for help on using tickets.