Add new nos/neut effect files, and change module/drone files to account for new attributes. This does not add the database

This commit is contained in:
blitzmann
2015-11-22 23:03:46 -05:00
parent 81f122467a
commit 7dbe6dbe2d
32 changed files with 134 additions and 4 deletions

View File

@@ -254,7 +254,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
@property
def falloff(self):
attrs = ("falloff", "shipScanFalloff")
attrs = ("falloff", "shipScanFalloff", "falloffEffectiveness")
for attr in attrs:
falloff = self.getModifiedItemAttr(attr)
if falloff is not None: return falloff
@@ -469,7 +469,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
# Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions
# (all effects which apply instant modification are exception, generally speaking)
if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1:
offensiveNonModifiers = set(("energyDestabilizationNew", "leech"))
offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff"))
if not offensiveNonModifiers.intersection(set(item.effects)):
return False
# If assistive modules are not allowed, do not let to apply these altogether