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

Method display

gui/builtinContextMenus/ammoToDmgPattern.py:18–29  ·  view source on GitHub ↗
(self, callingWindow, srcContext, mainItem)

Source from the content-addressed store, hash-verified

16 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
17
18 def display(self, callingWindow, srcContext, mainItem):
19 if srcContext not in ("marketItemGroup", "marketItemMisc") or self.mainFrame.getActiveFit() is None:
20 return False
21
22 if mainItem is None:
23 return False
24
25 for attr in ("emDamage", "thermalDamage", "explosiveDamage", "kineticDamage"):
26 if mainItem.getAttribute(attr) is not None:
27 return True
28
29 return False
30
31 def getText(self, callingWindow, itmContext, mainItem):
32 return _t("Set {} as Damage Pattern").format(itmContext if itmContext is not None else _t("Item"))

Callers

nothing calls this directly

Calls 2

getAttributeMethod · 0.80
getActiveFitMethod · 0.45

Tested by

no test coverage detected