artifacts:

- like the selected portal, are not removed when off screen/below min level
- shard/target details shown on portal details for jarvis shards
This commit is contained in:
Jon Atkins
2013-11-08 06:09:24 +00:00
parent 15537e4e95
commit a595c2f11d
3 changed files with 35 additions and 10 deletions

View File

@ -46,6 +46,26 @@ window.renderPortalDetails = function(guid) {
linkedFields, getAttackApGainText(d),
getHackDetailsText(d), getMitigationText(d)
];
// artifact details
//niantic hard-code the fact it's just jarvis shards/targets - so until more examples exist, we'll do the same
//(at some future point we can iterate through all the artifact types and add rows as needed)
var jarvisArtifact = artifact.getPortalData (guid, 'jarvis');
if (jarvisArtifact) {
// the genFourColumnTable function below doesn't handle cases where one column is null and the other isn't - so default to *someting* in both columns
var target = ['',''], shards = ['shards','(none)'];
if (jarvisArtifact.target) {
target = ['target', '<span class="'+TEAM_TO_CSS[jarvisArtifact.target]+'">'+(jarvisArtifact.target==TEAM_RES?'Resistance':'Enlightened')+'</span>'];
}
if (jarvisArtifact.fragments) {
shards = [jarvisArtifact.fragments.length>1?'shards':'shard', '#'+jarvisArtifact.fragments.join(', #')];
}
randDetails.push (target, shards);
}
randDetails = '<table id="randdetails">' + genFourColumnTable(randDetails) + '</table>';
var resoDetails = '<table id="resodetails">' + getResonatorDetails(d) + '</table>';