diff --git a/code/utils_misc.js b/code/utils_misc.js index d1e3b0ac..c21852d0 100644 --- a/code/utils_misc.js +++ b/code/utils_misc.js @@ -396,60 +396,6 @@ window.zoomToAndShowPortal = function(guid, latlng) { urlPortal = guid; } -// translates guids to entity types -window.getTypeByGuid = function(guid) { - // All GUID type values, extracted from the ingress app .apk - // some are almost certainly Niantic internal use only - never seen on the network - // .1 == Panoramio portal [deprecated] - // .2 == Random portal - // .3 == Beacon - // .4 == Resource (dropped media - other dropped items?) - // .5 == Inventory item - // .6 == Energy glob (XM) - // .7 == Energy spawn location - // .8 == HMDB portal [deprecated] - // .9 == Link (internally "edge") ** TYPE_LINK - // .a == LocalStore portal [deprecated] - // .b == Control field (internally "captured region") ** TYPE_FIELD - // .c == Player ** TYPE_PLAYER - // .d == COMM message (internally "plext") ** TYPE_CHAT - // .e == Tracking record - // .f == Tracking group - // .10 == Passcode reward [deprecated] - // .11 == SuperOps portal ** TYPE_PORTAL - the batch loaded from panorimo, etc? - // .12 == Anon portal ** TYPE_PORTAL - user submitted by email? - // .13 == Account info - // .14 == GeoStore POI [deprecated] - // .15 == GeoStore mod - // .16 == GeoStore portal ** TYPE_PORTAL - new in-app submissions? - // .17 == Portal image - // .18 == PMRR change - - // resonator guid is [portal guid]-resonator-[slot] - switch(guid.slice(33)) { - case '2': - case '11': - case '12': - case '16': - return TYPE_PORTAL; - - case '9': - return TYPE_LINK; - - case 'b': - return TYPE_FIELD; - - case 'c': - return TYPE_PLAYER; - - case 'd': - return TYPE_CHAT; - - default: - if(guid.slice(-11,-2) == 'resonator') return TYPE_RESONATOR; - return TYPE_UNKNOWN; - } -} String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase(); diff --git a/main.js b/main.js index a5fd64b2..f4929e70 100644 --- a/main.js +++ b/main.js @@ -143,9 +143,6 @@ window.CHAT_FACTION_ITEMS = 100; window.CHAT_REQUEST_SCROLL_TOP = 200; window.CHAT_SHRINKED = 60; -// Minimum zoom level resonator will display -window.RESONATOR_DISPLAY_ZOOM_LEVEL = 17; - // Minimum area to zoom ratio that field MU's will display window.FIELD_MU_DISPLAY_AREA_ZOOM_RATIO = 0.001; @@ -157,28 +154,9 @@ window.COLORS = ['#FF9900', '#0088FF', '#03DC03']; // none, res, enl window.COLORS_LVL = ['#000', '#FECE5A', '#FFA630', '#FF7315', '#E40000', '#FD2992', '#EB26CD', '#C124E0', '#9627F4']; window.COLORS_MOD = {VERY_RARE: '#F78AF6', RARE: '#AD8AFF', COMMON: '#84FBBD'}; -window.OPTIONS_RESONATOR_SELECTED = {color: '#fff', weight: 2, radius: 4, opacity: 1, clickable: false}; -window.OPTIONS_RESONATOR_NON_SELECTED = {color: '#aaa', weight: 1, radius: 3, opacity: 1, clickable: false}; window.MOD_TYPE = {RES_SHIELD:'Shield', MULTIHACK:'Multi-hack', FORCE_AMP:'Force Amp', HEATSINK:'Heat Sink', TURRET:'Turret', LINK_AMPLIFIER: 'Link Amp'}; -window.OPTIONS_RESONATOR_LINE_SELECTED = { - opacity: 0.7, - weight: 3, - color: '#FFA000', - dashArray: '0,10' + (new Array(25).join(',8,4')), - fill: false, - clickable: false -}; -window.OPTIONS_RESONATOR_LINE_NON_SELECTED = { - opacity: 0.25, - weight: 2, - color: '#FFA000', - dashArray: '0,10' + (new Array(25).join(',8,4')), - fill: false, - clickable: false -}; - // circles around a selected portal that show from where you can hack // it and how far the portal reaches (i.e. how far links may be made // from this portal) @@ -216,13 +194,6 @@ window.TEAM_NONE = 0; window.TEAM_RES = 1; window.TEAM_ENL = 2; window.TEAM_TO_CSS = ['none', 'res', 'enl']; -window.TYPE_UNKNOWN = 0; -window.TYPE_PORTAL = 1; -window.TYPE_LINK = 2; -window.TYPE_FIELD = 3; -window.TYPE_PLAYER = 4; -window.TYPE_CHAT = 5; -window.TYPE_RESONATOR = 6; window.SLOT_TO_LAT = [0, Math.sqrt(2)/2, 1, Math.sqrt(2)/2, 0, -Math.sqrt(2)/2, -1, -Math.sqrt(2)/2]; window.SLOT_TO_LNG = [1, Math.sqrt(2)/2, 0, -Math.sqrt(2)/2, -1, -Math.sqrt(2)/2, 0, Math.sqrt(2)/2];