AppWindow.getandsend() is set on a timer for all of StartUp, Location
and Docked. This means it can trigger up to three times for a login
when docked.
Subsequent calls would hit the cooldown timer and blank the status text
blindly, hiding the 'Last Updated at' text.
To be honest I'm not sure it even needs blanking *then*.
This will trigger the "Where are you?!" message, which now can happen.
I need to double-check this against live behaviour, and might move this
to a different check, as I think on live it's valid to query in-space.
* A lot of this is commented out. It might be useful in the future, but
is just too noisy for now.
* Changed the protocol webserver to info, as it is.
* Left the EDSM 'not 1XX, 2XX or 5XX' in as it's a warning, so 'pass's
on the conditional bodies that would be empty now trace's are
commented.
Also refactors data.py to edmc_data.py as I'm having weird issues with
PyCharm debugger not starting, and this seems to be to do with module
name clashes.
The aim here is to avoid static data in modules that contain code. Why?
So that we can avoid some potential import loops when the 'inner' module
only wants static data but is already imported by the 'outer' module for
code purposes.
* We now use event_queue.empty() to see if it is indeed empty.
* Changed AppWindow.journal_event() to also use .empty() rather than
`while True`. Keeping the `'if not entry'` check just in case.
This prevents it from calling monitor.get_entry() when the prior run
through the loop has just emptied the queue. Thus we'll only log when
it genuinely IS unexpectedly empty.
* During *game* Shutdown we can send the synthetic 'Shutdown' event
through, and then find and append the actual game 'Shutdown' event
(i.e. this wasn't a crash, which is what the synthetic event is meant
to react to). But AppWindow.journal_event() loop picks up both events
in one call, so the second <<JournalEvent>> sends it working on an
empty queue.
Thus we log in monitor.get_entry() only if the queue is empty *and*
the game is still running.
* NB: Also adds 'Component' to the OTHER place montitor.state is
initialised.
* monitor.on_foot is now monitor.state['on_foot'] as plugins need to
access it.
* EDDB:journal_entry() now stores that in this.on_foot to check later.
* this.on_foot checked in cmdr_data() to actually set station name from
that data if needs be. This avoids setting it to STATION_UNDOCKED if
data['commander']['docked'] is False, when we're on_foot.
NB: No shipyard in tests because data['ships']['shipyard_list'] is an
empty list. This might be the bug not having been fixed, or the station
might genuinely have no ships for sale. We have no way to check in
Odyssey Alpha Phase 1.
* For taxi-usage you 'Embark' on it to take the trip and 'Disembark'
onto foot at the other end.
* Joining a multi-crew session will mean no longer being on foot.
* When quitting a multi-crew session we might miss that you're back
on-foot. Need to test.
Well, it doesn't now raise ServerLagging for a last Journal with a
LoadGame on-foot and in-station.
It does then cause "You're not docked at a station!" to show up.