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

Inara: Be paranoid in case of -ve credits balance

This commit is contained in:
Athanasius 2022-01-31 15:22:36 +00:00
parent 02dd800c57
commit adb8055f08
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -1363,7 +1363,7 @@ def cmdr_data(data: CAPIData, is_beta): # noqa: CCR001
if config.get_int('inara_out') and not is_beta and not this.multicrew and credentials(this.cmdr):
if (
abs(this.last_credits - data['commander']['credits']) >=
min(this.last_credits * CREDITS_DELTA_MIN_FRACTION, CREDITS_DELTA_MIN_ABSOLUTE)
min(abs(this.last_credits * CREDITS_DELTA_MIN_FRACTION), CREDITS_DELTA_MIN_ABSOLUTE)
):
this.filter_events(
Credentials(this.cmdr, this.FID, str(credentials(this.cmdr))),