Merge pull request #183 from Xosofox/master

IPAS plugin requires update to pass shield info
This commit is contained in:
Jon Atkins
2013-04-19 19:08:09 -07:00

View File

@ -36,10 +36,28 @@ window.plugin.ipasLink.getHash = function(d) {
if (reso) {
hashParts.push(reso.level + "," + reso.distanceToPortal + "," + reso.energyTotal);
} else {
hashParts.push(1 + "," + 35 + "," + 0); // Dummy values, the only important one is energy=0
hashParts.push("1,20,0");
}
});
return hashParts.join(";")+"|" + "0,0,0,0"; //shields not implemented yet
var resos = hashParts.join(";");
hashParts = [];
$.each(d.portalV2.linkedModArray, function (ind, mod) {
//shields only, so far...
var s = "0";
if (mod) {
if (mod.type === "RES_SHIELD") {
s = mod.rarity.charAt(0).toLowerCase();
}
}
hashParts.push(s);
});
var shields = hashParts.join(",");
return resos + "|" + shields;
}
var setup = function () {
window.plugin.ipasLink.setupCallback();
}
var setup = function() {