if cmdr is near a body it'll show the distance from said body to the …#12
if cmdr is near a body it'll show the distance from said body to the …#12iMouath wants to merge 1 commit intoFuelRats:masterfrom
Conversation
iMouath
commented
Sep 6, 2018
- Added a way to view nearby body.
- query EDDB through kodeblox api to get body distance from arrival.
| case 'StartJump': | ||
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, | ||
| ...logItem, |
There was a problem hiding this comment.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
Unrecoverable syntax error. (50% scanned).
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, | ||
| ...logItem, | ||
| }; |
| break; | ||
| case 'StartJump': | ||
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, |
There was a problem hiding this comment.
Expected '}' to match '{' from line 189 and instead saw '...'.
Missing semicolon.
| }; | ||
| break; | ||
| case 'StartJump': | ||
| edjdata.player.pos = { |
There was a problem hiding this comment.
Expected '}' to match '{' from line 1 and instead saw 'edjdata'.
| ...logItem, | ||
| }; | ||
| break; | ||
| case 'StartJump': |
There was a problem hiding this comment.
Expected '}' to match '{' from line 3 and instead saw 'case'.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
Expected '}' to match '{' from line 2 and instead saw ':'.
| case 'Location': | ||
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, | ||
| ...logItem, |
There was a problem hiding this comment.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, | ||
| ...logItem, | ||
| }; |
There was a problem hiding this comment.
Unexpected '}'.
Unnecessary semicolon.
| break; | ||
| case 'Location': | ||
| edjdata.player.pos = { | ||
| ...edjdata.player.pos, |
There was a problem hiding this comment.
Expected '}' to match '{' from line 183 and instead saw '...'.
Missing semicolon.
| const jsonResponse = JSON.parse(req.responseText); | ||
| console.log(jsonResponse.docs[0].distance_to_arrival); | ||
| edjdata.player.pos.DistanceToArrival = jsonResponse.docs[0].distance_to_arrival; | ||
| edjGui.updateGui(); |
| /* edjGui */ | ||
| edjGetdistance = { | ||
| request(sysname) { | ||
| const req = new XMLHttpRequest(); |
itssimple
left a comment
There was a problem hiding this comment.
Would it be too much to ask, to change the API, to use the one we at FuelRats have instead?
https://github.com/FuelRats/EDDB_JsonAPI
https://colinhiggs.github.io/pyramid-jsonapi/client.html#filter-examples
|
Sure thing, I will read on the FuelRats API docs, and revise the PR :) |
|
Thanks a bunch! :) (I don't know if the docs are working, but it should be fairly simple.) https://system.api.fuelrats.com is the domain you'd want to use at least. ^^ You can do searches like this: |
|
Hmm, is the filter case sensitive? and how would I escape spaces, since %20 does't work either. |
|
Butting in here as I have prior experience with our systems API. To answer your first question, As a word of warning, I would avoid using As for the case sensitivity problem you're seeing... I think there is something up with the field selector you're using that is causing the system data to only appear when the name is in lower case. Weird... With all this in mind, what you probably want to be using is this query: EDIT: punctuation and updating the query provided |
|
Yeah, my experience with the system-api we have, is what I learned from trial and error during the 20 minutes I poked at it yesterday. :) So better listen to @UncleClapton, he probably knows better than me. ^^ |
|
@iMouath looks like UGP 184 does not have any known bodies in our database. If you look at the system (https://system.api.fuelrats.com/systems?filter[name:eq]=UGP%20184&include=bodies) you will notice that there are no bodies that exist. |
|
@UncleClapton thank you so much for confirming that lol ... that was fun. @itssimple It's up to you, I already wrote the for both API the in-house and https://elitebgs.kodeblox.com/api/eddb/v3/ |
|
@iMouath yeah idk how long ago our bodies table was updated, but I'll ask if we can get a comprehensive update done Btw, if you're interested in squeaking with us in real time, our IRC is always open! Feel free to hop on https://kiwi.fuelrats.com/ and ping me (Clapton) so I can get you into our semi-public dev room. If you're already familiar with IRC, you can point your client to irc.fuelrats.com:+6697 |