rearrange portal details, now we no longer have capture date or resonator ranges
many more fields are now not displayed for uncaptured portals - not useful
This commit is contained in:
parent
b3da632948
commit
73d5f3755c
@ -164,6 +164,7 @@ window.getPortalMiscDetails = function(guid,d) {
|
||||
|
||||
// collect some random data that’s not worth to put in an own method
|
||||
var linkInfo = getPortalLinks(guid);
|
||||
var linkCount = linkInfo.in.length + linkInfo.out.length;
|
||||
var links = {incoming: linkInfo.in.length, outgoing: linkInfo.out.length};
|
||||
|
||||
function linkExpl(t) { return '<tt title="'+links.outgoing+' links out (8 max)\n'+links.incoming+' links in\n('+(links.outgoing+links.incoming)+' total)">'+t+'</tt>'; }
|
||||
@ -171,33 +172,31 @@ window.getPortalMiscDetails = function(guid,d) {
|
||||
|
||||
var player = d.owner
|
||||
? '<span class="nickname">' + d.owner + '</span>'
|
||||
: null;
|
||||
var playerText = player ? ['owner', player] : null;
|
||||
: '-';
|
||||
var playerText = ['owner', player];
|
||||
|
||||
var time = d.capturedTime
|
||||
? '<span title="' + unixTimeToDateTimeString(d.capturedTime, false) + '\n'
|
||||
+ formatInterval(Math.floor((Date.now()-d.capturedTime)/1000), 2) + ' ago">'
|
||||
+ unixTimeToString(d.capturedTime) + '</span>'
|
||||
: null;
|
||||
var sinceText = time ? ['since', time] : null;
|
||||
|
||||
var fieldCount = getPortalFieldsCount(guid);
|
||||
|
||||
var linkedFields = ['fields', fieldCount];
|
||||
var fieldsText = ['fields', fieldCount];
|
||||
|
||||
var apGainText = getAttackApGainText(d,fieldCount,linkCount);
|
||||
|
||||
var linkCount = getPortalLinksCount(guid);
|
||||
|
||||
// collect and html-ify random data
|
||||
var randDetailsData = [];
|
||||
if (playerText || sinceText) {
|
||||
randDetailsData.push (playerText || ['-','-'], sinceText || ['-','-']);
|
||||
if (d.owner) {
|
||||
// these pieces of data are only relevant when the portal is captured
|
||||
randDetailsData.push (
|
||||
playerText, getRangeText(d),
|
||||
linksText, fieldsText,
|
||||
getMitigationText(d,linkCount), getEnergyText(d)
|
||||
);
|
||||
}
|
||||
|
||||
// and these have some use, even for uncaptured portals
|
||||
randDetailsData.push (
|
||||
getRangeText(d), getEnergyText(d),
|
||||
linksText, ['-','-'],
|
||||
linkedFields, getAttackApGainText(d,fieldCount,linkCount),
|
||||
getHackDetailsText(d), getMitigationText(d,linkCount)
|
||||
apGainText, getHackDetailsText(d)
|
||||
);
|
||||
|
||||
// artifact details
|
||||
|
Loading…
x
Reference in New Issue
Block a user