Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.plugin.uniquesextra.highlighterJasperUnvisited2 = {
- highlight: function(data) {
- var guid = data.portal.options.ent[0];
- var uniqueInfo = window.plugin.uniques.uniques[guid];
- var ownteam = 0;
- if (PLAYER.team == 'RESISTANCE') ownteam = 1; else ownteam = 2;
- var style = {};
- if (uniqueInfo) {
- if (uniqueInfo.captured) {
- // captured (and, implied, visited too) - no highlights
- style.opacity = 0.1;
- style.fillOpacity = 0.1;
- } else if (uniqueInfo.visited){
- if (data.portal.options.team == ownteam){
- style.fillColor = 'gold';
- style.opacity = 0.3;
- style.fillOpacity = 0.3;
- } else {
- style.fillColor = 'yellow';
- style.opacity = 0.8;
- style.fillOpacity = 0.8;
- }
- } else {
- // we have an 'uniqueInfo' entry for the portal, but it's not set visited or captured?
- // could be used to flag a portal you don't plan to visit, so use a less opaque red
- style.fillColor = 'red';
- style.fillOpacity = 0.6;
- }
- } else {
- // no visit data at all
- if (data.portal.options.team == ownteam){
- style.fillColor = 'purple';
- style.fillOpacity = 0.5;
- } else { // own team
- style.fillColor = 'red';
- style.fillOpacity = 0.8;
- }
- }
- data.portal.setStyle(style);
- },
- setSelected: function(active) {
- window.plugin.uniques.isHighlightActive = active;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement