From 72d200f6167a79e762114f5e29f81ac5b9bb3f57 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 3 Apr 2021 22:43:04 +0100 Subject: [PATCH] Detect when on-foot but no known station. 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. --- EDMarketConnector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 5f4efc45..44ff28f2 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -779,8 +779,9 @@ class AppWindow(object): self.status['text'] = _("Who are you?!") # Shouldn't happen elif (not data.get('lastSystem', {}).get('name') - or (data['commander'].get('docked') - and not data.get('lastStarport', {}).get('name'))): # Only care if docked + or (data['commander'].get('docked') or monitor.state['OnFoot'] + and not data.get('lastStarport', {}).get('name')) + or (monitor.state['OnFoot'] and data['lastStarport']['name'] != monitor.station)): self.status['text'] = _("Where are you?!") # Shouldn't happen elif not data.get('ship', {}).get('name') or not data.get('ship', {}).get('modules'):