Merge branch 'singularity' of evefit.org:pyfa into singularity
This commit is contained in:
@@ -10,11 +10,13 @@ class MarketJump(ContextMenu):
|
||||
def display(self, srcContext, selection):
|
||||
validContexts = ("marketItemMisc", "fittingModule", "fittingCharge", "droneItem", "implantItem",
|
||||
"boosterItem", "projectedModule", "projectedDrone", "projectedCharge")
|
||||
if not srcContext in validContexts:
|
||||
return False
|
||||
sMkt = service.Market.getInstance()
|
||||
if selection is None or len(selection) < 1:
|
||||
return False
|
||||
item = getattr(selection[0], "item", selection[0])
|
||||
doit = srcContext in validContexts and (not selection[0].isEmpty if srcContext == "fittingModule" else True) \
|
||||
doit = not selection[0].isEmpty if srcContext == "fittingModule" else True \
|
||||
and sMkt.getMarketGroupByItem(item) is not None
|
||||
return doit
|
||||
|
||||
|
||||
@@ -168,3 +168,12 @@ class Fleet(object):
|
||||
if squad.leader is None and wing.leader is None and fleet.leader is None:
|
||||
return False
|
||||
return True
|
||||
|
||||
def loadLinearFleet(self, fit):
|
||||
if self.isInLinearFleet(fit) is False:
|
||||
return None
|
||||
squadID = eos.db.getSquadsIDsWithFitID(fit.ID)[0]
|
||||
s = eos.db.getSquad(squadID)
|
||||
w = s.wing
|
||||
f = w.gang
|
||||
return (f.leader, w.leader, s.leader)
|
||||
|
||||
Reference in New Issue
Block a user