iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 553 forks source link

layer-farms-find: limit farm portals to desired min level #1308

Open maqifrnswa opened 4 years ago

maqifrnswa commented 4 years ago

Portals listed as possible farm portals should be at least the minlevel. This fixes a a crazy corner case I came across: 4 farm-level portals in a cluster, two level 1 portals about 400m east, then another farm-level portal 400m east of the level 1 portals. The current algorithm thinks the 2 level 1 portals are a farm (since 5 farm-level portals are within 500m radius of the level 1 portals) and draws a circle only around the two level 1 portals.

Alternatively, this check can be placed in the "getNearbyPortalCount" function.