Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion
This commit is contained in:
commit
4447f1bef2
13
code/chat.js
13
code/chat.js
@ -680,7 +680,18 @@ window.chat.postMsg = function() {
|
|||||||
var msg = $.trim($('#chatinput input').val());
|
var msg = $.trim($('#chatinput input').val());
|
||||||
if(!msg || msg === '') return;
|
if(!msg || msg === '') return;
|
||||||
|
|
||||||
if(c === 'debug') return new Function (msg)();
|
if(c === 'debug') {
|
||||||
|
var result;
|
||||||
|
try {
|
||||||
|
result = eval(msg);
|
||||||
|
} catch(e) {
|
||||||
|
if(e.stack) console.error(e.stack);
|
||||||
|
throw e; // to trigger native error message
|
||||||
|
}
|
||||||
|
if(result !== undefined)
|
||||||
|
console.log(result.toString());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
var publik = c === 'public';
|
var publik = c === 'public';
|
||||||
var latlng = map.getCenter();
|
var latlng = map.getCenter();
|
||||||
|
@ -84,10 +84,20 @@ window.debug.console.error = function(text) {
|
|||||||
|
|
||||||
window.debug.console.overwriteNative = function() {
|
window.debug.console.overwriteNative = function() {
|
||||||
window.debug.console.create();
|
window.debug.console.create();
|
||||||
window.console = function() {}
|
|
||||||
window.console.log = window.debug.console.log;
|
var nativeConsole = window.console;
|
||||||
window.console.warn = window.debug.console.warn;
|
window.console = {};
|
||||||
window.console.error = window.debug.console.error;
|
|
||||||
|
function overwrite(which) {
|
||||||
|
window.console[which] = function() {
|
||||||
|
nativeConsole[which].apply(nativeConsole, arguments);
|
||||||
|
window.debug.console[which].apply(window.debug.console, arguments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
overwrite("log");
|
||||||
|
overwrite("warn");
|
||||||
|
overwrite("error");
|
||||||
}
|
}
|
||||||
|
|
||||||
window.debug.console.overwriteNativeIfRequired = function() {
|
window.debug.console.overwriteNativeIfRequired = function() {
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
// created to start cleaning up "window" interaction
|
// created to start cleaning up "window" interaction
|
||||||
//
|
//
|
||||||
window.show = function(id) {
|
window.show = function(id) {
|
||||||
if (typeof android !== 'undefined' && android && android.switchToPane) {
|
|
||||||
android.switchToPane(id);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* disable all map properties when switching to another pane
|
|
||||||
* because sometimes (bug?) touch events are passed to the map when
|
|
||||||
* other panes are focussed
|
|
||||||
*/
|
|
||||||
window.disableMapProperties();
|
|
||||||
window.hideall();
|
window.hideall();
|
||||||
|
|
||||||
switch(id) {
|
switch(id) {
|
||||||
@ -29,7 +20,6 @@ window.show = function(id) {
|
|||||||
window.debug.console.show();
|
window.debug.console.show();
|
||||||
break;
|
break;
|
||||||
case 'map':
|
case 'map':
|
||||||
window.enableMapProperties();
|
|
||||||
window.smartphone.mapButton.click();
|
window.smartphone.mapButton.click();
|
||||||
$('#portal_highlight_select').show();
|
$('#portal_highlight_select').show();
|
||||||
$('#farm_level_select').show();
|
$('#farm_level_select').show();
|
||||||
@ -41,20 +31,10 @@ window.show = function(id) {
|
|||||||
window.smartphone.mapButton.click();
|
window.smartphone.mapButton.click();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
window.enableMapProperties = function() {
|
if (typeof android !== 'undefined' && android && android.switchToPane) {
|
||||||
window.map.tap.enable();
|
android.switchToPane(id);
|
||||||
window.map.dragging.enable();
|
}
|
||||||
window.map.touchZoom.enable();
|
|
||||||
window.map.doubleClickZoom.enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
window.disableMapProperties = function() {
|
|
||||||
window.map.tap.disable();
|
|
||||||
window.map.dragging.disable();
|
|
||||||
window.map.touchZoom.disable();
|
|
||||||
window.map.doubleClickZoom.disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.hideall = function() {
|
window.hideall = function() {
|
||||||
|
@ -90,6 +90,17 @@ window.renderPortalDetails = function(guid) {
|
|||||||
portalDetailedDescription += '</table>';
|
portalDetailedDescription += '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var levelDetails = getPortalLevel(d);
|
||||||
|
if(levelDetails != 8) {
|
||||||
|
if(levelDetails==Math.ceil(levelDetails))
|
||||||
|
levelDetails += "\n8";
|
||||||
|
else
|
||||||
|
levelDetails += "\n" + (Math.ceil(levelDetails) - levelDetails)*8;
|
||||||
|
levelDetails += " resonator level(s) needed for next portal level";
|
||||||
|
} else {
|
||||||
|
levelDetails += "\nfully upgraded";
|
||||||
|
}
|
||||||
|
levelDetails = "Level " + levelDetails;
|
||||||
|
|
||||||
$('#portaldetails')
|
$('#portaldetails')
|
||||||
.attr('class', TEAM_TO_CSS[getTeam(d)])
|
.attr('class', TEAM_TO_CSS[getTeam(d)])
|
||||||
@ -98,7 +109,7 @@ window.renderPortalDetails = function(guid) {
|
|||||||
+ '<span class="close" onclick="renderPortalDetails(null); if(isSmartphone()) show(\'map\');" title="Close">X</span>'
|
+ '<span class="close" onclick="renderPortalDetails(null); if(isSmartphone()) show(\'map\');" title="Close">X</span>'
|
||||||
// help cursor via ".imgpreview img"
|
// help cursor via ".imgpreview img"
|
||||||
+ '<div class="imgpreview" '+imgTitle+' style="background-image: url('+img+')">'
|
+ '<div class="imgpreview" '+imgTitle+' style="background-image: url('+img+')">'
|
||||||
+ '<span id="level">'+Math.floor(getPortalLevel(d))+'</span>'
|
+ '<span id="level" title="'+levelDetails+'">'+Math.floor(getPortalLevel(d))+'</span>'
|
||||||
+ '<div class="portalDetails">'+ portalDetailedDescription + '</div>'
|
+ '<div class="portalDetails">'+ portalDetailedDescription + '</div>'
|
||||||
+ '<img class="hide" src="'+img+'"/></div>'
|
+ '<img class="hide" src="'+img+'"/></div>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
@ -134,9 +145,14 @@ window.setPortalIndicators = function(d) {
|
|||||||
|
|
||||||
var range = getPortalRange(d);
|
var range = getPortalRange(d);
|
||||||
var coord = [d.locationE6.latE6/1E6, d.locationE6.lngE6/1E6];
|
var coord = [d.locationE6.latE6/1E6, d.locationE6.lngE6/1E6];
|
||||||
portalRangeIndicator = (range > 0
|
portalRangeIndicator = (range.range > 0
|
||||||
? L.geodesicCircle(coord, range, { fill: false, color: RANGE_INDICATOR_COLOR, weight: 3, clickable: false })
|
? L.geodesicCircle(coord, range.range, {
|
||||||
: L.circle(coord, range, { fill: false, stroke: false, clickable: false })
|
fill: false,
|
||||||
|
color: RANGE_INDICATOR_COLOR,
|
||||||
|
weight: 3,
|
||||||
|
dashArray: range.isLinkable ? undefined : "10,10",
|
||||||
|
clickable: false })
|
||||||
|
: L.circle(coord, range.range, { fill: false, stroke: false, clickable: false })
|
||||||
).addTo(map);
|
).addTo(map);
|
||||||
|
|
||||||
portalAccessIndicator = L.circle(coord, HACK_RANGE,
|
portalAccessIndicator = L.circle(coord, HACK_RANGE,
|
||||||
|
@ -5,11 +5,20 @@
|
|||||||
// returns displayable text+link about portal range
|
// returns displayable text+link about portal range
|
||||||
window.getRangeText = function(d) {
|
window.getRangeText = function(d) {
|
||||||
var range = getPortalRange(d);
|
var range = getPortalRange(d);
|
||||||
|
|
||||||
|
var title = 'Base range:\t' + digits(Math.floor(range.base))+'m'
|
||||||
|
+ '\nLink amp boost:\t×'+range.boost
|
||||||
|
+ '\nRange:\t'+digits(Math.floor(range.range))+'m';
|
||||||
|
|
||||||
|
if(!range.isLinkable) title += '\nPortal is missing resonators,\nno new links can be made';
|
||||||
|
|
||||||
return ['range',
|
return ['range',
|
||||||
'<a onclick="window.rangeLinkClick()">'
|
'<a onclick="window.rangeLinkClick()"'
|
||||||
+ (range > 1000
|
+ (range.isLinkable ? '' : ' style="text-decoration:line-through;"')
|
||||||
? Math.floor(range/1000) + ' km'
|
+ ' title="'+title+'">'
|
||||||
: Math.floor(range) + ' m')
|
+ (range.range > 1000
|
||||||
|
? Math.floor(range.range/1000) + ' km'
|
||||||
|
: Math.floor(range.range) + ' m')
|
||||||
+ '</a>'];
|
+ '</a>'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,18 +47,20 @@ window.getPortalRange = function(d) {
|
|||||||
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
||||||
if(!reso) {
|
if(!reso) {
|
||||||
resoMissing = true;
|
resoMissing = true;
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
lvl += parseInt(reso.level);
|
lvl += parseInt(reso.level);
|
||||||
});
|
});
|
||||||
if(resoMissing) return 0;
|
|
||||||
|
|
||||||
var range = 160*Math.pow(getPortalLevel(d), 4);
|
var range = {
|
||||||
|
base: 160*Math.pow(getPortalLevel(d), 4),
|
||||||
|
boost: getLinkAmpRangeBoost(d)
|
||||||
|
};
|
||||||
|
|
||||||
var boost = getLinkAmpRangeBoost(d);
|
range.range = range.boost * range.base;
|
||||||
|
range.isLinkable = !resoMissing;
|
||||||
return range*boost;
|
|
||||||
|
|
||||||
|
return range;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.getLinkAmpRangeBoost = function(d) {
|
window.getLinkAmpRangeBoost = function(d) {
|
||||||
|
@ -602,3 +602,22 @@ window.clampLatLng = function(latlng) {
|
|||||||
window.clampLatLngBounds = function(bounds) {
|
window.clampLatLngBounds = function(bounds) {
|
||||||
return new L.LatLngBounds ( clampLatLng(bounds.getSouthWest()), clampLatLng(bounds.getNorthEast()) );
|
return new L.LatLngBounds ( clampLatLng(bounds.getSouthWest()), clampLatLng(bounds.getNorthEast()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid error in stock JS
|
||||||
|
if(goog && goog.style) {
|
||||||
|
goog.style.showElement = function(a, b) {
|
||||||
|
if(a && a.style)
|
||||||
|
a.style.display = b ? "" : "none"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix Leaflet: handle touchcancel events in Draggable
|
||||||
|
L.Draggable.prototype._onDownOrig = L.Draggable.prototype._onDown;
|
||||||
|
L.Draggable.prototype._onDown = function(e) {
|
||||||
|
L.Draggable.prototype._onDownOrig.apply(this, arguments);
|
||||||
|
|
||||||
|
if(e.type === "touchstart") {
|
||||||
|
L.DomEvent.on(document, "touchcancel", this._onUp, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
4
main.js
4
main.js
@ -100,7 +100,9 @@ document.getElementsByTagName('body')[0].innerHTML = ''
|
|||||||
+ ' </div>'
|
+ ' </div>'
|
||||||
+ ' </div>'
|
+ ' </div>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '<div id="updatestatus"><div id="innerstatus"></div></div>';
|
+ '<div id="updatestatus"><div id="innerstatus"></div></div>'
|
||||||
|
// avoid error by stock JS
|
||||||
|
+ '<div id="play_button"></div>';
|
||||||
|
|
||||||
// putting everything in a wrapper function that in turn is placed in a
|
// putting everything in a wrapper function that in turn is placed in a
|
||||||
// script tag on the website allows us to execute in the site’s context
|
// script tag on the website allows us to execute in the site’s context
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.cradle.iitc_mobile"
|
package="com.cradle.iitc_mobile"
|
||||||
android:versionCode="55"
|
android:versionCode="56"
|
||||||
android:versionName="0.7.5">
|
android:versionName="0.7.6">
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="14"
|
android:minSdkVersion="14"
|
||||||
|
@ -84,7 +84,6 @@ public class IITC_WebView extends WebView {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||||
if (consoleMessage.messageLevel() == ConsoleMessage.MessageLevel.ERROR) {
|
if (consoleMessage.messageLevel() == ConsoleMessage.MessageLevel.ERROR) {
|
||||||
Log.d("iitcm", consoleMessage.message());
|
|
||||||
((IITC_Mobile) getContext()).setLoadingState(false);
|
((IITC_Mobile) getContext()).setLoadingState(false);
|
||||||
}
|
}
|
||||||
return super.onConsoleMessage(consoleMessage);
|
return super.onConsoleMessage(consoleMessage);
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
// PLUGIN START ////////////////////////////////////////////////////////
|
// PLUGIN START ////////////////////////////////////////////////////////
|
||||||
window.PLAYER_TRACKER_MAX_TIME = 3*60*60*1000; // in milliseconds
|
window.PLAYER_TRACKER_MAX_TIME = 3*60*60*1000; // in milliseconds
|
||||||
window.PLAYER_TRACKER_MIN_ZOOM = 9;
|
window.PLAYER_TRACKER_MIN_ZOOM = 9;
|
||||||
|
window.PLAYER_TRACKER_MIN_OPACITY = 0.3;
|
||||||
window.PLAYER_TRACKER_LINE_COLOUR = '#FF00FD';
|
window.PLAYER_TRACKER_LINE_COLOUR = '#FF00FD';
|
||||||
|
|
||||||
|
|
||||||
@ -45,11 +45,18 @@ window.plugin.playerTracker.setup = function() {
|
|||||||
iconRetinaUrl: iconResRetImage
|
iconRetinaUrl: iconResRetImage
|
||||||
}});
|
}});
|
||||||
|
|
||||||
plugin.playerTracker.drawnTraces = new L.LayerGroup();
|
plugin.playerTracker.drawnTracesEnl = new L.LayerGroup();
|
||||||
window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces, true);
|
plugin.playerTracker.drawnTracesRes = new L.LayerGroup();
|
||||||
|
// to avoid any favouritism, we'll put the player's own faction layer first
|
||||||
|
if (PLAYER.team == 'RESISTANCE') {
|
||||||
|
window.addLayerGroup('Player Tracker Resistance', plugin.playerTracker.drawnTracesRes, true);
|
||||||
|
window.addLayerGroup('Player Tracker Enlightened', plugin.playerTracker.drawnTracesEnl, true);
|
||||||
|
} else {
|
||||||
|
window.addLayerGroup('Player Tracker Enlightened', plugin.playerTracker.drawnTracesEnl, true);
|
||||||
|
window.addLayerGroup('Player Tracker Resistance', plugin.playerTracker.drawnTracesRes, true);
|
||||||
|
}
|
||||||
map.on('layeradd',function(obj) {
|
map.on('layeradd',function(obj) {
|
||||||
if(obj.layer === plugin.playerTracker.drawnTraces)
|
if(obj.layer === plugin.playerTracker.drawnTracesEnl || obj.layer === plugin.playerTracker.drawnTracesRes) {
|
||||||
{
|
|
||||||
obj.layer.eachLayer(function(marker) {
|
obj.layer.eachLayer(function(marker) {
|
||||||
if(marker._icon) window.setupTooltips($(marker._icon));
|
if(marker._icon) window.setupTooltips($(marker._icon));
|
||||||
});
|
});
|
||||||
@ -77,7 +84,8 @@ window.plugin.playerTracker.stored = {};
|
|||||||
window.plugin.playerTracker.zoomListener = function() {
|
window.plugin.playerTracker.zoomListener = function() {
|
||||||
var ctrl = $('.leaflet-control-layers-selector + span:contains("Player Tracker")').parent();
|
var ctrl = $('.leaflet-control-layers-selector + span:contains("Player Tracker")').parent();
|
||||||
if(window.map.getZoom() < window.PLAYER_TRACKER_MIN_ZOOM) {
|
if(window.map.getZoom() < window.PLAYER_TRACKER_MIN_ZOOM) {
|
||||||
window.plugin.playerTracker.drawnTraces.clearLayers();
|
window.plugin.playerTracker.drawnTracesEnl.clearLayers();
|
||||||
|
window.plugin.playerTracker.drawnTracesRes.clearLayers();
|
||||||
ctrl.addClass('disabled').attr('title', 'Zoom in to show those.');
|
ctrl.addClass('disabled').attr('title', 'Zoom in to show those.');
|
||||||
} else {
|
} else {
|
||||||
ctrl.removeClass('disabled').attr('title', '');
|
ctrl.removeClass('disabled').attr('title', '');
|
||||||
@ -241,9 +249,10 @@ window.plugin.playerTracker.ago = function(time, now) {
|
|||||||
|
|
||||||
window.plugin.playerTracker.drawData = function() {
|
window.plugin.playerTracker.drawData = function() {
|
||||||
var gllfe = plugin.playerTracker.getLatLngFromEvent;
|
var gllfe = plugin.playerTracker.getLatLngFromEvent;
|
||||||
var layer = plugin.playerTracker.drawnTraces;
|
|
||||||
|
|
||||||
var polyLineByAge = [[], [], [], []];
|
var polyLineByAgeEnl = [[], [], [], []];
|
||||||
|
var polyLineByAgeRes = [[], [], [], []];
|
||||||
|
|
||||||
var split = PLAYER_TRACKER_MAX_TIME / 4;
|
var split = PLAYER_TRACKER_MAX_TIME / 4;
|
||||||
var now = new Date().getTime();
|
var now = new Date().getTime();
|
||||||
$.each(plugin.playerTracker.stored, function(pguid, playerData) {
|
$.each(plugin.playerTracker.stored, function(pguid, playerData) {
|
||||||
@ -259,7 +268,11 @@ window.plugin.playerTracker.drawData = function() {
|
|||||||
var p = playerData.events[i];
|
var p = playerData.events[i];
|
||||||
var ageBucket = Math.min(parseInt((now - p.time) / split), 4-1);
|
var ageBucket = Math.min(parseInt((now - p.time) / split), 4-1);
|
||||||
var line = [gllfe(p), gllfe(playerData.events[i-1])];
|
var line = [gllfe(p), gllfe(playerData.events[i-1])];
|
||||||
polyLineByAge[ageBucket].push(line);
|
|
||||||
|
if(playerData.team === 'RESISTANCE')
|
||||||
|
polyLineByAgeRes[ageBucket].push(line);
|
||||||
|
else
|
||||||
|
polyLineByAgeEnl[ageBucket].push(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tooltip for marker
|
// tooltip for marker
|
||||||
@ -310,19 +323,23 @@ window.plugin.playerTracker.drawData = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// marker opacity
|
||||||
|
var relOpacity = 1 - (now - last.time) / window.PLAYER_TRACKER_MAX_TIME
|
||||||
|
var absOpacity = window.PLAYER_TRACKER_MIN_OPACITY + (1 - window.PLAYER_TRACKER_MIN_OPACITY) * relOpacity;
|
||||||
|
|
||||||
// marker itself
|
// marker itself
|
||||||
var icon = playerData.team === 'RESISTANCE' ? new plugin.playerTracker.iconRes() : new plugin.playerTracker.iconEnl();
|
var icon = playerData.team === 'RESISTANCE' ? new plugin.playerTracker.iconRes() : new plugin.playerTracker.iconEnl();
|
||||||
var m = L.marker(gllfe(last), {title: title, icon: icon, referenceToPortal: closestPortal});
|
var m = L.marker(gllfe(last), {title: title, icon: icon, referenceToPortal: closestPortal, opacity: absOpacity});
|
||||||
// ensure tooltips are closed, sometimes they linger
|
// ensure tooltips are closed, sometimes they linger
|
||||||
m.on('mouseout', function() { $(this._icon).tooltip('close'); });
|
m.on('mouseout', function() { $(this._icon).tooltip('close'); });
|
||||||
m.addTo(layer);
|
m.addTo(playerData.team === 'RESISTANCE' ? plugin.playerTracker.drawnTracesRes : plugin.playerTracker.drawnTracesEnl);
|
||||||
plugin.playerTracker.oms.addMarker(m);
|
plugin.playerTracker.oms.addMarker(m);
|
||||||
// jQueryUI doesn’t automatically notice the new markers
|
// jQueryUI doesn’t automatically notice the new markers
|
||||||
window.setupTooltips($(m._icon));
|
window.setupTooltips($(m._icon));
|
||||||
});
|
});
|
||||||
|
|
||||||
// draw the poly lines to the map
|
// draw the poly lines to the map
|
||||||
$.each(polyLineByAge, function(i, polyLine) {
|
$.each(polyLineByAgeEnl, function(i, polyLine) {
|
||||||
if(polyLine.length === 0) return true;
|
if(polyLine.length === 0) return true;
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
@ -333,7 +350,20 @@ window.plugin.playerTracker.drawData = function() {
|
|||||||
dashArray: "5,8"
|
dashArray: "5,8"
|
||||||
};
|
};
|
||||||
|
|
||||||
L.multiPolyline(polyLine, opts).addTo(layer);
|
L.multiPolyline(polyLine, opts).addTo(plugin.playerTracker.drawnTracesEnl);
|
||||||
|
});
|
||||||
|
$.each(polyLineByAgeRes, function(i, polyLine) {
|
||||||
|
if(polyLine.length === 0) return true;
|
||||||
|
|
||||||
|
var opts = {
|
||||||
|
weight: 2-0.25*i,
|
||||||
|
color: PLAYER_TRACKER_LINE_COLOUR,
|
||||||
|
clickable: false,
|
||||||
|
opacity: 1-0.2*i,
|
||||||
|
dashArray: "5,8"
|
||||||
|
};
|
||||||
|
|
||||||
|
L.multiPolyline(polyLine, opts).addTo(plugin.playerTracker.drawnTracesRes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,11 +373,15 @@ window.plugin.playerTracker.handleData = function(data) {
|
|||||||
plugin.playerTracker.discardOldData();
|
plugin.playerTracker.discardOldData();
|
||||||
plugin.playerTracker.processNewData(data);
|
plugin.playerTracker.processNewData(data);
|
||||||
// remove old popups
|
// remove old popups
|
||||||
plugin.playerTracker.drawnTraces.eachLayer(function(layer) {
|
plugin.playerTracker.drawnTracesEnl.eachLayer(function(layer) {
|
||||||
|
if(layer._icon) $(layer._icon).tooltip('destroy');
|
||||||
|
});
|
||||||
|
plugin.playerTracker.drawnTracesRes.eachLayer(function(layer) {
|
||||||
if(layer._icon) $(layer._icon).tooltip('destroy');
|
if(layer._icon) $(layer._icon).tooltip('destroy');
|
||||||
});
|
});
|
||||||
plugin.playerTracker.oms.clearMarkers();
|
plugin.playerTracker.oms.clearMarkers();
|
||||||
plugin.playerTracker.drawnTraces.clearLayers();
|
plugin.playerTracker.drawnTracesEnl.clearLayers();
|
||||||
|
plugin.playerTracker.drawnTracesRes.clearLayers();
|
||||||
plugin.playerTracker.drawData();
|
plugin.playerTracker.drawData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,8 +102,14 @@
|
|||||||
window.plugin.zaprange.zapLayerEnlHolderGroup.addLayer(window.plugin.zaprange.zapCircleEnlHolderGroup);
|
window.plugin.zaprange.zapLayerEnlHolderGroup.addLayer(window.plugin.zaprange.zapCircleEnlHolderGroup);
|
||||||
window.plugin.zaprange.zapLayerResHolderGroup.addLayer(window.plugin.zaprange.zapCircleResHolderGroup);
|
window.plugin.zaprange.zapLayerResHolderGroup.addLayer(window.plugin.zaprange.zapCircleResHolderGroup);
|
||||||
|
|
||||||
|
// to avoid any favouritism, we'll put the player's own faction layer first
|
||||||
|
if (PLAYER.team == 'RESISTANCE') {
|
||||||
|
window.addLayerGroup('Zaprange Resistance', window.plugin.zaprange.zapLayerResHolderGroup, true);
|
||||||
|
window.addLayerGroup('Zaprange Enlightened', window.plugin.zaprange.zapLayerEnlHolderGroup, true);
|
||||||
|
} else {
|
||||||
window.addLayerGroup('Zaprange Enlightened', window.plugin.zaprange.zapLayerEnlHolderGroup, true);
|
window.addLayerGroup('Zaprange Enlightened', window.plugin.zaprange.zapLayerEnlHolderGroup, true);
|
||||||
window.addLayerGroup('Zaprange Resistance', window.plugin.zaprange.zapLayerResHolderGroup, true);
|
window.addLayerGroup('Zaprange Resistance', window.plugin.zaprange.zapLayerResHolderGroup, true);
|
||||||
|
}
|
||||||
|
|
||||||
window.addHook('portalAdded', window.plugin.zaprange.portalAdded);
|
window.addHook('portalAdded', window.plugin.zaprange.portalAdded);
|
||||||
|
|
||||||
|
@ -526,6 +526,7 @@ h3 {
|
|||||||
display: block;
|
display: block;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* portal mods */
|
/* portal mods */
|
||||||
@ -969,3 +970,8 @@ td + td {
|
|||||||
.portal_details tr.padding-top th, .portal_details tr.padding-top td {
|
.portal_details tr.padding-top th, .portal_details tr.padding-top td {
|
||||||
padding-top: 0.7em;
|
padding-top: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#play_button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user