-
Notifications
You must be signed in to change notification settings - Fork 109
HACKING
See our Contributing Guidelines.
To build the browser scripts from source you will need Python 3.6+. It should build correctly on Linux and Windows (and, probably, Macs, FreeBSD, etc)
Fork this project, clone to your local machine.
Run the build.py local
script to build the code.
If all goes well, output of the build will end up in build/local
subfolder.
You can create a custom build settings file, localbuildsettings.py
- look in the supplied
buildsettings.py
for details.
To build the mobile app, along with python, you will need:
-
Java JDK (development kit - the runtime JRE) is not enough).
JAVA_HOME
should be set (or 'java' command available inPATH
). -
Android SDK.
ANDROID_HOME
should be set (orsdk.dir
specified inmobile/local.properties
file).
Run build.py mobile
to build IITC Mobile in debug mode.
More details in IITC Mobile (Android app).
Plugins may be developed in the same way as the total conversion script. Plugins may provide features tailored to specific needs and are allowed to change things as they see fit. You can provide them separately or submit a pull request to have them managed in this repository. If you think a hook in the main script is required, simply open a bug report.
You can use the guess player-level-guess
script as an example to get you started.
Just update the names and the code and you should be able to develop your plugin.
The outer wrapping code (seen in built plugin) ensures your plugin is executed after the main script.
If you happen the write general purpose functions for your plugin, consider adding them to the main script instead.
For example, if you write a getResoCountFromPortal(details)
function it may be very well added to code/portal_info.js
.
Available hooks are documented in the code.
Please refer to the boilerplate explanation in hooks.js
to see which are available and how to listen for them. If you need additional hooks, open bug reports (preferably with patches attached).
If you have external dependencies put them into external/
and add correspondent note into versions.md
and ATTRIBUTION.md
.
Currently IITC-CE uses custom build system based on Python scripts (Python version 3.6+ required).
Execute ./build.py local
to effectively concatenate main.js
with all the files in code/
,
including resources from images/
and external/
directories.
It generates build/*/total-conversion-build.user.js
, ready to be installed into your browser.
All source files in plugins/
are processed in similar way, resulting in build/*/plugins/*
.
The files in build/*/
are for release only and should not be touched manually.
To change main script - modify the files in code/
, to change plugin(s) - modify plugins/*
,
then run build script to get all compiled.
style.css
contains most styles required for the user-script. The extra ones can be found in code/boot.js#window.setupStyles
.
Only CSS rules that depend on config variables should be defined there.
external/*
is 3rd-party libraries, see versions.md
for more info.
For IITC users
-
Guide on how to migrate data from an legacy version of IITC Mobile
-
(click to expand )
Cache (Data caching to prevent reloading)
Controls (Map controls/widgets)
Draw (Allow drawing things onto the current map so you may plan your next move)
Highlighter (Portal highlighters)
- Hide portal ownership
- Highlight portals by level color
- Highlight inactive portals
- Highlight portal weakness
- Highlight high level portals
- Highlight portals by my level
- Highlight portals with ornaments
- Highlight portals that need recharging
- Highlight portals with ornaments
- Highlight portals that need recharging
- Highlight portals missing resonators
- Highlight portals with infrastructure problems
Info (Display additional information)
- Available AP statistics
- Portal count
- Portals list
- Player level guess
- Localized scoreboard
- Missions
- Scoring cycle / checkpoint times
- Layer count
Layer (Additional map layers)
- Find farms on map
- Portal Level Numbers
- Overlay KML / GPX / GeoJSON
- Ingress scoring regions
- Zaprange
- Player activity tracker
- Portal Names
- Keys on map
Map Tiles (Alternative map layers)
- Stamen.com map layers
- Blank map
- Gray Google map
- Bing maps
- OpenStreetMap.org map
- Gaode (高德地图) / AutoNavi map
- Kartverket.no maps (Norway)
- Yandex maps
Portal Info (Enhanced information on the selected portal)
Tweaks (Adjust IITC settings)
Misc (Unclassified plugins)
For plugin developers
For IITC developers