Add an option not to export charges to ESI
This commit is contained in:
@@ -56,7 +56,7 @@ INV_FLAG_DRONEBAY = 87
|
||||
INV_FLAG_FIGHTER = 158
|
||||
|
||||
|
||||
def exportESI(ofit, callback):
|
||||
def exportESI(ofit, exportCharges, callback):
|
||||
# A few notes:
|
||||
# max fit name length is 50 characters
|
||||
# Most keys are created simply because they are required, but bogus data is okay
|
||||
@@ -99,7 +99,7 @@ def exportESI(ofit, callback):
|
||||
item['type_id'] = module.item.ID
|
||||
fit['items'].append(item)
|
||||
|
||||
if module.charge:
|
||||
if module.charge and exportCharges:
|
||||
if module.chargeID not in charges:
|
||||
charges[module.chargeID] = 0
|
||||
# `or 1` because some charges (ie scripts) are without qty
|
||||
|
||||
@@ -314,8 +314,8 @@ class Port:
|
||||
return importESI(string)
|
||||
|
||||
@staticmethod
|
||||
def exportESI(fit, callback=None):
|
||||
return exportESI(fit, callback=callback)
|
||||
def exportESI(fit, exportCharges, callback=None):
|
||||
return exportESI(fit, exportCharges, callback=callback)
|
||||
|
||||
# XML-related methods
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user