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

Get timestamp for setCommanderCredits from cAPI server

This commit is contained in:
Jonathan Harris 2018-05-29 23:37:03 +01:00
parent cd199380ed
commit 5d1da83b45

View File

@ -644,7 +644,7 @@ def cmdr_data(data, is_beta):
if config.getint('inara_out') and not is_beta and not this.multicrew and credentials(this.cmdr):
if not (CREDIT_RATIO > this.lastcredits / data['commander']['credits'] > 1/CREDIT_RATIO):
this.events = [x for x in this.events if x['eventName'] != 'setCommanderCredits'] # Remove any unsent
add_event('setCommanderCredits', time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()),
add_event('setCommanderCredits', data['timestamp'],
OrderedDict([
('commanderCredits', data['commander']['credits']),
('commanderLoan', data['commander'].get('debt', 0)),