Create set directly
This commit is contained in:
@@ -201,7 +201,10 @@ class Drone(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", "energyNosferatuFalloff", "energyNeutralizerFalloff"))
|
||||
offensiveNonModifiers = {"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
|
||||
|
||||
@@ -236,7 +236,10 @@ class Fighter(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", "energyNosferatuFalloff", "energyNeutralizerFalloff"))
|
||||
offensiveNonModifiers = {"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
|
||||
|
||||
@@ -489,7 +489,10 @@ 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", "energyNosferatuFalloff", "energyNeutralizerFalloff"))
|
||||
offensiveNonModifiers = {"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
|
||||
|
||||
Reference in New Issue
Block a user