diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js
index 50e9c8b3..b00e97a0 100644
--- a/plugins/portals-list.user.js
+++ b/plugins/portals-list.user.js
@@ -77,14 +77,15 @@ window.plugin.portalslist.getPortals = function() {
}
var l = window.getPortalLinks(i);
var f = window.getPortalFields(i);
+ var ap = portalApGainMaths(d.resCount, l.in.length+l.out.length, f.length);
var thisPortal = {
'portal': portal,
'guid': i,
- 'teamN': teamN,
+ 'teamN': teamN, // TEAM_NONE, TEAM_RES or TEAM_ENL
+ 'team': d.team, // "NEUTRAL", "RESISTANCE" or "ENLIGHTENED"
'name': d.title,
'nameLower': d.title.toLowerCase(),
- 'team': d.team,
'level': portal.options.level,
'health': d.health,
'resCount': d.resCount,
@@ -92,7 +93,9 @@ window.plugin.portalslist.getPortals = function() {
'linkCount': l.in.length + l.out.length,
'link' : l,
'fieldCount': f.length,
- 'field' : f
+ 'field' : f,
+ 'enemyAp': ap.enemyAp,
+ 'ap': ap,
};
window.plugin.portalslist.listPortals.push(thisPortal);
});
@@ -165,9 +168,11 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
+ '
Level | '
+ 'Team | '
+ 'Health | '
- + 'Resonators | '
+ + 'Res | '
+ 'Links | '
+ 'Fields | '
+ + 'AP | '
+ + '\n';
var rowNum = 1;
@@ -180,11 +185,23 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
+ '' + portal.level + ' | '
+ '' + portal.team.substr(0,3) + ' | ';
- html += '' + portal.health + ' | '
+ html += '' + (portal.teamN!=TEAM_NONE?portal.health+'%':'-') + ' | '
+ '' + portal.resCount + ' | '
- + '' + (portal.linkCount?portal.linkCount:'-') + ' | '
+ + '' + (portal.linkCount?portal.linkCount:'-') + ' | '
+ '' + (portal.fieldCount?portal.fieldCount:'-') + ' | ';
+ var apTitle = '';
+ if (PLAYER.team == portal.team) {
+ apTitle += 'Friendly AP:\t'+portal.ap.friendlyAp+'\n'
+ + '- deploy '+(8-portal.resCount)+' resonator(s)\n'
+ + '- upgrades/mods unknown\n';
+ }
+ apTitle += 'Enemy AP:\t'+portal.ap.enemyAp+'\n'
+ + '- Destroy AP:\t'+portal.ap.destroyAp+'\n'
+ + '- Capture AP:\t'+portal.ap.captureAp;
+
+ html += '' + digits(portal.ap.enemyAp) + ' | ';
+
html+= '';
rowNum++;
@@ -229,15 +246,14 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) {
//Use Jquery to create the link, which escape characters in TITLE and ADDRESS of portal
var a = $('',{
- "class": 'help',
text: portal.name,
title: portal.name,
href: perma,
onClick: jsSingleClick,
onDblClick: jsDoubleClick
})[0].outerHTML;
- var div = ''+a+'
';
- return div;
+
+ return a;
}
window.plugin.portalslist.onPaneChanged = function(pane) {
@@ -257,7 +273,7 @@ var setup = function() {
$('head').append('');
// Setup sorting