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

Method checkRequirements

service/character.py:456–476  ·  view source on GitHub ↗
(self, fit)

Source from the content-addressed store, hash-verified

454 return char.implants
455
456 def checkRequirements(self, fit):
457 # toCheck = []
458 reqs = {}
459 for thing in itertools.chain(fit.modules, fit.drones, fit.fighters, (fit.ship,), fit.appliedImplants, fit.boosters):
460 if isinstance(thing, es_Module) and thing.slot == es_Slot.RIG:
461 continue
462 for attr in ("item", "charge"):
463 if attr == "charge" and isinstance(thing, es_Fighter):
464 # Fighter Bombers are automatically charged with micro bombs.
465 # These have skill requirements attached, but aren't used in EVE.
466 continue
467 subThing = getattr(thing, attr, None)
468 subReqs = {}
469 if subThing is not None:
470 if isinstance(thing, es_Fighter) and attr == "charge":
471 continue
472 self._checkRequirements(fit.character, subThing, subReqs)
473 if subReqs:
474 reqs[subThing] = subReqs
475
476 return reqs
477
478 def _checkRequirements(self, char, subThing, reqs):
479 for req, level in subThing.requiredSkills.items():

Callers 1

fitChangedMethod · 0.80

Calls 1

_checkRequirementsMethod · 0.95

Tested by

no test coverage detected