From 7eec420ba126ec82174c327090e87a88ef4ab9b8 Mon Sep 17 00:00:00 2001 From: vita10gy Date: Sat, 16 Feb 2013 00:24:56 -0600 Subject: [PATCH] Deleted unused function --- plugins/README.md | 2 +- plugins/show-portal-weakness.user.js | 39 ---------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/plugins/README.md b/plugins/README.md index 739f840a..0afa8f07 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -10,7 +10,7 @@ Available Plugins ----------------- - [**Guess Player Level**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/guess-player-levels.user.js) looks for the highest placed resonator per player in the current view to guess the player level. -- [**Highlight Weakened Portals**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js) fill portals with red or orange to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing. +- [**Highlight Weakened Portals**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js) fill portals with red to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing. - [**Draw Tools**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js) allows to draw circles and lines on the map to aid you with planning your next big field. diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js index 8e10ad69..11aadc3c 100644 --- a/plugins/show-portal-weakness.user.js +++ b/plugins/show-portal-weakness.user.js @@ -20,45 +20,6 @@ if(typeof window.plugin !== 'function') window.plugin = function() {}; // use own namespace for plugin window.plugin.portalWeakness = function() {}; -window.plugin.portalWeakness.getPortalWeaknessFactor = function(d) -{ - var portal_weakness = 0; - if(getTeam(d) != 0) - { - if(window.getTotalPortalEnergy(d)> 0 && window.getCurrentPortalEnergy(d) < window.getTotalPortalEnergy(d)) - { - portal_weakness = 1 - (window.getPortalEnergy(d)/window.getTotalPortalEnergy(d)); - } - //Ding the portal for every missing sheild. - $.each(d.portalV2.linkedModArray, function(ind, mod) - { - if(mod == null) - { - portal_weakness += .05; - } - }); - //Ding the portal for every missing resonator. - var resCount = 0; - $.each(d.resonatorArray.resonators, function(ind, reso) - { - if(reso == null) { - portal_weakness += .125; - } - else { - resCount++; - } - }); - if(portal_weakness<0) { - portal_weakness = 0; - } - if(portal_weakness>1) - { - portal_weakness = 1; - } - } - return(Math.round(portal_weakness*100)/100); -} - window.plugin.portalWeakness.portalAdded = function(data) { var d = data.portal.options.details;