1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Correct ship name in flight log.

This commit is contained in:
Jonathan Harris 2015-10-08 14:35:23 +01:00
parent 76b8e09ea9
commit 58b7a18eec
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ def export(data):
time.strftime('%H:%M:%S', time.localtime(querytime)),
data['lastSystem']['name'],
data['commander']['docked'] and data['lastStarport']['name'] or '',
ship_map.get(data['ship']['name'], data['ship']['name']),
ship_map.get(data['ship']['name'].lower(), data['ship']['name']),
','.join([('%d %s' % (commodities[k], k)) for k in sorted(commodities)])))
logfile.flush()

View File

@ -227,7 +227,7 @@ def lookup(module):
name = module['name'].lower().rsplit('_', 2) # Armour is ship-specific, and ship names can have underscores
new['category'] = 'standard'
new['name'] = armour_map[name[2]]
new['ship'] = ship_map.get(name[0], name[0])
new['ship'] = ship_map[name[0]] # Generate error on unknown ship
new['class'] = '1'
new['rating'] = 'I'