1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

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.
This commit is contained in:
Athanasius 2020-07-22 14:43:45 +01:00
parent d39d78bb39
commit ab5e94a7c8

View File

@ -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') # "