MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / __getModeItems

Method __getModeItems

eos/saveddata/ship.py:123–139  ·  view source on GitHub ↗

Returns a list of valid mode items for ship. Note that this returns the valid Item objects, not the Mode objects. Returns None if not a t3 dessy

(self)

Source from the content-addressed store, hash-verified

121 return [Mode(item) for item in self.__modeItems] if self.__modeItems else None
122
123 def __getModeItems(self):
124 """
125 Returns a list of valid mode items for ship. Note that this returns the
126 valid Item objects, not the Mode objects. Returns None if not a
127 t3 dessy
128 """
129 if self.item.group.name != "Tactical Destroyer" and self.item.name != "Anhinga":
130 return None
131
132 items = []
133 g = eos.db.getGroup("Ship Modifiers", eager="items.attributes")
134 for item in g.items:
135 # Rely on name detection because race is not reliable
136 if item.name.lower().startswith(self.item.name.lower()):
137 items.append(item)
138
139 return items
140
141 def __deepcopy__(self, memo):
142 copy = Ship(self.item)

Callers 1

__init__Method · 0.95

Calls 2

getGroupMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected