mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-31 23:59:38 +03:00
plugins/inara.py: De-future
This commit is contained in:
parent
e6f88d3bd4
commit
ae16b4f522
@ -1,14 +1,7 @@
|
|||||||
from __future__ import division
|
|
||||||
from __future__ import print_function
|
|
||||||
#
|
#
|
||||||
# Inara sync
|
# Inara sync
|
||||||
#
|
#
|
||||||
|
|
||||||
from future import standard_library
|
|
||||||
standard_library.install_aliases()
|
|
||||||
from builtins import str
|
|
||||||
from builtins import zip
|
|
||||||
from past.utils import old_div
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
@ -714,7 +707,7 @@ def cmdr_data(data, is_beta):
|
|||||||
this.station_link['url'] = this.station or this.system
|
this.station_link['url'] = this.station or this.system
|
||||||
|
|
||||||
if config.getint('inara_out') and not is_beta and not this.multicrew and credentials(this.cmdr):
|
if config.getint('inara_out') and not is_beta and not this.multicrew and credentials(this.cmdr):
|
||||||
if not (CREDIT_RATIO > old_div(this.lastcredits, data['commander']['credits']) > old_div(1,CREDIT_RATIO)):
|
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
|
this.events = [x for x in this.events if x['eventName'] != 'setCommanderCredits'] # Remove any unsent
|
||||||
add_event('setCommanderCredits', data['timestamp'],
|
add_event('setCommanderCredits', data['timestamp'],
|
||||||
OrderedDict([
|
OrderedDict([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user