IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
291 stars 109 forks source link

Wrong region naming (and probably indexing) in the AS face #678

Closed davidxuang closed 9 months ago

davidxuang commented 1 year ago

IITC currently gives such naming scheme for AS regions:

S1 . . . S16
.
.
.
A1

but the actual names given by Niantic are:

S16 . . . A16
.
.
.
S1

I'm guessing that it could be a problem imported from the S2 library, probably line 74 and line 106.

Breenzy commented 9 months ago

image Can confirm this issue.

McBen commented 9 months ago

Looks like nia swap id and codename (i,j) for odd faces. ex: PA03-Mike15 <=> PA12-Charlie15 (03=Charlie, 12=Mike)

Quick fix could be: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/20f996d2e931d1e74a5dec280be120a7d13ffbc4/plugins/regions.js#L70

if (cell.face & 1) {
        [regionI,regionJ] = [regionJ,regionI];
}

(+ some similar in search)