Added unique to rest except Fittingslot
This commit is contained in:
18
eos/const.py
18
eos/const.py
@@ -46,14 +46,16 @@ class FittingSlot(Enum):
|
||||
FS_SUPPORT = 14
|
||||
FS_HEAVY = 15
|
||||
|
||||
class ImplantLocation(Enum):
|
||||
@unique
|
||||
class ImplantLocation(IntEnum):
|
||||
"""
|
||||
Contains location of the implant
|
||||
"""
|
||||
FIT = 0
|
||||
CHARACTER = 1
|
||||
|
||||
class CalcType(Enum):
|
||||
@unique
|
||||
class CalcType(IntEnum):
|
||||
"""
|
||||
Contains location of the calculation
|
||||
"""
|
||||
@@ -61,7 +63,8 @@ class CalcType(Enum):
|
||||
PROJECTED = 1
|
||||
COMMAND = 2
|
||||
|
||||
class FittingModuleState(Enum):
|
||||
@unique
|
||||
class FittingModuleState(IntEnum):
|
||||
"""
|
||||
Contains the state of a fitting module
|
||||
"""
|
||||
@@ -70,7 +73,8 @@ class FittingModuleState(Enum):
|
||||
ACTIVE = 1
|
||||
OVERHEATED = 2
|
||||
|
||||
class FittingHardpoint(Enum):
|
||||
@unique
|
||||
class FittingHardpoint(IntEnum):
|
||||
"""
|
||||
Contains the types of a fitting hardpoint
|
||||
"""
|
||||
@@ -78,14 +82,16 @@ class FittingHardpoint(Enum):
|
||||
MISSILE = 1
|
||||
TURRET = 2
|
||||
|
||||
class EsiLoginMethod(Enum):
|
||||
@unique
|
||||
class EsiLoginMethod(IntEnum):
|
||||
"""
|
||||
Contains the method of ESI login
|
||||
"""
|
||||
SERVER = 0
|
||||
MANUAL = 1
|
||||
|
||||
class EsiSsoMode(Enum):
|
||||
@unique
|
||||
class EsiSsoMode(IntEnum):
|
||||
"""
|
||||
Contains the mode of ESI sso mode
|
||||
"""
|
||||
|
||||
@@ -732,7 +732,7 @@ class Fit(object):
|
||||
The type of calculation our current iteration is in. This helps us determine the interactions between
|
||||
fits that rely on others for proper calculations
|
||||
"""
|
||||
pyfalog.info("Starting fit calculation on: {0}, calc: {1}", repr(self), CalcType.getName(type))
|
||||
pyfalog.info("Starting fit calculation on: {0}, calc: {1}", repr(self), CalcType(type).name)
|
||||
|
||||
# If we are projecting this fit onto another one, collect the projection info for later use
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ class State(ViewColumn):
|
||||
return State_.getName(mod.state).title()
|
||||
|
||||
def getImageId(self, stuff):
|
||||
generic_active = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(1).lower(), "gui")
|
||||
generic_inactive = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(-1).lower(),
|
||||
generic_active = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_(1).name.lower(), "gui")
|
||||
generic_inactive = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_(-1).name.lower(),
|
||||
"gui")
|
||||
|
||||
if isinstance(stuff, Drone):
|
||||
@@ -64,7 +64,7 @@ class State(ViewColumn):
|
||||
if stuff.isEmpty:
|
||||
return -1
|
||||
else:
|
||||
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(stuff.state).lower(),
|
||||
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_(stuff.state).name.lower(),
|
||||
"gui")
|
||||
elif isinstance(stuff, Fit):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
@@ -83,7 +83,7 @@ class State(ViewColumn):
|
||||
return generic_inactive
|
||||
elif isinstance(stuff, Implant) and stuff.character:
|
||||
# if we're showing character implants, show an "online" state, which should not be changed
|
||||
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.getName(0).lower(), "gui")
|
||||
return self.fittingView.imageList.GetImageIndex("state_%s_small" % State_(0).name.lower(), "gui")
|
||||
else:
|
||||
active = getattr(stuff, "active", None)
|
||||
if active is None:
|
||||
|
||||
Reference in New Issue
Block a user