Skip to content
johnd0e edited this page Sep 6, 2019 · 9 revisions

Source

main.js

API

window.iitcBuildDate

window.script_info

window.PLAYER

window.COLOR_SELECTED_PORTAL = '#f0f'; // marker-canvas-icon-data.user.js

window.COLORS = ['#FF6600', '#0088FF', '#03DC03']; // none, res, enl

window.COLORS_LVL = ['#000', '#FECE5A', '#FFA630', '#FF7315', '#E40000', '#FD2992', '#EB26CD', '#C124E0', '#9627F4'];

// OTHER MORE-OR-LESS CONSTANTS //////////////////////////////////////
window.TEAM_NONE = 0;
window.TEAM_RES = 1;
window.TEAM_ENL = 2;
window.TEAM_TO_CSS = ['none', 'res', 'enl'];

// contain references to all entities loaded from the server. If render limits are hit,
// not all may be added to the leaflet layers
window.portals = {};
window.links = {};
window.fields = {};

window.selectedPortal = null;

// contain current status(on/off) of overlay layerGroups.
// But you should use isLayerGroupDisplayed(name) to check the status
window.overlayStatus = {};

misc code parts

window.urlPortal = null;

window.urlPortalLL = null;

boot:

window.HIDDEN_SCROLLBAR_ASSUMED_WIDTH = 20;

window.SIDEBAR_WIDTH = 300;

window.ON_MOVE_REFRESH = 2.5; //refresh time to use after a movement event

window.CHAT_SHRINKED = 60;

window.MIN_ZOOM = 3;

window.mapRunsUserAction = false;

map_data_calc_tools

window.MIN_ZOOM = 3;

idle

window.MAX_IDLE_TIME = 15*60; // stop updating map after 15min idling

window.REFRESH = 30; // refresh view every 30s (base time)

game_status.js

window.REFRESH_GAME_SCORE = 15*60; // refresh game score every 15 minutes

request_handling

window.MINIMUM_OVERRIDE_REFRESH = 10; //limit on refresh time since previous refresh, limiting repeated move refresh rate

window.ZOOM_LEVEL_ADJ = 5; // add 5 seconds per zoom level

window.REFRESH = 30; // refresh view every 30s (base time)

window.refreshTimeout = undefined;

portal_detail_display

window.ACCESS_INDICATOR_COLOR = 'orange';

window.RANGE_INDICATOR_COLOR = 'red'

window.COLORS_MOD = {VERY_RARE: '#b08cff', RARE: '#73a8ff', COMMON: '#8cffbf'};

portal_info

window.DEFAULT_PORTAL_IMG = '//commondatastorage.googleapis.com/ingress.com/img/default-portal-image.png';

chat window.CHAT_REQUEST_SCROLL_TOP = 200;

search

//window.NOMINATIM = '//open.mapquestapi.com/nominatim/v1/search.php?format=json&polygon_geojson=1&q=';

window.NOMINATIM = '//nominatim.openstreetmap.org/search?format=json&polygon_geojson=1&q=';

NONE!

// Minimum area to zoom ratio that field MU's will display
window.FIELD_MU_DISPLAY_AREA_ZOOM_RATIO = 0.001;

// Point tolerance for displaying MU's
window.FIELD_MU_DISPLAY_POINT_TOLERANCE = 60

window.MOD_TYPE = {RES_SHIELD:'Shield', MULTIHACK:'Multi-hack', FORCE_AMP:'Force Amp', HEATSINK:'Heat Sink', TURRET:'Turret', LINK_AMPLIFIER: 'Link Amp'};

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];
window.EARTH_RADIUS=6367000;
window.DEG2RAD = Math.PI / 180;
window.resonators = {};
// INGRESS CONSTANTS /////////////////////////////////////////////////
// http://decodeingress.me/2012/11/18/ingress-portal-levels-and-link-range/
window.RESO_NRG = [0, 1000, 1500, 2000, 2500, 3000, 4000, 5000, 6000];
window.HACK_RANGE = 40; // in meters, max. distance from portal to be able to access it
window.OCTANTS = ['E', 'NE', 'N', 'NW', 'W', 'SW', 'S', 'SE'];
window.OCTANTS_ARROW = ['→', '↗', '↑', '↖', '←', '↙', '↓', '↘'];
window.DESTROY_RESONATOR = 75; //AP for destroying portal
window.DESTROY_LINK = 187; //AP for destroying link
window.DESTROY_FIELD = 750; //AP for destroying field
window.CAPTURE_PORTAL = 500; //AP for capturing a portal
window.DEPLOY_RESONATOR = 125; //AP for deploying a resonator
window.COMPLETION_BONUS = 250; //AP for deploying all resonators on portal
window.UPGRADE_ANOTHERS_RESONATOR = 65; //AP for upgrading another's resonator
window.MAX_PORTAL_LEVEL = 8;
window.MAX_RESO_PER_PLAYER = [0, 8, 4, 4, 4, 2, 2, 1, 1];

boot, map_data_render

//var portalsLayers, linksLayer, fieldsLayer;
var portalsFactionLayers, linksFactionLayers, fieldsFactionLayers;

map_data_render

window.portalRangeIndicator = null; (and utils_misc)

window.portalAccessIndicator = null;

Clone this wiki locally