From b0006ae5add990cfa3174f27d26ef6d7e2578832 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 23 Feb 2015 19:16:46 +0000 Subject: [PATCH] zaprange plugin: has had broken team support for a while - fixed https://plus.google.com/104096045622750660984/posts/DMT25KG6ZFo --- plugins/zaprange.user.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/zaprange.user.js b/plugins/zaprange.user.js index 814ce225..4f03ff7d 100644 --- a/plugins/zaprange.user.js +++ b/plugins/zaprange.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-zaprange@zaso // @name IITC plugin: Zaprange // @category Layer -// @version 0.1.3.@@DATETIMEVERSION@@ +// @version 0.1.4.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -25,18 +25,18 @@ window.plugin.zaprange.portalAdded = function(data) { data.portal.on('add', function() { - window.plugin.zaprange.draw(this.options.guid, this.options.data.team); + window.plugin.zaprange.draw(this.options.guid, this.options.team); }); data.portal.on('remove', function() { - window.plugin.zaprange.remove(this.options.guid, this.options.data.team); + window.plugin.zaprange.remove(this.options.guid, this.options.team); }); } window.plugin.zaprange.remove = function(guid, faction) { var previousLayer = window.plugin.zaprange.zapLayers[guid]; if(previousLayer) { - if(faction === 'ENLIGHTENED') { + if(faction === TEAM_ENL) { window.plugin.zaprange.zapCircleEnlHolderGroup.removeLayer(previousLayer); } else { window.plugin.zaprange.zapCircleResHolderGroup.removeLayer(previousLayer); @@ -48,7 +48,7 @@ window.plugin.zaprange.draw = function(guid, faction) { var d = window.portals[guid]; - if(faction !== "NEUTRAL") { + if(faction !== TEAM_NONE) { var coo = d._latlng; var latlng = new L.LatLng(coo.lat,coo.lng); var portalLevel = d.options.level; @@ -57,7 +57,7 @@ var circle = new L.Circle(latlng, range, optCircle); - if(faction === 'ENLIGHTENED') { + if(faction === TEAM_ENL) { circle.addTo(window.plugin.zaprange.zapCircleEnlHolderGroup); } else { circle.addTo(window.plugin.zaprange.zapCircleResHolderGroup);