From 0997a543244425f7303cd93dc2b1aa0f1c923463 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 11 Feb 2019 14:44:38 +0300 Subject: [PATCH] Add option to export disable cargo export for multibuy --- gui/copySelectDialog.py | 8 ++++---- service/port/eft.py | 4 ++-- service/port/multibuy.py | 9 ++++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gui/copySelectDialog.py b/gui/copySelectDialog.py index 628afd04d..666eeb060 100644 --- a/gui/copySelectDialog.py +++ b/gui/copySelectDialog.py @@ -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) diff --git a/service/port/eft.py b/service/port/eft.py index 548ef9de4..91d0b8d47 100644 --- a/service/port/eft.py +++ b/service/port/eft.py @@ -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'), ) diff --git a/service/port/multibuy.py b/service/port/multibuy.py index 4b5ad89fd..6a3c4425e 100644 --- a/service/port/multibuy.py +++ b/service/port/multibuy.py @@ -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: