diff --git a/plugins/portal-highlighter-effective-deployment-range.user.js b/plugins/portal-highlighter-bad-deployment-distance.user.js similarity index 68% rename from plugins/portal-highlighter-effective-deployment-range.user.js rename to plugins/portal-highlighter-bad-deployment-distance.user.js index ed668d32..b1c23c58 100644 --- a/plugins/portal-highlighter-effective-deployment-range.user.js +++ b/plugins/portal-highlighter-bad-deployment-distance.user.js @@ -1,12 +1,12 @@ // ==UserScript== -// @id iitc-plugin-highlight-effective-deployment-range@cathesaurus -// @name IITC plugin: highlight portals by their effective resonator deployment range +// @id iitc-plugin-highlight-bad-deployment-distance@cathesaurus +// @name IITC plugin: highlight badly-deployed portals // @category Highlighter // @version 0.1.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to show the effective resonator deployment range +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to show the effective resonator deployment range, where that average is less than 36 metres // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -19,13 +19,14 @@ // PLUGIN START //////////////////////////////////////////////////////// // use own namespace for plugin -window.plugin.portalHighlighterEffectiveDeploymentRange = function() {}; +window.plugin.portalHighlighterBadDeploymentDistance = function() {}; -window.plugin.portalHighlighterEffectiveDeploymentRange.highlight = function(data) { +window.plugin.portalHighlighterBadDeploymentDistance.highlight = function(data) { var d = data.portal.options.details; var portal_deployment = 0; + var acceptable_deployment_average = 36; if(getTeam(d) !== 0) { - if(window.getAvgResoDist(d) > 0) { + if(window.getAvgResoDist(d) > 0 && window.getAvgResoDist(d) < acceptable_deployment_average) { portal_deployment = (window.HACK_RANGE - window.getAvgResoDist(d))/window.HACK_RANGE; } if(portal_deployment > 0) { @@ -39,7 +40,7 @@ window.plugin.portalHighlighterEffectiveDeploymentRange.highlight = function(dat } var setup = function() { - window.addPortalHighlighter('Effective Deployment', window.plugin.portalHighlighterEffectiveDeploymentRange.highlight); + window.addPortalHighlighter('Bad Deployment Distance', window.plugin.portalHighlighterBadDeploymentDistance.highlight); } // PLUGIN END //////////////////////////////////////////////////////////