updated to v1.1.2
v1.1.2 Fixed the portal counts (shown in console)
This commit is contained in:
parent
98d4a24714
commit
fe8ae3475e
@ -1,12 +1,10 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @id iitc-plugin-farms@parabola949
|
// @id iitc-plugin-farms@949
|
||||||
// @name IITC plugin: Show farms by level
|
// @name IITC plugin: Show farms by level
|
||||||
// @category Layer
|
// @category Info
|
||||||
// @version 1.1.1.20130826.142308
|
// @version 1.1.2.20130827.122608
|
||||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||||
// @updateURL http://userscripts.org/scripts/source/175900.meta.js
|
// @description [parabola949-2013-08-27] Find farms by minimum level
|
||||||
// @downloadURL http://userscripts.org/scripts/source/175900.user.js
|
|
||||||
// @description [parabola949-2013-08-26] Finds farms by minimum level
|
|
||||||
// @include https://www.ingress.com/intel*
|
// @include https://www.ingress.com/intel*
|
||||||
// @include http://www.ingress.com/intel*
|
// @include http://www.ingress.com/intel*
|
||||||
// @match https://www.ingress.com/intel*
|
// @match https://www.ingress.com/intel*
|
||||||
@ -17,6 +15,9 @@
|
|||||||
//CHANGELOG
|
//CHANGELOG
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
v1.1.2
|
||||||
|
Fixed the portal counts (shown in console)
|
||||||
|
|
||||||
v1.1.1
|
v1.1.1
|
||||||
Changed circle stroke weight and opacity, making it easier to see when zoomed out.
|
Changed circle stroke weight and opacity, making it easier to see when zoomed out.
|
||||||
|
|
||||||
@ -156,8 +157,13 @@ window.plugin.farmFind.checkPortals = function(){
|
|||||||
|
|
||||||
//console.log(farms.length);
|
//console.log(farms.length);
|
||||||
for (i = 0; i < farms.length; i++)
|
for (i = 0; i < farms.length; i++)
|
||||||
|
{
|
||||||
|
farms[i] = findUnique(farms[i]);
|
||||||
console.log("Farm " + (i+1) + ": " + farms[i].length + " portals");
|
console.log("Farm " + (i+1) + ": " + farms[i].length + " portals");
|
||||||
|
|
||||||
|
}
|
||||||
|
//console.log(farms);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
window.plugin.farmFind.drawnItems = new L.FeatureGroup();
|
window.plugin.farmFind.drawnItems = new L.FeatureGroup();
|
||||||
@ -171,6 +177,25 @@ window.plugin.farmFind.checkPortals = function(){
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
findUnique = function(farm) {
|
||||||
|
var unique = [];
|
||||||
|
for(p = 0; p < farm.length; p++)
|
||||||
|
{
|
||||||
|
//console.log(farm[p].options.guid);
|
||||||
|
var found = false;
|
||||||
|
for (u = 0; u < unique.length; u++)
|
||||||
|
{
|
||||||
|
//console.log(unique[u].options.guid);
|
||||||
|
if (farm[p].options.guid == unique[u].options.guid)
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
if (!found)
|
||||||
|
unique.push(farm[p]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return unique;
|
||||||
|
}
|
||||||
|
|
||||||
window.plugin.farmFind.drawCircle = function(farm)
|
window.plugin.farmFind.drawCircle = function(farm)
|
||||||
{
|
{
|
||||||
var latArray = [];
|
var latArray = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user