Do not export mutated items for multibuy
This commit is contained in:
@@ -965,6 +965,10 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
else:
|
||||
return currState
|
||||
|
||||
@property
|
||||
def isMutated(self):
|
||||
return bool(self.mutators)
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
item = self.item
|
||||
if item is None:
|
||||
|
||||
@@ -80,13 +80,12 @@ def exportEft(fit, options):
|
||||
modules = modsBySlotType.get(slotType, ())
|
||||
for module in modules:
|
||||
if module.item:
|
||||
mutated = bool(module.mutators)
|
||||
# if module was mutated, use base item name for export
|
||||
if mutated:
|
||||
if module.isMutated:
|
||||
modName = module.baseItem.name
|
||||
else:
|
||||
modName = module.item.name
|
||||
if mutated and options & Options.MUTATIONS.value:
|
||||
if module.isMutated and options & Options.MUTATIONS.value:
|
||||
mutants[mutantReference] = module
|
||||
mutationSuffix = ' [{}]'.format(mutantReference)
|
||||
mutantReference += 1
|
||||
|
||||
@@ -45,6 +45,9 @@ def exportMultiBuy(fit, options):
|
||||
exportCharges = svcFit.getInstance().serviceFittingOptions["exportCharges"]
|
||||
for module in fit.modules:
|
||||
if module.item:
|
||||
# Mutated items are of no use for multibuy
|
||||
if module.isMutated:
|
||||
continue
|
||||
addItem(module.item)
|
||||
if exportCharges and module.charge:
|
||||
addItem(module.charge, module.numCharges)
|
||||
|
||||
Reference in New Issue
Block a user