Opened 8 years ago

Last modified 7 years ago

#4217 closed defect

Structure tree shows wrong specific tech names — at Version 4

Reported by: elexis Owned by: s0600204
Priority: Must Have Milestone: Alpha 22
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by Vladislav Belov)

If one opens the tech tree and looks at the name of a tech that has a specific name, change to a civ that has a different (or no) specific name for that tech and then change back, then that tech will display the second civ's specific name (or in the case where the second civ doesn't have one, no specific name at all). F.e. the "Steel Working" upgrade at the blacksmith for iber and maur, or the "Sentries" upgrade belonging to the wooden and stone towers when switching from a hellenic civ to a non-hellenic civ and back again. Bug reported by WarBeast.

Change History (5)

by s0600204, 8 years ago

Attachment: specificNames.patch added

Proposed patch

comment:1 by s0600204, 8 years ago

Cc: s0600204 removed
Description: modified (diff)
Keywords: patch rfc added
Milestone: BacklogAlpha 21
Owner: set to s0600204
Status: newassigned

comment:2 by elexis, 8 years ago

Milestone: Alpha 21Alpha 22

Feature freeze in 2 days.

comment:3 by elexis, 7 years ago

Milestone: Alpha 22Work In Progress

Moving to the new WIP milestone.

comment:4 by Vladislav Belov, 7 years ago

Description: modified (diff)

Few notes: 1.

if (template.name.specific != template.name.generic)
    return template.name.specific;
else
    return false;

Could be written shorter:

return template.name.specific != template.name.generic ? template.name.specific : false;

2.

if (template.name.specific.generic)
    return template.name.specific.generic;
return false;

The same:

return template.name.specific.generic || false;
Note: See TracTickets for help on using tickets.