* This means storing this.system_address from both cmdr_data and journal_entry. NB: If the current value in the event or data is 'None' it will retain the previous value. Without this Journal entries without SystemAddress erase the stored value.
* The station_url() fallback to system_url() similarly uses this.system_address in the call.
Addresses #512
There is one tiny regression for a very, very corner case.
In 3.46 if you use EDDB as the 'Station' provider and:
1. Dock at Station A, in System X
2. Jump out to System Y, which is also populated
3. Exit out of the game
4. (Re-)Start EDMC
5. Hit 'Update' to manually trigger CAPI data retrieval
you will see a "×" character as the Station Name, and can click on it to
take you to the EDDB *System* page. It is only there because of EDMC
using systems.p to check if System Y is populated.
With this version in that circumstance there's no way to know that
System Y is populated, so the code assumes not and doesn't show the
"×", and thus there's nothing to click to go to the EDDB *System* page
for System Y.
But so long as the user is actually running the game and EDMC together
then populated status is detected from Journal events and the "×" will
be there whenever you're undocked but in a populated system.
Caveat: We know Frontier have allowed some systems that are
technically populated, but show a Population of zero. This code assumes
that means they're *not* populated.
EDDB station link now triggers off this.system_population, which is
received via monitor passing 'Population' through in Startup, Location,
FSDJump and CarrierJump events.
One fewer use cases for systems.p (populated status in this case).
This shouldn't actually be necessary, the marketid shouln't change
because of a jump, and would have been picked up from the other events
anyway, but it should do no harm to set it again from this.
* Adds monitor.station_marketid, tracked at the same points as
monitor.station (name).
* Changes EDDB plugin to also track its own this.station_marketid so
that it can be used in /market-id/ EDDB URL.
This removes a use case for stations.p file.
* 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
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
*) 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
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.
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.
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.