Fixing Nits
This commit is contained in:
parent
9035e966f1
commit
335e84e7ce
@ -24,7 +24,7 @@ window.plugin.portalWeakness.portalAdded = function(data) {
|
||||
|
||||
var d = data.portal.options.details;
|
||||
var portal_weakness = 0;
|
||||
if(getTeam(d) != 0) {
|
||||
if(getTeam(d) !== 0) {
|
||||
var only_shields = true;
|
||||
var missing_shields = 0;
|
||||
if(window.getTotalPortalEnergy(d)> 0 && window.getCurrentPortalEnergy(d) < window.getTotalPortalEnergy(d)) {
|
||||
@ -33,7 +33,7 @@ window.plugin.portalWeakness.portalAdded = function(data) {
|
||||
}
|
||||
//Ding the portal for every missing sheild.
|
||||
$.each(d.portalV2.linkedModArray, function(ind, mod) {
|
||||
if(mod == null) {
|
||||
if(mod === null) {
|
||||
missing_shields++;
|
||||
portal_weakness += .08;
|
||||
}
|
||||
@ -41,11 +41,10 @@ window.plugin.portalWeakness.portalAdded = function(data) {
|
||||
//Ding the portal for every missing resonator.
|
||||
var resCount = 0;
|
||||
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
||||
if(reso == null) {
|
||||
if(reso === null) {
|
||||
portal_weakness += .125;
|
||||
only_shields = false;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
resCount++;
|
||||
}
|
||||
});
|
||||
@ -64,8 +63,7 @@ window.plugin.portalWeakness.portalAdded = function(data) {
|
||||
color = 'yellow';
|
||||
//If only shields are missing, make portal yellow, but fill more than usual since pale yellow is basically invisible
|
||||
fill_opacity = missing_shields*.15 + .1;
|
||||
}
|
||||
else if(missing_shields>0) {
|
||||
} else if(missing_shields > 0) {
|
||||
color = 'red';
|
||||
}
|
||||
fill_opacity = Math.round(fill_opacity*100)/100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user