Skip to content

Commit

Permalink
Revamp uplink service; add exploration overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanasa committed Jul 24, 2020
1 parent 1122bc5 commit 7317897
Show file tree
Hide file tree
Showing 18 changed files with 1,975 additions and 1,445 deletions.
46 changes: 21 additions & 25 deletions elite-navigator-stream/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,29 @@ async function run() {
eddn.on('error', err => console.error(err));
eddn.on('entry', entry => {

if(entry.SignalName_Localised === 'Notable stellar phenomena') {
console.log(entry);
}
if(entry.event === 'Scan' && entry.Rings) {

// if(entry.event === 'Scan' && entry.Rings) {
let systemName = entry.StarSystem;
if(!isPopulated(systemName)) {
return;
}

// let systemName = entry.StarSystem;
// if(!isPopulated(systemName)) {
// return;
// }
//
// let bodyName = entry.BodyName.replace(systemName, '').trim();
// let rings = entry.Rings.map(ring => ({
// name: ring.Name.replace(entry.BodyName, '').trim(),
// type: ring.RingClass
// .replace('eRingClass_', '')
// .replace('MetalRich', 'Metal Rich')
// .replace('Metal' + 'ic', 'Metallic'),
// }));
//
// console.log(systemName, bodyName, rings);
//
// (ringMap[entry.StarSystem] || (ringMap[entry.StarSystem] = {}))[bodyName] = {
// distance: Math.round(entry.DistanceFromArrivalLS),
// rings: rings,
// };
// }
let bodyName = entry.BodyName.replace(systemName, '').trim();
let rings = entry.Rings.map(ring => ({
name: ring.Name.replace(entry.BodyName, '').trim(),
type: ring.RingClass
.replace('eRingClass_', '')
.replace('MetalRich', 'Metal Rich')
.replace('Metal' + 'ic', 'Metallic'),
}));

console.log(systemName, bodyName, rings);

(ringMap[entry.StarSystem] || (ringMap[entry.StarSystem] = {}))[bodyName] = {
distance: Math.round(entry.DistanceFromArrivalLS),
rings: rings,
};
}
});
}

Expand Down
Binary file added elite-navigator-uplink/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions elite-navigator-uplink/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
'use strict';
let {app} = require('electron');
let {startMainWindow} = require('./src/main');

module.exports = require('./src/app');
let {socket} = require('./src/socket');

startMainWindow()
.catch(err => console.error(err) & process.exit(1));
Loading

0 comments on commit 7317897

Please sign in to comment.