Added unique to current IntEnums
Renamed PortMultiBuyItemType to PortMultiBuyOptions
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
# =============================================================================
|
||||
|
||||
from eos.enum import Enum
|
||||
from enum import IntEnum
|
||||
from enum import IntEnum,unique
|
||||
|
||||
class FittingSlot(Enum):
|
||||
"""
|
||||
@@ -101,7 +101,8 @@ class EsiEndpoints(Enum):
|
||||
CHAR_FITTINGS = "/v1/characters/{character_id}/fittings/"
|
||||
CHAR_DEL_FIT = "/v1/characters/{character_id}/fittings/{fitting_id}/"
|
||||
|
||||
class PortMultiBuyItemType(IntEnum):
|
||||
@unique
|
||||
class PortMultiBuyOptions(IntEnum):
|
||||
"""
|
||||
Contains different types of items to multibuy export
|
||||
"""
|
||||
@@ -109,6 +110,7 @@ class PortMultiBuyItemType(IntEnum):
|
||||
CARGO = 2
|
||||
LOADED_CHARGES = 3
|
||||
|
||||
@unique
|
||||
class PortEftOptions(IntEnum):
|
||||
"""
|
||||
Contains different options for eft-export
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
|
||||
from enum import Enum
|
||||
from eos.const import PortMultiBuyItemType
|
||||
from eos.const import PortMultiBuyOptions
|
||||
|
||||
|
||||
|
||||
MULTIBUY_OPTIONS = (
|
||||
(PortMultiBuyItemType.LOADED_CHARGES.value, 'Loaded Charges', 'Export charges loaded into modules', True),
|
||||
(PortMultiBuyItemType.IMPLANTS.value, 'Implants && Boosters', 'Export implants and boosters', False),
|
||||
(PortMultiBuyItemType.CARGO.value, 'Cargo', 'Export cargo contents', True),
|
||||
(PortMultiBuyOptions.LOADED_CHARGES.value, 'Loaded Charges', 'Export charges loaded into modules', True),
|
||||
(PortMultiBuyOptions.IMPLANTS.value, 'Implants && Boosters', 'Export implants and boosters', False),
|
||||
(PortMultiBuyOptions.CARGO.value, 'Cargo', 'Export cargo contents', True),
|
||||
)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def exportMultiBuy(fit, options):
|
||||
if module.isMutated:
|
||||
continue
|
||||
addItem(module.item)
|
||||
if module.charge and options[PortMultiBuyItemType.LOADED_CHARGES.value]:
|
||||
if module.charge and options[PortMultiBuyOptions.LOADED_CHARGES.value]:
|
||||
addItem(module.charge, module.numCharges)
|
||||
|
||||
for drone in fit.drones:
|
||||
@@ -53,11 +53,11 @@ def exportMultiBuy(fit, options):
|
||||
for fighter in fit.fighters:
|
||||
addItem(fighter.item, fighter.amountActive)
|
||||
|
||||
if options[PortMultiBuyItemType.CARGO.value]:
|
||||
if options[PortMultiBuyOptions.CARGO.value]:
|
||||
for cargo in fit.cargo:
|
||||
addItem(cargo.item, cargo.amount)
|
||||
|
||||
if options[PortMultiBuyItemType.IMPLANTS.value]:
|
||||
if options[PortMultiBuyOptions.IMPLANTS.value]:
|
||||
for implant in fit.implants:
|
||||
addItem(implant.item)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user