Commit Graph
30 Commits
Author SHA1 Message Date
Athanasius ef3306e3f5 Remove all use of defunct 'anonymous' option
The UI for setting the 'anonymous' option was removed in
f17f5d3f25 ("PKCE OAuth2 access to cAPI").
Since then there's been no way for a user to set, or unset, this option
(and the associated custom uploaderID).  However anyone with the registry keys
still set would have had them take effect.

This commit removes the last bits of code that were making use of it.

Note that the EDDN Relay anonymises all uploaderID values, so no listener
has been seeing the 'raw' values for a long time now.

close #575
2020-07-10 08:36:13 +01:00
Athanasius 89f113e190 Use Preferences Save Serial Number instead of flag
* new class `PrefsVersion` in prefs.py.  A singleton `prefsSaved` (note
   case) is created.
 * When new preferences are added and require defaults on first run the
   code should use:

     `if prefsVersion.shouldSetDefaults(<prior release version>, [<optional old test>]):`

   to check if defaults should be set in preferences.  So if prior release
   was '3.4.6.0' and you've added a new preference with defaults you should
   call this with '3.4.6.0' as the first argument.
   The <optional old test> is really only for historical purposes, as a
   fallback in case no 'PrefsVersion' has yet been set in the user's
   Registry/settings file.
 * Any code that adds such a new preference **MUST** make changes to the
   `versions` dictionary in the PrefsVersion class.
     1. Add the predicted next version to the dictionary, with number one
        higher than 'current'
     2. Set 'current' equal to that new value.
   Obviously if other post-last-release code has already done this then you
   don't need to.

   Failure to update the versions dictionary in this manner will lead to an
   Exception being raised, and the code the preferences are for failing
   (i.e. EDDN means no EDDN tab on Settings).

Closes #407
2020-07-01 15:33:42 +01:00
Athanasius 63c2ff52e9 Fix an Output/EDDN option combination causing defaults to get re-set
Change Output and EDDN options to only get set to defaults if key 'PrefsDidSave' is not present and true.  This gets a value of 0x1 saved any time preferences are applied.

The issue was that if you had sufficient options set such that the saved 'output' value was 0x0 then that would evaluate to false and cause the defaults to get set.

Fixes #407
2020-06-29 14:32:25 +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 93a65b02f5 plugins/eddn.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius 143d6e717a plugins/eddn.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius faf5bee834 Fixes plugins/eddn massaging of economies and prohibited data 2020-06-21 16:23:00 +01:00
Athanasius ce460712e2 Ensure we definitely can add mandatory fields to EDDN messages
This came to light due to python3 not liking try['StarPos'] =
list(this.coordinates) if this.coordinates was None.  As the comment
says these three fields are mandatory, ensure we can actually set them
appropriately, and display an error if not.
2020-06-21 16:23:00 +01:00
Athanasius fd4acae9a5 plugins/eddn.py: encode() un-necessary 2020-06-21 16:23:00 +01:00
Athanasius e73db981a8 Fixes EDDN sending to be working.
NB: Due to, I assume, EDDN relay de-duplication of messages, it's been
difficult to 100% test this.  No errors thrown, and stock/release EDMC
also doesn't result in a new message arriving at my EDDN consumer.
2020-06-21 16:23:00 +01:00
Athanasius e7545e174f Use .items() instead of .iteritems() 2020-06-21 16:23:00 +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 8db229585d send 'CarrierJump' event to EDDN 2020-06-18 17:36:51 +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 034c0b5bd2 Send SAASignalsFound events to EDDN 2019-10-03 19:22:58 +01:00
Jonathan Harris 09de1adc91 Make replay file line-buffered (#448)
Squashed commit of the following:

commit d42bb0add648ba52e56dd03a48ef9e1d09fdbda0
Author: Jonathan Harris <jonathan@marginal.org.uk>
Date:   Fri Sep 13 19:36:14 2019 +0100

    Use line buffering when creating replay file.

commit 1b6e499e2c
Author: Athanasius <github@miggy.org>
Date:   Thu Sep 12 17:30:59 2019 +0100

    Use line buffering for replay file.

      By default it takes a lot of data being written to the file for it to
    be flushed.  Or exiting EDMC.  So, let's reduce the chances of data
    loss.
2019-09-13 19:46:20 +01:00
Jonathan Harris 02d4da30d5 Don't give error if system coordinates unknown
Fixes #446
2019-09-13 19:46:05 +01:00
Athanasius 59b738fbf0 eddn cmdr_data not actually checking 'send to EDDN' option. (#445) 2019-09-13 19:45:20 +01:00
Jonathan Harris 1dc6d04954 Factor in Horizons flag when de-duplicating 2019-01-25 18:05:42 +00:00
Jonathan Harris 2f154ffd03 Check economies when setting Horizons flag
Fixes #391
2019-01-10 17:09:49 +00:00
Jonathan Harris f41b418a63 Look for "ELITE_HORIZONS_V_PLANETARY_LANDINGS" sku in cAPI data
to set Horizons flag. Should always hit at least Int_PlanetApproachSuite if Horizons.
2019-01-10 01:42:03 +00:00
Jonathan Harris 4900969bd9 cAPI data doesn't seem to reliably reflect whether user has Horizons 2019-01-10 01:12:09 +00:00
Jonathan Harris 728ef3f599 Add "horizons" flag to outfitting and shipyard messages 2019-01-08 22:54:39 +00:00
Jonathan Harris 22c94d0c5c Don't modify Journal FSDJump/Location entry Factions in-place
Fixes #375
2019-01-06 23:23:38 +00:00
Jonathan Harris 1d04a8c6e1 Fix for Journal-based outfitting message
Fixes #374
2019-01-06 16:35:58 +00:00
Jonathan Harris 3d85dd03a2 Handle empty shipyard list
e.g. at stations under repair
2018-12-29 17:43:50 +00:00
Jonathan Harris 6602ac415e Don't send squadron info with EDDN Location and FSDJump messages 2018-11-22 10:03:07 +00:00
Jonathan Harris ca6afa6d58 Also derive commodity, outfitting and shipyard messages from Journal 2018-11-18 01:52:06 +00:00
Jonathan Harris cc4390de49 Switch EDDN integration to a plugin 2018-11-18 01:52:05 +00:00