Merge branch 'master' into spoolup
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
import wx
|
||||
from eos.saveddata.implant import Implant
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.module import Module, Slot, Rack
|
||||
from eos.saveddata.module import Module, Rack
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.const import FittingSlot
|
||||
from gui.viewColumn import ViewColumn
|
||||
|
||||
|
||||
@@ -32,7 +33,7 @@ class BaseIcon(ViewColumn):
|
||||
return self.shipImage
|
||||
elif isinstance(stuff, Module):
|
||||
if stuff.isEmpty:
|
||||
return self.fittingView.imageList.GetImageIndex("slot_%s_small" % Slot.getName(stuff.slot).lower(),
|
||||
return self.fittingView.imageList.GetImageIndex("slot_%s_small" % FittingSlot(stuff.slot).name.lower(),
|
||||
"gui")
|
||||
else:
|
||||
return self.loadIconFile(stuff.item.iconID or "")
|
||||
|
||||
@@ -25,8 +25,9 @@ from eos.saveddata.cargo import Cargo
|
||||
from eos.saveddata.implant import Implant
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.fighter import Fighter
|
||||
from eos.saveddata.module import Module, Slot, Rack
|
||||
from eos.saveddata.module import Module, Rack
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.const import FittingSlot
|
||||
from service.fit import Fit as FitSvc
|
||||
from service.market import Market
|
||||
from gui.viewColumn import ViewColumn
|
||||
@@ -72,10 +73,10 @@ class BaseName(ViewColumn):
|
||||
return "%s (%s)" % (stuff.name, stuff.ship.item.name)
|
||||
elif isinstance(stuff, Rack):
|
||||
if FitSvc.getInstance().serviceFittingOptions["rackLabels"]:
|
||||
if stuff.slot == Slot.MODE:
|
||||
if stuff.slot == FittingSlot.MODE:
|
||||
return '─ Tactical Mode ─'
|
||||
else:
|
||||
return '─ {} {} Slot{}─'.format(stuff.num, Slot.getName(stuff.slot).capitalize(), '' if stuff.num == 1 else 's')
|
||||
return '─ {} {} Slot{}─'.format(stuff.num, FittingSlot(stuff.slot).name.capitalize(), '' if stuff.num == 1 else 's')
|
||||
else:
|
||||
return ""
|
||||
elif isinstance(stuff, Module):
|
||||
@@ -89,7 +90,7 @@ class BaseName(ViewColumn):
|
||||
return "{} {}".format(type.name, stuff.item.name[-1:])
|
||||
|
||||
if stuff.isEmpty:
|
||||
return "%s Slot" % Slot.getName(stuff.slot).capitalize()
|
||||
return "%s Slot" % FittingSlot(stuff.slot).name.capitalize()
|
||||
else:
|
||||
return stuff.item.name
|
||||
elif isinstance(stuff, Implant):
|
||||
|
||||
@@ -24,7 +24,8 @@ import wx
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.implant import Implant
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.module import Module, State as State_, Rack
|
||||
from eos.saveddata.module import Module, Rack
|
||||
from eos.const import FittingModuleState as State_
|
||||
from gui.viewColumn import ViewColumn
|
||||
|
||||
import gui.mainFrame
|
||||
@@ -46,12 +47,11 @@ class State(ViewColumn):
|
||||
|
||||
def getToolTip(self, mod):
|
||||
if isinstance(mod, Module) and not mod.isEmpty:
|
||||
return State_.getName(mod.state).title()
|
||||
return State_(mod.state).name.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(),
|
||||
"gui")
|
||||
generic_active = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.ACTIVE.name.lower(), "gui")
|
||||
generic_inactive = self.fittingView.imageList.GetImageIndex("state_%s_small" % State_.OFFLINE.name.lower(), "gui")
|
||||
|
||||
if isinstance(stuff, Drone):
|
||||
if stuff.amountActive > 0:
|
||||
@@ -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_.ONLINE.name.lower(), "gui")
|
||||
else:
|
||||
active = getattr(stuff, "active", None)
|
||||
if active is None:
|
||||
|
||||
Reference in New Issue
Block a user