1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-25 13:02:13 +03:00

55 Commits

Author SHA1 Message Date
A_D
d635bd8469
Fixed system link updating on FSDTarget
FSDTarget contains the target system under `SystemAddress`, meaning that
any time you selected a star other than the current one, plugins'
`this.system_address` was updated to that target, rather than the
current system. Said updating causes the links provided from system_url
to reflect that update (for providers that support ID64s).

This changes the journal_entry behaviour to only update
`this.system_address` when the event is any of Location, Docked,
or FSDJump, all of which contain only the current system.
2020-08-26 18:59:14 +02:00
Athanasius
bf9d7dff89 station providers: Ensure the 'early station' functionality for all
* If you request docking successfully then show the station namd and
  have the link work.
* This is then only undone if you:
	1) Dock and undock
	2) Supercruise away
	3) Jump away
  It is *not* undone if you simply cancel the docking request.

Tested only with same provider for system and station for each of the
three, not the other 6 combinations.
2020-08-26 11:55:23 +01:00
Athanasius
c9dee18d70 system/station providers: Sanitise {system,station}_url logic
* Make all plugins use `requests.utils.requote_uri()`
* Make all plugins use roughly the same logic, without if/else trees
 (as the bodies do a `return ...`), ending with `return ''` if input
 parameters are None.

 This throws away the inara fallback to `this.station or this.system` as
 it's unlikely the in-plugin tracking did a better job than the
 monitor.py code.
2020-08-26 10:18:10 +01:00
Athanasius
d46358796f system/station plugin providers: Don't override 'url'
By default the ttkHyperlinkLabels for 'system' and 'station' names have
their 'url' members set to the functions in EDMarketConnector.App.

The EDDB one used to override the function as it had to do that special
name -> EDDB ID lookup from systems.p.  When I changed the code to not
need that any more I didn't fully understand what these overrides were.

After updating the EDDB code I then made sure the same logic was also in
the other plugins which meant they *also* set static strings, overriding
the call to the EDMarketConnector.App functions (which chain through to
the current plugin providers).

Unfortunately I didn't quite update the EDSM code enough causing
journal_entry() code to *not* set a new system 'url' despite changing
the 'text'.  This meant that only CAPI updates (so docking and login)
caused the URL to change, despite updating the 'text' to the correct
system name.

Rather than have everything setting static strings just do away with the
overrides as they're not needed!
2020-08-25 21:38:22 +01:00
Athanasius
669f895ffa plugins/edsm: Set system_link based on system_provider, not station_provider 2020-08-25 13:37:26 +01:00
Athanasius
b6f6365566 plugins/edsm: Fix missing line of code
Bad paste or something, who knows ?
2020-07-21 18:25:03 +01:00
Athanasius
29e3cba67e plugins/edsm: Align with code tested in inara plugin
* Use same state logic as Inara plugin now has.
* this.system_link for the Tk item, this.system is the system name.
* Ensure station text+link set on prefs change.
# Add a set of future TODO items.
2020-07-21 17:29:03 +01:00
Athanasius
c25120e0aa plugins/edsm.py makes no use of import companion
So remove it.
2020-07-12 19:10:57 +01:00
Athanasius
259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Jonathan Harris
c62d110448 Plugin migration 2020-06-21 16:33:13 +01:00
Athanasius
35867cd3f9 plugins/edsm.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
90b05d22c5 Now runs without console errors so far as pressing 'Update' is concerned.
There's an error on the console about an iterator when doing so
though.
2020-06-21 16:23:00 +01:00
Bernd Gollesch
690ef067b0 keep track of system location if fleet carrier jumps while docked 2020-06-18 17:35:35 +01:00
Jonathan Harris
37a1f0dd23 Notify other plugins of system's EDSM status 2019-01-28 17:22:14 +00:00
Jonathan Harris
52d99e18c7 Drop unused EDShipyard and Coriolis pseudo-events 2018-08-21 18:09:00 +01:00
Jonathan Harris
949a355b67 Don't import outfitting - it's not bundled in the OSX app
Fixes #340
2018-08-21 18:07:35 +01:00
Jonathan Harris
f203b8bc7e Export ship loadout to Coriolis in Journal Loadout format 2018-04-16 01:21:55 +01:00
Jonathan Harris
d62dae3f98 Link to stations tab if undocked 2018-04-04 19:43:45 +01:00
Jonathan Harris
3a3827f168 Make system and station links unclickable if URL not available 2018-04-04 19:34:35 +01:00
Jonathan Harris
37ec61a28d Fix for setting Coriolis link on cAPI Update 2018-04-03 14:41:27 +01:00
Jonathan Harris
0eaa61bdd9 Make system and station info websites configurable 2018-04-03 01:03:07 +01:00
Jonathan Harris
e2d79b9191 Batch up Scan events following NavBeaconScan 2018-03-04 02:38:57 +00:00
Jonathan Harris
c79398eb12 Merge branch 'beyond' 2018-02-26 17:57:49 +00:00
Jonathan Harris
88f323d36e Switch EDShipyard import to Loadout event 2018-02-18 02:38:30 +00:00
Jonathan Harris
d8dd7af2e2 Adjust batching for new startup event order 2018-02-18 02:38:30 +00:00
Jonathan Harris
196cf0fc98 Fix for EDSM outage handling
Fixes #279
2018-02-13 13:28:49 +00:00
Jonathan Harris
4e674f85d5 Log individual event errors 2018-02-10 17:09:32 +00:00
Jonathan Harris
7d1fa33aa0 Try to send any unsent events on closing 2018-01-27 17:51:00 +00:00
Jonathan Harris
bca3d63ffe Check that EDShipyard and Coriolis links shouldn't be discarded 2018-01-27 17:51:00 +00:00
Jonathan Harris
e2161cd108 Get system status from results of StartUp pseudo-event
Fixes #277
2018-01-07 19:04:53 +00:00
Jonathan Harris
8083b1978d Send _systemCoordinates with every event 2018-01-07 18:42:24 +00:00
Jonathan Harris
7d022016fe Don't send ship info to EDSM if EDSM sync not requested or on a crew
Fixes #280
2018-01-07 18:39:14 +00:00
Jonathan Harris
ba4809942a Treat return code 5xx as successfully sent 2018-01-03 17:54:30 +00:00
Jonathan Harris
61aab83244 Send shipID with EDShipyard and Coriolis links 2018-01-03 17:43:33 +00:00
Jonathan Harris
17c24fee81 Batch CommunityGoal events 2018-01-02 18:50:45 +00:00
Jonathan Harris
720a83db36 Send EDShipyard and Coriolis links 2018-01-02 17:16:43 +00:00
Jonathan Harris
b8eb9f979d Synthesise Cargo and Materials events on LoadGame 2018-01-02 16:48:42 +00:00
Jonathan Harris
07c0f6bb31 Batch startup events and retry on failure 2018-01-02 16:48:42 +00:00
Jonathan Harris
d4ffdab30c UTF-8 encode json POST data 2018-01-02 16:35:07 +00:00
Jonathan Harris
105f44e6ca Tidy 2018-01-02 16:35:07 +00:00
Jonathan Harris
b28355d182 Merge EDSM-NET/master
Squashed commit of the following:

