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

Fixes for starting game in SRV or fighter

This commit is contained in:
Jonathan Harris 2016-12-04 18:04:35 +00:00
parent fc3a60e6d5
commit 4395386ffb
3 changed files with 7 additions and 2 deletions

View File

@ -390,6 +390,9 @@ class AppWindow:
self.cmdr['text'] = data['commander']['name']
self.ship['text'] = companion.ship_map.get(data['ship']['name'].lower(), data['ship']['name'])
if not monitor.shiptype: # Started game in SRV or fighter
monitor.shipid = data['ship']['id']
monitor.shiptype = data['ship']['name'].lower()
if not monitor.system:
self.system['text'] = data['lastSystem']['name']
self.system['image'] = ''

View File

@ -97,10 +97,12 @@ ship_map = {
'ferdelance' : 'Fer-de-Lance',
'hauler' : 'Hauler',
'independant_trader' : 'Keelback',
'independent_fighter' : 'Taipan Fighter',
'orca' : 'Orca',
'python' : 'Python',
'scout' : 'Taipan Fighter',
'sidewinder' : 'Sidewinder',
'testbuggy' : 'Scarab',
'type6' : 'Type-6 Transporter',
'type7' : 'Type-7 Transporter',
'type9' : 'Type-9 Heavy',

View File

@ -234,8 +234,8 @@ class EDLogs(FileSystemEventHandler):
elif entry['event'] == 'LoadGame':
self.cmdr = entry['Commander']
self.mode = entry.get('GameMode') # 'Open', 'Solo', 'Group', or None for CQC
self.shipid = entry.get('ShipID') # None in CQC
self.shiptype = 'Ship' in entry and entry['Ship'].lower() or None # None in CQC
self.shiptype = 'Ship' in entry and entry['Ship'] not in ['TestBuggy', 'Empire_Fighter', 'Federation_Fighter', 'Independent_Fighter'] and entry['Ship'].lower() or None # None in CQC. TestBuggy or *_Fighter if game starts in SRV/fighter.
self.shipid = self.shiptype and entry.get('ShipID') or None # None in CQC
self.shippaint = None
self.body = None
self.system = None