Ticket #3208: structreeFix.patch
File structreeFix.patch, 1.5 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/gui/structree/load.js
219 219 { 220 220 var template = loadTechData(phaseCode); 221 221 var phase = GetTechnologyDataHelper(template, g_SelectedCiv); 222 phase.actualPhase = "";223 222 223 phase.actualPhase = phaseCode; 224 if (template.replaces !== undefined) 225 phase.actualPhase = template.replaces[0]; 226 224 227 return phase; 225 228 } 226 229 -
binaries/data/mods/public/gui/structree/structree.js
125 125 // Establish phase order 126 126 g_ParsedData.phaseList = unravelPhases(g_ParsedData.techs); 127 127 for (let phasecode of g_ParsedData.phaseList) 128 {129 let phaseInfo = loadTechData(phasecode);130 128 g_ParsedData.phases[phasecode] = loadPhase(phasecode); 131 129 132 if ("requirements" in phaseInfo)133 for (let op in phaseInfo.requirements)134 {135 let val = phaseInfo.requirements[op];136 if (op == "any")137 for (let v of val)138 {139 let k = Object.keys(v);140 k = k[0];141 v = v[k];142 if (k == "tech" && v in g_ParsedData.phases)143 g_ParsedData.phases[v].actualPhase = phasecode;144 }145 }146 }147 148 130 // Group production lists of structures by phase 149 131 for (let structCode of g_Lists.structures) 150 132 {