(self, booster)
| 300 | HandledList.insert(self, idx, booster) |
| 301 | |
| 302 | def makeRoom(self, booster): |
| 303 | # if needed, remove booster that was occupying slot |
| 304 | oldObj = next((b for b in self if b.slot == booster.slot), None) |
| 305 | if oldObj is not None: |
| 306 | pyfalog.info("Slot {0} occupied with {1}, replacing with {2}", booster.slot, oldObj.item.name, booster.item.name) |
| 307 | position = self.index(oldObj) |
| 308 | from gui.fitCommands.helpers import BoosterInfo |
| 309 | boosterInfo = BoosterInfo.fromBooster(oldObj) |
| 310 | oldObj.itemID = 0 # hack to remove from DB. See GH issue #324 |
| 311 | self.remove(oldObj) |
| 312 | return position, boosterInfo |
| 313 | return None, None |
| 314 | |
| 315 | def __slotCheck(self, booster): |
| 316 | return any(b.slot == booster.slot for b in self) |
nothing calls this directly
no test coverage detected