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