From 58ad7156b4fa0d9d7ec870d459410273295bc3e3 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 22 Jul 2020 14:48:34 +0100 Subject: [PATCH] monitor.py: Add comment about why this new check is there --- monitor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/monitor.py b/monitor.py index 6e9d8ebb..7fd5c74b 100644 --- a/monitor.py +++ b/monitor.py @@ -399,8 +399,14 @@ class EDLogs(FileSystemEventHandler): not 'buggy' in self.canonicalise(entry['Ship'])): self.state['ShipID'] = entry['ShipID'] self.state['ShipIdent'] = entry['ShipIdent'] + + # Newly purchased ships can show a ShipName of "" initially, + # and " " after a game restart/relog. + # Players *can* also purposefully set " " as the name, but anyone + # doing that gets to live with EDMC showing ShipType instead. 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') # "