Skip to content

Commit

Permalink
redfection: intel serve "M" + mobile info
Browse files Browse the repository at this point in the history
  • Loading branch information
le-jeu committed Nov 14, 2022
1 parent fcce382 commit 6a1df31
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/redfection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ function setup() {
const decodePortal = window.decodeArray.portal;
window.decodeArray.portal = function (a, details) {
const res = decodePortal(a, details);
if (res.team === 'N' && res.resCount) {
res.team = 'M';
if (res.team === 'M') {
if (res.owner) res.owner = window.TEAM_NAMES[window.TEAM_MAC];
if (res.resonators) {
for (const r of res.resonators) {
Expand All @@ -60,9 +59,10 @@ function setup() {
};

const css = document.createElement('style');
css.textContent =
'.mac { color: #f74a4a }\n'
+ '#portalslist table tr.mac td { background-color: #a22121 }';
css.textContent =
'.mac { color: #f74a4a }\n' +
'#portalslist table tr.mac td { background-color: #a22121 }\n' +
'#mobileinfo .mac .filllevel { background-color: #ff0028 }';
document.head.append(css);
}

Expand Down
3 changes: 0 additions & 3 deletions src/redfection/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,5 @@ export function createDefaultOverlays() {
}
addLayers[machinaLayer.options.name] = machinaLayer;

// compatibility
addLayers.Neutral = L.layerGroup();

return addLayers;
}
4 changes: 0 additions & 4 deletions src/redfection/map_data_render.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export function deleteFieldEntity(guid) {
export function createFieldEntity(ent) {
this.seenFieldsGuid[ent[0]] = true; // flag we've seen it

if (ent[2][1] === 'N') ent[2][1] = 'M';

var data = {
// type: ent[2][0],
team: ent[2][1],
Expand Down Expand Up @@ -99,8 +97,6 @@ export function createLinkEntity(ent, faked) {

this.seenLinksGuid[ent[0]] = true;

if (ent[2][1] === 'N') ent[2][1] = 'M';

var data = {
team: ent[2][1],
oGuid: ent[2][2],
Expand Down
2 changes: 1 addition & 1 deletion src/redfection/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"author": "jaiperdu",
"name": "Redfection",
"category": "Info",
"version": "0.2.3",
"version": "0.2.4",
"description": "Show redfection portals and links"
}

0 comments on commit 6a1df31

Please sign in to comment.