| 84 | self.commandBonus = 0 |
| 85 | |
| 86 | def calculateModifiedAttributes(self, fit, runTime, forceProjected=False): |
| 87 | if forceProjected: |
| 88 | return |
| 89 | for effect in self.item.effects.values(): |
| 90 | if effect.runTime == runTime and \ |
| 91 | effect.isType("passive") and \ |
| 92 | effect.activeByDefault: |
| 93 | # Ships have effects that utilize the level of a skill as an |
| 94 | # additional operator to the modifier. These are defined in |
| 95 | # the effect itself, and these skillbooks are registered when |
| 96 | # they are provided. However, we must re-register the ship |
| 97 | # before each effect, otherwise effects that do not have |
| 98 | # skillbook modifiers will use the stale modifier value |
| 99 | # GH issue #351 |
| 100 | fit.register(self) |
| 101 | effect.handler(fit, self, ("ship",), None, effect=effect) |
| 102 | |
| 103 | def validateModeItem(self, item, owner=None): |
| 104 | """ Checks if provided item is a valid mode """ |