Add option to export disable cargo export for multibuy
This commit is contained in:
@@ -76,11 +76,11 @@ class CopySelectDialog(wx.Dialog):
|
||||
self.options[formatId] = {}
|
||||
|
||||
for optId, optName, optDesc in formatOptions:
|
||||
ch = wx.CheckBox(self, -1, optName)
|
||||
self.options[formatId][optId] = ch
|
||||
checkbox = wx.CheckBox(self, -1, optName)
|
||||
self.options[formatId][optId] = checkbox
|
||||
if self.settings['options'].get(formatId, 0) & optId:
|
||||
ch.SetValue(True)
|
||||
bsizer.Add(ch, 1, wx.EXPAND | wx.TOP | wx.BOTTOM, 3)
|
||||
checkbox.SetValue(True)
|
||||
bsizer.Add(checkbox, 1, wx.EXPAND | wx.TOP | wx.BOTTOM, 3)
|
||||
mainSizer.Add(bsizer, 1, wx.EXPAND | wx.LEFT, 20)
|
||||
|
||||
buttonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)
|
||||
|
||||
@@ -48,8 +48,8 @@ class Options(Enum):
|
||||
|
||||
|
||||
EFT_OPTIONS = (
|
||||
(Options.IMPLANTS.value, 'Implants && Boosters', 'Exports implants and boosters'),
|
||||
(Options.MUTATIONS.value, 'Mutated Attributes', 'Exports mutated modules\' stats'),
|
||||
(Options.IMPLANTS.value, 'Implants && Boosters', 'Export implants and boosters'),
|
||||
(Options.MUTATIONS.value, 'Mutated Attributes', 'Export mutated modules\' stats'),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -25,10 +25,12 @@ from service.fit import Fit as svcFit
|
||||
|
||||
class Options(Enum):
|
||||
IMPLANTS = 1
|
||||
CARGO = 2
|
||||
|
||||
|
||||
MULTIBUY_OPTIONS = (
|
||||
(Options.IMPLANTS.value, 'Implants && Boosters', 'Exports implants and boosters'),
|
||||
(Options.IMPLANTS.value, 'Implants && Boosters', 'Export implants and boosters'),
|
||||
(Options.CARGO.value, 'Cargo', 'Export cargo contents'),
|
||||
)
|
||||
|
||||
|
||||
@@ -53,8 +55,9 @@ def exportMultiBuy(fit, options):
|
||||
for fighter in fit.fighters:
|
||||
addItem(fighter.item, fighter.amountActive)
|
||||
|
||||
for cargo in fit.cargo:
|
||||
addItem(cargo.item, cargo.amount)
|
||||
if options & Options.CARGO.value:
|
||||
for cargo in fit.cargo:
|
||||
addItem(cargo.item, cargo.amount)
|
||||
|
||||
if options & Options.IMPLANTS.value:
|
||||
for implant in fit.implants:
|
||||
|
||||
Reference in New Issue
Block a user