From ab5e94a7c89a2a5d0c05f2a47771102c3f8aea02 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 22 Jul 2020 14:43:45 +0100 Subject: [PATCH] monitor.py: Don't record '' or ' ' as ShipName Doing so causes the ShipType to not be used in the UI, so you get a 'link' with just a space for the text. Any user who purposefully sets their ship's name to a single space can live with seeing the model name instead. Yes, I checked, the game allows it. --- monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 20a7fcf9..6e9d8ebb 100644 --- a/monitor.py +++ b/monitor.py @@ -399,7 +399,8 @@ class EDLogs(FileSystemEventHandler): not 'buggy' in self.canonicalise(entry['Ship'])): self.state['ShipID'] = entry['ShipID'] self.state['ShipIdent'] = entry['ShipIdent'] - self.state['ShipName'] = entry['ShipName'] + if entry['ShipName'] and entry['ShipName'] not in ('', ' '): + self.state['ShipName'] = entry['ShipName'] self.state['ShipType'] = self.canonicalise(entry['Ship']) self.state['HullValue'] = entry.get('HullValue') # not present on exiting Outfitting self.state['ModulesValue'] = entry.get('ModulesValue') # "