1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 09:32:23 +03:00

141 Commits

Author SHA1 Message Date
Athanasius
553c7980c1 Change EDDB system_url() to using by-name URL
This removes a use case for systems.p file
2020-07-01 15:51:14 +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
6ff9dbc3bf plugins/edsy.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
02bcbf2685 plugins/eddb.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
4a7f4cd450 plugins/inara.py: De-future 2020-06-21 16:23:01 +01:00
Athanasius
35867cd3f9 plugins/edsm.py: De-future 2020-06-21 16:23:01 +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
753fdedbdf Fixes plugins/coriolis.py to appear in settings, and confirms click-through works
*) Code and imports brought in line with edsy plugin
  *) 'Coriolis' now appears in Settings > Configuration > Shipyard
    dropdown
  *) Confirmed that with this active a valid build opens on coriolis.io
2020-06-21 16:23:00 +01:00
Athanasius
0d893c1c56 Gets plugins/edsy.py working. The usual string vs. bytes shenanigans. 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
bebc3648b8 plugins/inara.py: No need for encode('utf-8') 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
38ba48c713 added carrier data to CarrierJump event 2020-06-18 17:46:16 +01:00
Bernd Gollesch
098613ea0a There is now an api event for 'CarrierJump' -> 'addCommanderTravelCarrierJump' 2020-06-18 17:46:06 +01:00
Bernd Gollesch
02649b8c6f there is also a 'Factions' list in the 'CarrierJump' event 2020-06-18 17:44:22 +01:00
Bernd Gollesch
b45df6b4fd keep track of location if the carrier you're docked at jumps 2020-06-18 17:44:14 +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
VAKazakov
994624d83b
changing division by int to float, as suggested 2020-03-05 11:52:34 +03:00
VAKazakov
1984e25e50
Fixing reputation values error
"Inara setCommanderReputationMinorFaction, The reputation value exceeds the valid range"
2020-03-04 22:43:47 +03:00
Jonathan Harris
034c0b5bd2 Send SAASignalsFound events to EDDN 2019-10-03 19:22:58 +01:00
Jonathan Harris
e9a23c67dc Send correct opponentName for Interdicted and Interdiction events
Fixes #459
2019-10-02 18:50:06 +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 1b6e499e2c306b66708a9fd210d1db1771c4c78f
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
d8b5884b05 Notify plugins of Inara ship, system and station IDs
Fixes #425
2019-07-06 15:28:48 +01:00
Jonathan Harris
de9760c4d2 Update EDSY URL 2019-06-19 09:31:48 +01:00
Jonathan Harris
ca0c650955 Add influence and reputation gain to setCommanderMissionCompleted 2019-02-16 17:52:36 +00:00
Jonathan Harris
37a1f0dd23 Notify other plugins of system's EDSM status 2019-01-28 17:22:14 +00: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
126158bf15 Don't send Engineers at startup prior to 3.3 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
Jonathan Harris
31f0139271 More Inara 3.3 support
Add commanderFrontierID to header.
Send "setCommanderReputationMinorFaction" events.
Send "addCommanderFriend" and "delCommanderFriend" events.
Use array forms of "setCommanderRankPilot", "SetCommanderRankEngineer and
"SetCommanderReputationMajorFaction" events.
2018-11-16 00:13:52 +00:00