* Adds `monitor.is_live_galaxy()` for general use.
* Assumes Update 14 starts after 2022-11-29T09:00:00+00:00. That's the
currently schedule day, and recently the servers have been down by the time.
Likelihood of them coming back *up* quickly seems slim to none.
* If we couldn't parse the `gameversion` from Journal using
`semantic_version.Version.coerce()` this will fail, and assume we're on
the Legacy galaxy.
* This is cleaner than starting to track it in `plugins/eddn.py` specifically.
* This is literally only about if we're piloting a ship that is docked, so
not even trying to resolve "on-foot, in a station, 'Location' said not
docked though".
No need to log at INFO for the retry counts, as this appears to be working,
make it DEBUG instead.
This was making the EDMC.py output needlessly noisy.
Using os.path.getctime for the order, not the filename. This addresses the
changed Journal filenames in Odyssey Update 11, whilst keeping compatibility
with the Horizons Update 11 old-name-style filenames.
1. We need StarPos (as well as StarSystem)
2. Adding more state tracking in this plugin is misguided.
3. So added it in monitor instead, putting *copies* of data in the
monitor.state dictionary.
4. So we reference those, but only available in journal_entry() itself, else
we'd need to pass the whole of `state` in.
5. So instead pass in the bits of `state` only when we need them.
We can't just use `EDLogs.live` here as it'll get set `true` when the
`Commander` event is seen *during the catch up*. We need that catchup
to have finished before we'll try processing a `NavRoute` event and
file.
The order of Journal events changed from:
1. LoadGame
2. Rank
3. Progress
to:
1. Rank
2. Progress
3. LoadGame
in Odyssey, and in at least current 'base game' and Horizons clients as
well. Also 'Reputation' event is before 'LoadGame' now. So simply
allow those events to have populated the data, don't re-init on
LoadGame.
Yes, I'm preferring to leave the lines in, but commented, so it's clear
why those aren't being init'd, *and* why 'Statistics' still is, and as
of what game version.
The old code did this, and without it we enter a loop of:
1. CAPI says unauthorized
2. We call login()
3. But companion.session.state == STATE_OK, so do nothing
4. Re-scheduled CAPI request goes back to 1.
* Currently a maximum of 5 attempts, 10ms apart.
* I was going to blank `entry = {}` for this, but there's a chance the
file load would fail when at startup and Embark the in-Journal event
actually has all the data. So we cross our fingers and hope that's
the case if loading fails.
* Changed the "not all the categories" logging to WARN to call out the
failure.
* Removed old comment about not touching Backpack here.