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

Method makeRoom

eos/effectHandlerHelpers.py:261–272  ·  view source on GitHub ↗
(self, implant)

Source from the content-addressed store, hash-verified

259 HandledList.insert(self, idx, implant)
260
261 def makeRoom(self, implant):
262 # if needed, remove booster that was occupying slot
263 oldObj = next((i for i in self if i.slot == implant.slot), None)
264 if oldObj is not None:
265 pyfalog.info("Slot {0} occupied with {1}, replacing with {2}", implant.slot, oldObj.item.name, implant.item.name)
266 position = self.index(oldObj)
267 from gui.fitCommands.helpers import ImplantInfo
268 implantInfo = ImplantInfo.fromImplant(oldObj)
269 oldObj.itemID = 0 # hack to remove from DB. See GH issue #324
270 self.remove(oldObj)
271 return position, implantInfo
272 return None, None
273
274 def __slotCheck(self, implant):
275 return any(i.slot == implant.slot for i in self)

Callers 5

addImplantMethod · 0.45
addImplantsMethod · 0.45
DoMethod · 0.45
DoMethod · 0.45
DoMethod · 0.45

Calls 2

fromImplantMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected