More Nits

This commit is contained in:
vita10gy 2013-02-23 18:44:57 -06:00
parent 48ee7ce2af
commit ad234ce84d

View File

@ -26,7 +26,7 @@ window.plugin.portalWeakness.portalAdded = function(data) {
var portal_weakness = 0; var portal_weakness = 0;
if(getTeam(d) !== 0) { if(getTeam(d) !== 0) {
var only_shields = true; var only_shields = true;
var missing_shields = 0; var missing_shields = 0;
if(window.getTotalPortalEnergy(d) > 0 && window.getCurrentPortalEnergy(d) < window.getTotalPortalEnergy(d)) { if(window.getTotalPortalEnergy(d) > 0 && window.getCurrentPortalEnergy(d) < window.getTotalPortalEnergy(d)) {
portal_weakness = 1 - (window.getCurrentPortalEnergy(d)/window.getTotalPortalEnergy(d)); portal_weakness = 1 - (window.getCurrentPortalEnergy(d)/window.getTotalPortalEnergy(d));
only_shields = false; only_shields = false;
@ -61,7 +61,8 @@ window.plugin.portalWeakness.portalAdded = function(data) {
var color = 'orange'; var color = 'orange';
if(only_shields) { if(only_shields) {
color = 'yellow'; color = 'yellow';
//If only shields are missing, make portal yellow, but fill more than usual since pale yellow is basically invisible //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; fill_opacity = missing_shields*.15 + .1;
} else if(missing_shields > 0) { } else if(missing_shields > 0) {
color = 'red'; color = 'red';