Ticket #3411: 3411.patch
File 3411.patch, 1.5 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/gui/structree/structree.js
131 131 for (let structCode of g_Lists.structures) 132 132 { 133 133 let structInfo = g_ParsedData.structures[structCode]; 134 let structPhaseIdx = g_ParsedData.phaseList.indexOf(structInfo.phase); 134 135 135 136 // If this building is shared with another civ, 136 137 // it may have already gone through the grouping process already … … 170 171 phase = req; 171 172 } 172 173 173 if (depath(phase).slice(0,5) !== "phase" )174 {175 warn(prod+" doesn't have a specific phase set ("+structCode+")");176 phase = structInfo.phase;177 }174 if (depath(phase).slice(0,5) !== "phase" || g_ParsedData.phaseList.indexOf(phase) < structPhaseIdx) 175 if (structInfo.phase !== false) 176 phase = structInfo.phase; 177 else 178 phase = g_ParsedData.phaseList[0]; 178 179 179 180 if (!(phase in newProdTech)) 180 181 newProdTech[phase] = []; … … 202 203 else 203 204 phase = reqs.generic[0]; 204 205 } 205 else if (structInfo.phase !== false)206 phase = structInfo.phase;207 else208 phase = g_ParsedData.phaseList[0];209 206 207 if (depath(phase).slice(0,5) !== "phase" || g_ParsedData.phaseList.indexOf(phase) < structPhaseIdx) 208 if (structInfo.phase !== false) 209 phase = structInfo.phase; 210 else 211 phase = g_ParsedData.phaseList[0]; 212 210 213 if (!(phase in newProdUnits)) 211 214 newProdUnits[phase] = []; 212 215