MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / activate

Method activate

gui/builtinContextMenus/cargoAddAmmo.py:33–43  ·  view source on GitHub ↗
(self, callingWindow, fullContext, mainItem, i)

Source from the content-addressed store, hash-verified

31 return _t("Add {0} to Cargo (x1000)").format(itmContext)
32
33 def activate(self, callingWindow, fullContext, mainItem, i):
34 fitID = self.mainFrame.getActiveFit()
35 typeID = int(mainItem.ID)
36
37 if mainItem.marketGroup and mainItem.marketGroup.name == "Scan Probes":
38 command = cmd.GuiAddCargoCommand(fitID=fitID, itemID=typeID, amount=8)
39 else:
40 command = cmd.GuiAddCargoCommand(fitID=fitID, itemID=typeID, amount=1000)
41
42 if self.mainFrame.command.Submit(command):
43 self.mainFrame.additionsPane.select("Cargo", focus=False)
44
45
46AddToCargoAmmo.register()

Callers

nothing calls this directly

Calls 2

selectMethod · 0.80
getActiveFitMethod · 0.45

Tested by

no test coverage detected