limit by my level highlighter to no more than L8, as portals cannot be higher than this, but players now can
This commit is contained in:
parent
79b3782e97
commit
6001285df1
@ -2,7 +2,7 @@
|
||||
// @id iitc-plugin-highlight-portals-my-level@vita10gy
|
||||
// @name IITC plugin: highlight portals by my level
|
||||
// @category Highlighter
|
||||
// @version 0.1.0.@@DATETIMEVERSION@@
|
||||
// @version 0.1.2.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
@ -32,7 +32,10 @@ window.plugin.portalHighlighterPortalsMyLevel.aboveLevel = function(data) {
|
||||
|
||||
window.plugin.portalHighlighterPortalsMyLevel.colorLevel = function(below,data) {
|
||||
var portal_level = data.portal.options.level;
|
||||
var player_level = PLAYER.level;
|
||||
|
||||
// as portal levels can never be higher than L8, clamp the player level to this for highlight purposes
|
||||
var player_level = Math.min(PLAYER.level,8);
|
||||
|
||||
var opacity = .6;
|
||||
if((below && portal_level <= player_level) ||
|
||||
(!below && portal_level >= player_level)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user