Split implants and boosters in EFT and multibuy exports
This commit is contained in:
@@ -57,6 +57,7 @@ class PortMultiBuyOptions(IntEnum):
|
||||
CARGO = 2
|
||||
LOADED_CHARGES = 3
|
||||
OPTIMIZE_PRICES = 4
|
||||
BOOSTERS = 5
|
||||
|
||||
|
||||
@unique
|
||||
@@ -68,6 +69,7 @@ class PortEftOptions(IntEnum):
|
||||
MUTATIONS = 2
|
||||
LOADED_CHARGES = 3
|
||||
CARGO = 4
|
||||
BOOSTERS = 5
|
||||
|
||||
|
||||
@unique
|
||||
|
||||
@@ -47,7 +47,8 @@ pyfalog = Logger(__name__)
|
||||
EFT_OPTIONS = (
|
||||
(PortEftOptions.LOADED_CHARGES, 'Loaded Charges', 'Export charges loaded into modules', True),
|
||||
(PortEftOptions.MUTATIONS, 'Mutated Attributes', 'Export mutated modules\' stats', True),
|
||||
(PortEftOptions.IMPLANTS, 'Implants && Boosters', 'Export implants and boosters', True),
|
||||
(PortEftOptions.IMPLANTS, 'Implants', 'Export implants', True),
|
||||
(PortEftOptions.BOOSTERS, 'Boosters', 'Export boosters', True),
|
||||
(PortEftOptions.CARGO, 'Cargo', 'Export cargo hold contents', True))
|
||||
|
||||
|
||||
@@ -115,16 +116,17 @@ def exportEft(fit, options, callback):
|
||||
sections.append('\n\n'.join(minionSection))
|
||||
|
||||
# Section 3: implants, boosters
|
||||
charSection = []
|
||||
if options[PortEftOptions.IMPLANTS]:
|
||||
charSection = []
|
||||
implantExport = exportImplants(fit.implants)
|
||||
if implantExport:
|
||||
charSection.append(implantExport)
|
||||
if options[PortEftOptions.BOOSTERS]:
|
||||
boosterExport = exportBoosters(fit.boosters)
|
||||
if boosterExport:
|
||||
charSection.append(boosterExport)
|
||||
if charSection:
|
||||
sections.append('\n\n'.join(charSection))
|
||||
if charSection:
|
||||
sections.append('\n\n'.join(charSection))
|
||||
|
||||
# Section 4: cargo
|
||||
if options[PortEftOptions.CARGO]:
|
||||
|
||||
@@ -24,7 +24,8 @@ from service.price import Price as sPrc
|
||||
|
||||
MULTIBUY_OPTIONS = (
|
||||
(PortMultiBuyOptions.LOADED_CHARGES, 'Loaded Charges', 'Export charges loaded into modules', True),
|
||||
(PortMultiBuyOptions.IMPLANTS, 'Implants && Boosters', 'Export implants and boosters', False),
|
||||
(PortMultiBuyOptions.IMPLANTS, 'Implants', 'Export implants', False),
|
||||
(PortMultiBuyOptions.BOOSTERS, 'Boosters', 'Export boosters', False),
|
||||
(PortMultiBuyOptions.CARGO, 'Cargo', 'Export cargo contents', True),
|
||||
(PortMultiBuyOptions.OPTIMIZE_PRICES, 'Optimize Prices', 'Replace items by cheaper alternatives', False),
|
||||
)
|
||||
@@ -56,6 +57,7 @@ def exportMultiBuy(fit, options, callback):
|
||||
for implant in fit.implants:
|
||||
_addItem(itemAmounts, implant.item)
|
||||
|
||||
if options[PortMultiBuyOptions.BOOSTERS]:
|
||||
for booster in fit.boosters:
|
||||
_addItem(itemAmounts, booster.item)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user