forked from 0ad/0ad
Fix issue with hidden techs after researching it
This was SVN commit r18242.
This commit is contained in:
parent
67149137c8
commit
f422b67eb0
@ -786,7 +786,7 @@ g_SelectionPanels.Research = {
|
||||
{
|
||||
let entState = GetEntityState(ent);
|
||||
if (entState.production && entState.production.technologies.length)
|
||||
return entState.production.technologies.map( tech => ({
|
||||
return entState.production.technologies.map(tech => ({
|
||||
"tech": tech,
|
||||
"techCostMultiplier": entState.production.techCostMultiplier
|
||||
}));
|
||||
@ -802,6 +802,11 @@ g_SelectionPanels.Research = {
|
||||
},
|
||||
"addData": function(data)
|
||||
{
|
||||
if (!data.item.tech)
|
||||
{
|
||||
g_SelectionPanels.Research.hideItem(data.i, data.rowLength);
|
||||
return false;
|
||||
}
|
||||
data.entType = data.item.tech.pair ? [data.item.tech.top, data.item.tech.bottom] : [data.item.tech];
|
||||
data.template = data.entType.map(GetTechnologyData);
|
||||
// abort if no template found for any of the techs
|
||||
|
@ -63,14 +63,6 @@ function setupUnitPanel(guiName, unitEntState, playerState)
|
||||
{
|
||||
var item = items[i];
|
||||
|
||||
// If a tech has been researched it leaves an empty slot
|
||||
if (!item)
|
||||
{
|
||||
if (g_SelectionPanels[guiName].hideItem)
|
||||
g_SelectionPanels[guiName].hideItem(i, rowLength);
|
||||
continue;
|
||||
}
|
||||
|
||||
// STANDARD DATA
|
||||
// add standard data
|
||||
var data = {
|
||||
|
Loading…
Reference in New Issue
Block a user