diff --git a/binaries/data/mods/public/globalscripts/Templates.js b/binaries/data/mods/public/globalscripts/Templates.js
index 47b045a..b2a84e6 100644
a
|
b
|
function GetTemplateDataHelper(template, player)
|
120 | 120 | if (template.Auras) |
121 | 121 | { |
122 | 122 | ret.auras = {}; |
123 | | for each (var aura in template.Auras) |
| 123 | for (let auraID in template.Auras) |
| 124 | { |
| 125 | let aura = template.Auras[auraID]; |
124 | 126 | if (aura.AuraName) |
125 | | ret.auras[aura.AuraName] = aura.AuraDescription || null; |
| 127 | ret.auras[auraID] = { |
| 128 | "name": aura.AuraName, |
| 129 | "description": aura.AuraDescription || null |
| 130 | }; |
| 131 | } |
126 | 132 | } |
127 | 133 | |
128 | 134 | if (template.BuildRestrictions) |
diff --git a/binaries/data/mods/public/gui/common/tooltips.js b/binaries/data/mods/public/gui/common/tooltips.js
index 126d62d..1086709 100644
a
|
b
|
function getAurasTooltip(template)
|
478 | 478 | for (let aura in template.auras) |
479 | 479 | txt += '\n' + sprintf(translate("%(auralabel)s %(aurainfo)s"), { |
480 | 480 | "auralabel": g_TooltipTextFormats.header[0] + sprintf(translate("%(auraname)s:"), { |
481 | | "auraname": translate(aura) |
| 481 | "auraname": translate(template.auras[aura].name) |
482 | 482 | }) + g_TooltipTextFormats.header[1], |
483 | | "aurainfo": g_TooltipTextFormats.body[0] + translate(template.auras[aura]) + g_TooltipTextFormats.body[1] |
| 483 | "aurainfo": g_TooltipTextFormats.body[0] + translate(template.auras[aura].description) + g_TooltipTextFormats.body[1] |
484 | 484 | }); |
485 | 485 | return txt; |
486 | 486 | } |
diff --git a/binaries/data/mods/public/gui/session/selection_panels.js b/binaries/data/mods/public/gui/session/selection_panels.js
index a8c3ba9..92434a0 100644
a
|
b
|
g_SelectionPanels.Construction = {
|
336 | 336 | { |
337 | 337 | var tooltip = getEntityNamesFormatted(data.template); |
338 | 338 | tooltip += getVisibleEntityClassesFormatted(data.template); |
| 339 | tooltip += getAurasTooltip(data.template); |
339 | 340 | |
340 | 341 | if (data.template.tooltip) |
341 | 342 | tooltip += "\n[font=\"sans-13\"]" + data.template.tooltip + "[/font]"; |
… |
… |
g_SelectionPanels.Training = {
|
1098 | 1099 | |
1099 | 1100 | tooltip += getEntityNamesFormatted(data.template); |
1100 | 1101 | tooltip += getVisibleEntityClassesFormatted(data.template); |
1101 | | |
1102 | | if (data.template.auras) |
1103 | | { |
1104 | | for (var auraName in data.template.auras) |
1105 | | { |
1106 | | tooltip += "\n[font=\"sans-bold-13\"]" + translate(auraName) + "[/font]"; |
1107 | | if (data.template.auras[auraName]) |
1108 | | tooltip += ": " + translate(data.template.auras[auraName]); |
1109 | | } |
1110 | | } |
| 1102 | tooltip += getAurasTooltip(data.template); |
1111 | 1103 | |
1112 | 1104 | if (data.template.tooltip) |
1113 | 1105 | tooltip += "\n[font=\"sans-13\"]" + data.template.tooltip + "[/font]"; |