well fix it right
This commit is contained in:
@ -14,7 +14,7 @@ window.getPortalLevel = function(d) {
|
|||||||
lvl += parseInt(reso.level);
|
lvl += parseInt(reso.level);
|
||||||
hasReso = true;
|
hasReso = true;
|
||||||
});
|
});
|
||||||
return hasReso ? Math.min(1, lvl/8) : 0;
|
return hasReso ? Math.max(1, lvl/8) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.getPortalEnergy = function(d) {
|
window.getPortalEnergy = function(d) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @id ingress-intel-total-conversion@breunigs
|
// @id ingress-intel-total-conversion@breunigs
|
||||||
// @name intel map total conversion
|
// @name intel map total conversion
|
||||||
// @version 0.2-2013-02-04-163559
|
// @version 0.2-2013-02-05-142635
|
||||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/total-conversion-build.user.js
|
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/total-conversion-build.user.js
|
||||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/total-conversion-build.user.js
|
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/total-conversion-build.user.js
|
||||||
@ -2082,11 +2082,13 @@ window.setupGeosearch = function() {
|
|||||||
// that value.
|
// that value.
|
||||||
window.getPortalLevel = function(d) {
|
window.getPortalLevel = function(d) {
|
||||||
var lvl = 0;
|
var lvl = 0;
|
||||||
|
var hasReso = false;
|
||||||
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
||||||
if(!reso) return true;
|
if(!reso) return true;
|
||||||
lvl += parseInt(reso.level);
|
lvl += parseInt(reso.level);
|
||||||
|
hasReso = true;
|
||||||
});
|
});
|
||||||
return lvl/8;
|
return hasReso ? Math.max(1, lvl/8) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.getPortalEnergy = function(d) {
|
window.getPortalEnergy = function(d) {
|
||||||
|
Reference in New Issue
Block a user