commit a13a5c431396a131aad21927f2b4cc43b948d417
Author: AnthorNet <anthor.net@gmail.com>
Date:   Sun Dec 17 16:51:58 2017 +0100

    Ready for testing

commit 3e5915075b20e824580e5c3d879bce467dcb8b8d
Author: AnthorNet <anthor.net@gmail.com>
Date:   Sat Dec 16 21:47:22 2017 +0100

    Fix message json encoding

commit 868030578422f9c8568d5ba21d6f3aa132c01232
Author: AnthorNet <anthor.net@gmail.com>
Date:   Sat Dec 16 17:54:10 2017 +0100

    Fix double Dict conversion

commit 7693031f6f09c7119c51f91abbed7241e5ad6a1c
Author: AnthorNet <anthor.net@gmail.com>
Date:   Sat Dec 16 17:31:19 2017 +0100

    Fix transient state format

commit 54c96e31774ba5bfa2d19ac45b07d355dbefe46b
Author: AnthorNet <anthor.net@gmail.com>
Date:   Sat Dec 16 17:25:02 2017 +0100

    Fix calling discarded event callback

commit 24d006947f3bbb6607f893042d783c9232402c28
Author: AnthorNet <anthor.net@gmail.com>
Date:   Fri Dec 15 15:11:28 2017 +0100

    Retry Discarded Event list if empty

commit 4defedba965489d2d0c009189a193f9ecabc84fd
Author: AnthorNet <anthor.net@gmail.com>
Date:   Fri Dec 15 14:43:28 2017 +0100

    Prepare API migration
2018-01-02 16:35:06 +00:00
Jonathan Harris
b860b85d91 Handle selling ship on ShipyardSwap 2017-11-14 10:49:01 +00:00
Jonathan Harris
ad9885db98 Send unset events on exit or on switching Cmdr 2017-11-07 00:38:34 +00:00
Jonathan Harris
526c790d29 Send credits and assets to Inara 2017-11-06 16:32:08 +00:00
Jonathan Harris
85cae73529 Add support for syncing with Inara 2017-11-06 00:37:35 +00:00
Jonathan Harris
4a2269ddab Send ship cargo and fuel capacity to EDSM 2017-10-17 00:21:36 +01:00
Jonathan Harris
a738343c92 Use POST instead of GET
Fixes #251
2017-10-13 17:19:15 +02:00
Jonathan Harris
2ff75b9da9 ShipID can be zero
Ref 65970de
2017-09-05 15:58:08 +01:00
Jonathan Harris
0555f628ab Tidy 2017-08-14 22:59:52 +01:00
Jonathan Harris
965c6c9afb Communicate with EDSM asynchronously 2017-08-14 16:04:33 +01:00