fixed some more codingstyle issues
This commit is contained in:
		| @@ -33,43 +33,37 @@ window.handleRedeemResponse = function(data, textStatus, jqXHR) { | |||||||
|       if (acquired.modResource) { |       if (acquired.modResource) { | ||||||
|         if (acquired.modResource.resourceType === 'RES_SHIELD') { |         if (acquired.modResource.resourceType === 'RES_SHIELD') { | ||||||
|           var rarity = acquired.modResource.rarity.split('_').map(function (i) {return i[0]}).join(''); |           var rarity = acquired.modResource.rarity.split('_').map(function (i) {return i[0]}).join(''); | ||||||
|           if (!shields[rarity]) |           if (!shields[rarity]) shields[rarity] = 0; | ||||||
|             shields[rarity] = 0; |  | ||||||
|           shields[rarity] += 1; |           shields[rarity] += 1; | ||||||
|         } |         } | ||||||
|       } else if (acquired.resourceWithLevels) { |       } else if (acquired.resourceWithLevels) { | ||||||
|         if (acquired.resourceWithLevels.resourceType === 'EMITTER_A') { |         if (acquired.resourceWithLevels.resourceType === 'EMITTER_A') { | ||||||
|           var level = acquired.resourceWithLevels.level |           var level = acquired.resourceWithLevels.level | ||||||
|           if (!resonators[level]) |           if (!resonators[level]) resonators[level] = 0; | ||||||
|             resonators[level] = 0; |  | ||||||
|           resonators[level] += 1; |           resonators[level] += 1; | ||||||
|         } else if (acquired.resourceWithLevels.resourceType === 'EMP_BURSTER') { |         } else if (acquired.resourceWithLevels.resourceType === 'EMP_BURSTER') { | ||||||
|           var level = acquired.resourceWithLevels.level |           var level = acquired.resourceWithLevels.level | ||||||
|           if (!bursts[level]) |           if (!bursts[level]) bursts[level] = 0; | ||||||
|             bursts[level] = 0; |  | ||||||
|           bursts[level] += 1; |           bursts[level] += 1; | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     for (var lvl in resonators) { |     $.each(resonators, function(lvl, count) { | ||||||
|       var text = 'Resonator'; |       var text = 'Resonator'; | ||||||
|       if (resonators[lvl] > 1) |       if (count >= 2) text += ' ('+count+')'; | ||||||
|         text += ' ('+resonators[lvl]+')'; |  | ||||||
|       tblResult.append($('<tr ><td style="color: ' +window.COLORS_LVL[lvl]+ ';">L' +lvl+ '</td><td>' + text + '</td></tr>')); |       tblResult.append($('<tr ><td style="color: ' +window.COLORS_LVL[lvl]+ ';">L' +lvl+ '</td><td>' + text + '</td></tr>')); | ||||||
|     } |     }); | ||||||
|     for (var lvl in bursts) { |     $.each(bursts, function(lvl, count) { | ||||||
|       var text = 'Xmp Burster'; |       var text = 'Xmp Burster'; | ||||||
|       if (bursts[lvl] > 1) |       if (count >= 2) text += ' ('+count+')'; | ||||||
|         text += ' ('+bursts[lvl]+')'; |  | ||||||
|       tblResult.append($('<tr ><td style="color: ' +window.COLORS_LVL[lvl]+ ';">L' +lvl+ '</td><td>' + text + '</td></tr>')); |       tblResult.append($('<tr ><td style="color: ' +window.COLORS_LVL[lvl]+ ';">L' +lvl+ '</td><td>' + text + '</td></tr>')); | ||||||
|     } |     }); | ||||||
|     for (var lvl in shields) { |     $.each(shields, function(lvl, count) { | ||||||
|       var text = 'Portal Shield'; |       var text = 'Portal Shield'; | ||||||
|       if (shields[lvl] > 1) |       if (count >= 2) text += ' ('+count+')'; | ||||||
|         text += ' ('+shields[lvl]+')'; |  | ||||||
|       tblResult.append($('<tr><td>'+lvl+'</td><td>'+text+'</td></tr>')); |       tblResult.append($('<tr><td>'+lvl+'</td><td>'+text+'</td></tr>')); | ||||||
|     } |     }); | ||||||
|  |  | ||||||
|     alert(tblResult, true); |     alert(tblResult, true); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user